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

Function Y_UNIT_TEST

library/cpp/getopt/ut/wrap.cpp:6–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4
5Y_UNIT_TEST_SUITE(Wrap) {
6 Y_UNIT_TEST(TestWrapping) {
7 UNIT_ASSERT_STRINGS_EQUAL(
8 NLastGetopt::Wrap(5, "a b c d eeffeff").Quote(),
9 TString("a b c\nd\neeffeff").Quote()
10 );
11
12 UNIT_ASSERT_STRINGS_EQUAL(
13 NLastGetopt::Wrap(5, "a b\nc d\neeffeff").Quote(),
14 TString("a b\nc d\neeffeff").Quote()
15 );
16
17 UNIT_ASSERT_STRINGS_EQUAL(
18 NLastGetopt::Wrap(5, "a b\n c d\neeffeff").Quote(),
19 TString("a b\n c\nd\neeffeff").Quote()
20 );
21
22 UNIT_ASSERT_STRINGS_EQUAL(
23 NLastGetopt::Wrap(5, "a b\nx c d\neeffeff").Quote(),
24 TString("a b\nx\nc d\neeffeff").Quote()
25 );
26
27 UNIT_ASSERT_STRINGS_EQUAL(
28 NLastGetopt::Wrap(5, "a b\nx \n c d\neeffeff").Quote(),
29 TString("a b\nx\n c\nd\neeffeff").Quote()
30 );
31
32 UNIT_ASSERT_STRINGS_EQUAL(
33 NLastGetopt::Wrap(5, "a b\nx \n c d\neeffeff").Quote(),
34 TString("a b\nx\n c\nd\neeffeff").Quote()
35 );
36 }
37
38 Y_UNIT_TEST(TestWrappingIndent) {
39 UNIT_ASSERT_STRINGS_EQUAL(

Callers

nothing calls this directly

Calls 1

WrapFunction · 0.50

Tested by

no test coverage detected