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

Method CheckTryOK

util/string/cast_ut.cpp:70–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68
69 template <class B>
70 inline void CheckTryOK(B v) {
71 static const A defaultV = 42;
72 A convV;
73 UNIT_ASSERT_VALUES_EQUAL(TryFromString<A>(ToString(v), convV), true); // char
74 UNIT_ASSERT_VALUES_EQUAL(v, convV);
75 UNIT_ASSERT_VALUES_EQUAL(TryFromString<A>(ToWtring(v), convV), true); // wide char
76 UNIT_ASSERT_VALUES_EQUAL(v, convV);
77
78 TRY_HEX_MACROS_MAP(TRY_OK_HEX_CHECK, A, v, convV, defaultV);
79 }
80
81 template <class B>
82 inline void CheckTryFail(B v) {

Callers

nothing calls this directly

Calls 2

ToWtringFunction · 0.85
ToStringFunction · 0.70

Tested by

no test coverage detected