add bin tests

This commit is contained in:
Memo 2022-04-22 18:59:55 +08:00
parent 143b67a790
commit 523f33d57d
3 changed files with 60 additions and 15 deletions

View File

@ -0,0 +1,30 @@
174876E800
174876E800
64
9C
64
FF9C
64
FFFFFF9C
64
FFFFFFFFFFFFFF9C
174876E800
174876E800
174876E800
FFFFFFFFFFFFFFFFFFFFFFE8B7891800
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE8B7891800
0001011101001000011101101110100000000000
0001011101001000011101101110100000000000
01100100
10011100
01100100
1111111110011100
01100100
11111111111111111111111110011100
01100100
1111111111111111111111111111111111111111111111111111111110011100
0001011101001000011101101110100000000000
0001011101001000011101101110100000000000
0001011101001000011101101110100000000000
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110100010110111100010010001100000000000
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110100010110111100010010001100000000000

View File

@ -28,3 +28,33 @@ SELECT hex(toInt128(-100000000000)) AS res;
SELECT hex(toInt256(-100000000000)) AS res;
SELECT bin(toUInt128(100000000000)) AS res;
SELECT bin(toUInt256(100000000000)) AS res;
SELECT bin(toInt8(100)) AS res;
SELECT bin(toInt8(-100)) AS res;
SELECT bin(toInt16(100)) AS res;
SELECT bin(toInt16(-100)) AS res;
SELECT bin(toInt32(100)) AS res;
SELECT bin(toInt32(-100)) AS res;
SELECT bin(toInt64(100)) AS res;
SELECT bin(toInt64(-100)) AS res;
SELECT bin(toInt128(100000000000)) AS res;
SELECT bin(toInt128(100000000000)) AS res;
SELECT bin(toInt256(100000000000)) AS res;
SELECT bin(toInt128(-100000000000)) AS res;
SELECT bin(toInt256(-100000000000)) AS res;

View File

@ -1,15 +0,0 @@
174876E800
174876E800
64
9C
64
FF9C
64
FFFFFF9C
64
FFFFFFFFFFFFFF9C
174876E800
174876E800
174876E800
FFFFFFFFFFFFFFFFFFFFFFE8B7891800
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE8B7891800