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

Function Y_UNIT_TEST

util/generic/algorithm_ut.cpp:12–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10
11Y_UNIT_TEST_SUITE(TAlgorithm) {
12 Y_UNIT_TEST(AnyTest) {
13 UNIT_ASSERT(0 == AnyOf(TStringBuf("00"), isOne));
14 UNIT_ASSERT(1 == AnyOf(TStringBuf("01"), isOne));
15 UNIT_ASSERT(1 == AnyOf(TStringBuf("10"), isOne));
16 UNIT_ASSERT(1 == AnyOf(TStringBuf("11"), isOne));
17 UNIT_ASSERT(0 == AnyOf(TStringBuf(), isOne));
18
19 const char array00[]{'0', '0'};
20 UNIT_ASSERT(0 == AnyOf(array00, isOne));
21 const char array01[]{'0', '1'};
22 UNIT_ASSERT(1 == AnyOf(array01, isOne));
23 }
24
25 Y_UNIT_TEST(AllOfTest) {
26 UNIT_ASSERT(0 == AllOf(TStringBuf("00"), isOne));

Callers

nothing calls this directly

Calls 15

CountOfFunction · 0.85
EqualToOneOfFunction · 0.85
FindPtrFunction · 0.85
FindIfPtrFunction · 0.85
FindIndexFunction · 0.85
FindIndexIfFunction · 0.85
SortUniqueFunction · 0.85
EraseFunction · 0.85
EraseNodesIfFunction · 0.85
NthElementFunction · 0.85
BinarySearchFunction · 0.85
EqualRangeFunction · 0.85

Tested by

no test coverage detected