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

Method TestMacroOverload

util/generic/yexception_ut.cpp:324–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322 }
323
324 void TestMacroOverload() {
325 try {
326 Y_ENSURE(10 > 20);
327 } catch (const yexception& e) {
328 UNIT_ASSERT(e.AsStrBuf().Contains("10 > 20"));
329 }
330
331 try {
332 Y_ENSURE(10 > 20, "exception message to search for");
333 } catch (const yexception& e) {
334 UNIT_ASSERT(e.AsStrBuf().Contains("exception message to search for"));
335 }
336
337 try {
338 NOuter::NInner::Compare10And20();
339 } catch (const yexception& e) {
340 UNIT_ASSERT(e.AsStrBuf().Contains("10 > 20"));
341 }
342 }
343
344 void TestMessageCrop() {
345 TTempBuf tmp;

Callers

nothing calls this directly

Calls 3

Compare10And20Function · 0.85
AsStrBufMethod · 0.80
ContainsMethod · 0.45

Tested by

no test coverage detected