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

Function TEST

library/cpp/yt/coding/unittests/zig_zag_ut.cpp:10–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8////////////////////////////////////////////////////////////////////////////////
9
10TEST(TZigZagTest, Encode32)
11{
12 EXPECT_EQ(0u, ZigZagEncode32( 0));
13 EXPECT_EQ(1u, ZigZagEncode32(-1));
14 EXPECT_EQ(2u, ZigZagEncode32( 1));
15 EXPECT_EQ(3u, ZigZagEncode32(-2));
16 // ...
17 EXPECT_EQ(std::numeric_limits<ui32>::max() - 1, ZigZagEncode32(std::numeric_limits<i32>::max()));
18 EXPECT_EQ(std::numeric_limits<ui32>::max(), ZigZagEncode32(std::numeric_limits<i32>::min()));
19}
20
21TEST(TZigZagTest, Decode32)
22{

Callers

nothing calls this directly

Calls 6

ZigZagEncode32Function · 0.50
maxFunction · 0.50
minFunction · 0.50
ZigZagDecode32Function · 0.50
ZigZagEncode64Function · 0.50
ZigZagDecode64Function · 0.50

Tested by

no test coverage detected