reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

unittests/ADT/BitVectorTest.cpp
   27   EXPECT_EQ(0U, Vec.count());
   28   EXPECT_EQ(0U, Vec.size());
   29   EXPECT_FALSE(Vec.any());
   30   EXPECT_TRUE(Vec.all());
   31   EXPECT_TRUE(Vec.none());
   32   EXPECT_TRUE(Vec.empty());
   34   Vec.resize(5, true);
   35   EXPECT_EQ(5U, Vec.count());
   36   EXPECT_EQ(5U, Vec.size());
   37   EXPECT_TRUE(Vec.any());
   38   EXPECT_TRUE(Vec.all());
   39   EXPECT_FALSE(Vec.none());
   40   EXPECT_FALSE(Vec.empty());
   42   Vec.resize(11);
   43   EXPECT_EQ(5U, Vec.count());
   44   EXPECT_EQ(11U, Vec.size());
   45   EXPECT_TRUE(Vec.any());
   46   EXPECT_FALSE(Vec.all());
   47   EXPECT_FALSE(Vec.none());
   48   EXPECT_FALSE(Vec.empty());
   50   TypeParam Inv = Vec;
   59   EXPECT_FALSE(Inv == Vec);
   60   EXPECT_TRUE(Inv != Vec);
   61   Vec.flip();
   62   EXPECT_TRUE(Inv == Vec);
   63   EXPECT_FALSE(Inv != Vec);
   66   Vec.resize(23, true);
   67   Vec.resize(25, false);
   68   Vec.resize(26, true);
   69   Vec.resize(29, false);
   70   Vec.resize(33, true);
   71   Vec.resize(57, false);
   73   for (unsigned i = Vec.find_first(); i != -1u; i = Vec.find_next(i)) {
   73   for (unsigned i = Vec.find_first(); i != -1u; i = Vec.find_next(i)) {
   75     EXPECT_TRUE(Vec[i]);
   76     EXPECT_TRUE(Vec.test(i));
   78   EXPECT_EQ(Count, Vec.count());
   80   EXPECT_FALSE(Vec[0]);
   81   EXPECT_TRUE(Vec[32]);
   82   EXPECT_FALSE(Vec[56]);
   83   Vec.resize(61, false);
   85   TypeParam Copy = Vec;
   88   std::swap(Alt, Vec);
   90   EXPECT_TRUE(Vec.size() == 6);
   91   EXPECT_TRUE(Vec.count() == 3);
   92   EXPECT_TRUE(Vec.find_first() == 3);
   93   std::swap(Copy, Vec);
   96   Vec.resize(68, true);
   97   Vec.resize(78, false);
   98   Vec.resize(89, true);
   99   Vec.resize(90, false);
  100   Vec.resize(91, true);
  101   Vec.resize(130, false);
  103   for (unsigned i = Vec.find_first(); i != -1u; i = Vec.find_next(i)) {
  103   for (unsigned i = Vec.find_first(); i != -1u; i = Vec.find_next(i)) {
  105     EXPECT_TRUE(Vec[i]);
  106     EXPECT_TRUE(Vec.test(i));
  108   EXPECT_EQ(Count, Vec.count());
  110   EXPECT_FALSE(Vec[0]);
  111   EXPECT_TRUE(Vec[32]);
  112   EXPECT_FALSE(Vec[60]);
  113   EXPECT_FALSE(Vec[129]);
  115   Vec.flip(60);
  116   EXPECT_TRUE(Vec[60]);
  117   EXPECT_EQ(Count + 1, Vec.count());
  118   Vec.flip(60);
  119   EXPECT_FALSE(Vec[60]);
  120   EXPECT_EQ(Count, Vec.count());
  122   Vec.reset(32);
  123   EXPECT_FALSE(Vec[32]);
  124   EXPECT_EQ(Count - 1, Vec.count());
  125   Vec.set(32);
  126   EXPECT_TRUE(Vec[32]);
  127   EXPECT_EQ(Count, Vec.count());
  129   Vec.flip();
  130   EXPECT_EQ(Vec.size() - Count, Vec.count());
  130   EXPECT_EQ(Vec.size() - Count, Vec.count());
  132   Vec.reset();
  133   EXPECT_EQ(0U, Vec.count());
  134   EXPECT_EQ(130U, Vec.size());
  135   EXPECT_FALSE(Vec.any());
  136   EXPECT_FALSE(Vec.all());
  137   EXPECT_TRUE(Vec.none());
  138   EXPECT_FALSE(Vec.empty());
  140   Vec.flip();
  141   EXPECT_EQ(130U, Vec.count());
  142   EXPECT_EQ(130U, Vec.size());
  143   EXPECT_TRUE(Vec.any());
  144   EXPECT_TRUE(Vec.all());
  145   EXPECT_FALSE(Vec.none());
  146   EXPECT_FALSE(Vec.empty());
  148   Vec.resize(64);
  149   EXPECT_EQ(64U, Vec.count());
  150   EXPECT_EQ(64U, Vec.size());
  151   EXPECT_TRUE(Vec.any());
  152   EXPECT_TRUE(Vec.all());
  153   EXPECT_FALSE(Vec.none());
  154   EXPECT_FALSE(Vec.empty());
  156   Vec.flip();
  157   EXPECT_EQ(0U, Vec.count());
  158   EXPECT_EQ(64U, Vec.size());
  159   EXPECT_FALSE(Vec.any());
  160   EXPECT_FALSE(Vec.all());
  161   EXPECT_TRUE(Vec.none());
  162   EXPECT_FALSE(Vec.empty());
  172   Vec.clear();
  173   EXPECT_EQ(0U, Vec.count());
  174   EXPECT_EQ(0U, Vec.size());
  175   EXPECT_FALSE(Vec.any());
  176   EXPECT_TRUE(Vec.all());
  177   EXPECT_TRUE(Vec.none());
  178   EXPECT_TRUE(Vec.empty());