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

Function Y_UNIT_TEST

util/string/join_ut.cpp:17–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15
16Y_UNIT_TEST_SUITE(JoinStringTest) {
17 Y_UNIT_TEST(ScalarItems) {
18 UNIT_ASSERT_EQUAL(Join(',', 10, 11.1, "foobar"), "10,11.1,foobar");
19 UNIT_ASSERT_EQUAL(Join(", ", 10, 11.1, "foobar"), "10, 11.1, foobar");
20 UNIT_ASSERT_EQUAL(Join(", ", 10, 11.1, TString("foobar")), "10, 11.1, foobar");
21
22 UNIT_ASSERT_EQUAL(Join('#', 0, "a", "foobar", -1.4, TStringBuf("aaa")), "0#a#foobar#-1.4#aaa");
23 UNIT_ASSERT_EQUAL(Join("", "", ""), "");
24 UNIT_ASSERT_EQUAL(Join("", "a", "b", "c"), "abc");
25 UNIT_ASSERT_EQUAL(Join("", "a", "b", "", "c"), "abc");
26 UNIT_ASSERT_EQUAL(Join(" ", "a", "b", "", "c"), "a b c");
27 }
28
29 Y_UNIT_TEST(IntContainerItems) {
30 int v[] = {1, 2, 3};

Callers

nothing calls this directly

Calls 7

JoinSeqFunction · 0.85
MakeRangeJoinerFunction · 0.85
JoinFunction · 0.70
JoinRangeFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
StrMethod · 0.45

Tested by

no test coverage detected