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

Method TestVariantImpl

util/ysaveload_ut.cpp:594–601  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

592
593 template <class TVariant, class T>
594 void TestVariantImpl(TVariant& v, const T& expected) {
595 v = expected;
596
597 TBufferStream s;
598 ::Save(&s, v);
599 ::Load(&s, v);
600 UNIT_ASSERT_VALUES_EQUAL(std::get<T>(v), expected);
601 }
602
603 void TestVariant() {
604 std::variant<int, bool, TString, TVector<char>> v(1);

Callers

nothing calls this directly

Calls 2

SaveFunction · 0.70
LoadFunction · 0.70

Tested by

no test coverage detected