MCPcopy Create free account
hub / github.com/catboost/catboost / Y_UNIT_TEST

Function Y_UNIT_TEST

util/generic/set_ut.cpp:10–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8
9Y_UNIT_TEST_SUITE(YSetTest) {
10 Y_UNIT_TEST(TestSet1) {
11 TSet<int, TLess<int>> s;
12 UNIT_ASSERT(!s);
13 UNIT_ASSERT(s.count(42) == 0);
14 s.insert(42);
15 UNIT_ASSERT(s);
16 UNIT_ASSERT(s.count(42) == 1);
17 s.insert(42);
18 UNIT_ASSERT(s.count(42) == 1);
19 size_t count = s.erase(42);
20 UNIT_ASSERT(count == 1);
21 }
22
23 Y_UNIT_TEST(TestSet2) {
24 using int_set = TSet<int, TLess<int>>;

Callers

nothing calls this directly

Calls 15

distanceFunction · 0.85
TKeyClass · 0.70
moveFunction · 0.50
countMethod · 0.45
insertMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
swapMethod · 0.45
emptyMethod · 0.45
findMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected