diff --git a/test/unit/int_conv_test.cpp b/test/unit/int_conv_test.cpp index 795c358..5f2086b 100644 --- a/test/unit/int_conv_test.cpp +++ b/test/unit/int_conv_test.cpp @@ -89,4 +89,12 @@ TEST_CASE ("Check int to char array conversions", "[s2i][int_conv]") { CHECK(to_string_view(int_to_ary(0b11111111)) == "11111111"); CHECK(to_string_view(int_to_ary(0b111100001111)) == "111100001111"); CHECK(to_string_view(int_to_ary(0b111100001111)) == "111100001111"); + CHECK(to_string_view(int_to_ary(9223372036854775807)) == "1y2p0ij32e8e7"); + CHECK(to_string_view(int_to_ary(0x8000000000000001)) == "1y2p0ij32e8e9"); +#if defined(__GNUC__) + __int128_t num = 10000000000000000000U; + CHECK(to_string_view(int_to_ary<__int128_t, 10>(num * 100)) == "1000000000000000000000"); + num = 0xFFFFFFFFFFFFFFFF; + CHECK(to_string_view(int_to_ary<__int128_t, 16>(num * 0x10000 + 0xffff)) == "ffffffffffffffffffff"); +#endif }