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

Method Assert

library/cpp/json/ut/json_reader_fast_ut.cpp:150–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148 }
149
150 void Assert(const TEvents& e, TString str) {
151 try {
152 UNIT_ASSERT_VALUES_EQUAL_C(e.size(), Events.size(), str);
153
154 for (ui32 i = 0, sz = e.size(); i < sz; ++i) {
155 UNIT_ASSERT_VALUES_EQUAL_C((int)e[i].Type, (int)Events[i].Type, Sprintf("'%s' %u", str.data(), i));
156 UNIT_ASSERT_VALUES_EQUAL_C(e[i].INum, Events[i].INum, Sprintf("'%s' %u", str.data(), i));
157 UNIT_ASSERT_VALUES_EQUAL_C(e[i].DNum, Events[i].DNum, Sprintf("'%s' %u", str.data(), i));
158 UNIT_ASSERT_VALUES_EQUAL_C(e[i].Str, Events[i].Str, Sprintf("'%s' %u", str.data(), i));
159 }
160 } catch (const yexception&) {
161 Clog << "Exception at '" << str << "'" << Endl;
162 for (const auto& event : Events) {
163 Clog << event.ToString() << Endl;
164 }
165
166 throw;
167 }
168 }
169 };
170 } // namespace NTest
171} // namespace NJson

Callers 2

DoTestParseMethod · 0.45
TransformMethod · 0.45

Calls 4

SprintfFunction · 0.85
sizeMethod · 0.45
dataMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected