#include #include #include using namespace DB; GTEST_TEST(WideInteger, Tests) { ASSERT_EQ(toString(UInt128(12345678901234567890ULL)), "12345678901234567890"); ASSERT_EQ(toString(UInt256(12345678901234567890ULL)), "12345678901234567890"); ASSERT_EQ(toString(Int128(-1234567890123456789LL)), "-1234567890123456789"); ASSERT_EQ(toString(Int256(-1234567890123456789LL)), "-1234567890123456789"); ASSERT_EQ(UInt64(UInt128(12345678901234567890ULL)), 12345678901234567890ULL); ASSERT_EQ(UInt64(UInt256(12345678901234567890ULL)), 12345678901234567890ULL); ASSERT_EQ(__uint128_t(UInt128(12345678901234567890ULL)), 12345678901234567890ULL); ASSERT_EQ(__uint128_t(UInt256(12345678901234567890ULL)), 12345678901234567890ULL); ASSERT_EQ(toString(Int256(-1)), "-1"); }