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

Method TestBack

util/generic/string_ut.h:1053–1065  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1051#endif
1052
1053 void TestBack() {
1054 const char_type chars[] = {'f', 'o', 'o', 0};
1055
1056 TStringType str = chars;
1057 const TStringType constStr = str;
1058
1059 UNIT_ASSERT_VALUES_EQUAL(constStr.back(), (ui8)'o');
1060 UNIT_ASSERT_VALUES_EQUAL(str.back(), (ui8)'o');
1061
1062 str.back() = 'r';
1063 UNIT_ASSERT_VALUES_EQUAL(constStr.back(), (ui8)'o');
1064 UNIT_ASSERT_VALUES_EQUAL(str.back(), (ui8)'r');
1065 }
1066
1067 void TestFront() {
1068 const char_type chars[] = {'f', 'o', 'o', 0};

Callers

nothing calls this directly

Calls 1

backMethod · 0.45

Tested by

no test coverage detected