• Home
  • Raw
  • Download

Lines Matching refs:flat_set

32   FlatSet<long> flat_set;  in TEST()  local
34 EXPECT_TRUE(flat_set.empty()); in TEST()
35 EXPECT_EQ(flat_set.size(), 0u); in TEST()
36 EXPECT_EQ(flat_set.begin(), flat_set.end()); in TEST()
37 EXPECT_FALSE(flat_set.count(42)); in TEST()
38 EXPECT_EQ(flat_set.find(42), flat_set.end()); in TEST()
39 EXPECT_EQ(flat_set.find(42), flat_set.begin()); in TEST()
41 auto it_and_inserted = flat_set.insert(1); in TEST()
42 EXPECT_EQ(it_and_inserted.first, flat_set.find(1)); in TEST()
44 EXPECT_FALSE(flat_set.empty()); in TEST()
45 EXPECT_EQ(flat_set.size(), 1u); in TEST()
47 auto it = flat_set.find(1); in TEST()
48 EXPECT_EQ(it, flat_set.begin()); in TEST()
49 EXPECT_NE(it, flat_set.end()); in TEST()
53 EXPECT_TRUE(flat_set.count(1)); in TEST()
54 EXPECT_NE(flat_set.begin(), flat_set.end()); in TEST()
55 EXPECT_EQ(std::distance(flat_set.begin(), flat_set.end()), 1); in TEST()
57 it_and_inserted = flat_set.insert(1); in TEST()
58 EXPECT_EQ(it_and_inserted.first, flat_set.find(1)); in TEST()
60 EXPECT_EQ(flat_set.size(), 1u); in TEST()
61 EXPECT_TRUE(flat_set.count(1)); in TEST()
62 EXPECT_FALSE(flat_set.count(0)); in TEST()
63 EXPECT_FALSE(flat_set.count(-1)); in TEST()
65 EXPECT_TRUE(flat_set.erase(1)); in TEST()
66 EXPECT_FALSE(flat_set.count(1)); in TEST()
67 EXPECT_EQ(flat_set.size(), 0u); in TEST()
69 EXPECT_TRUE(flat_set.insert(7).second); in TEST()
70 EXPECT_TRUE(flat_set.insert(-4).second); in TEST()
71 EXPECT_TRUE(flat_set.insert(11).second); in TEST()
72 EXPECT_TRUE(flat_set.insert(-13).second); in TEST()
73 EXPECT_TRUE(flat_set.count(7)); in TEST()
74 EXPECT_TRUE(flat_set.count(-4)); in TEST()
75 EXPECT_TRUE(flat_set.count(11)); in TEST()
76 EXPECT_TRUE(flat_set.count(-13)); in TEST()
77 EXPECT_THAT(flat_set, ElementsAre(-13, -4, 7, 11)); in TEST()
79 EXPECT_TRUE(flat_set.erase(-4)); in TEST()
80 EXPECT_TRUE(flat_set.erase(7)); in TEST()
81 EXPECT_THAT(flat_set, ElementsAre(-13, 11)); in TEST()
83 flat_set.clear(); in TEST()
87 flat_set = FlatSet<long>({1, 2, 1, 2, 3}); in TEST()
88 EXPECT_EQ(flat_set.size(), 3u); in TEST()
89 EXPECT_THAT(flat_set, ElementsAre(1, 2, 3)); in TEST()
93 FlatSet<int> flat_set; in TEST() local
101 auto flat_result = flat_set.insert(val); in TEST()
103 EXPECT_EQ(flat_result.first, flat_set.find(val)); in TEST()
107 flat_set.erase(val); in TEST()
110 ASSERT_EQ(flat_set.size(), gold_set.size()); in TEST()
113 EXPECT_THAT(flat_set, ElementsAreArray(gold_set)); in TEST()