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

Method c_str

util/generic/string_ut.cpp:257–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255 }
256
257 void c_str() {
258 TStringType low(Data_._2004_01_01());
259 TStringType xx;
260 TStringType yy;
261
262 // ISO-IEC-14882:1998(E), 21.3.6, paragraph 1
263 UNIT_ASSERT(*(yy.c_str()) == 0);
264
265 // Blocks A and B should follow each other.
266 // Block A:
267 xx = Data_._123456();
268 xx += low;
269 UNIT_ASSERT(xx.c_str() == TView(Data_._1234562004_01_01()));
270 // End of block A
271
272 // Block B:
273 xx = Data_._1234();
274 xx += Data_._5();
275 UNIT_ASSERT(xx.c_str() == TView(Data_._12345()));
276 // End of block B
277 }
278
279 void null_char_of_empty() {
280 const TStringType s;

Callers 14

TestConstructorsMethod · 0.45
TestRefCountMethod · 0.45
TestFuncsMethod · 0.45
c_strFunction · 0.45
insertMethod · 0.45
resizeMethod · 0.45
replaceMethod · 0.45
TestDecodingMethodsMethod · 0.45
TestDecodingMethodsMethod · 0.45
Y_UNIT_TESTFunction · 0.45
ComparePointersFunction · 0.45

Calls 6

_2004_01_01Method · 0.80
_123456Method · 0.80
_1234562004_01_01Method · 0.80
_1234Method · 0.80
_5Method · 0.80
_12345Method · 0.80

Tested by 7

TestConstructorsMethod · 0.36
TestRefCountMethod · 0.36
TestFuncsMethod · 0.36
TestDecodingMethodsMethod · 0.36
TestDecodingMethodsMethod · 0.36
TestHMap1Method · 0.36