]> gitweb.factorcode.org Git - factor.git/commitdiff
leb128: test negative uled128
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 2 Sep 2023 19:11:56 +0000 (12:11 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 2 Sep 2023 19:11:56 +0000 (12:11 -0700)
extra/leb128/leb128-tests.factor

index 0e34b5ccf1790f5a574a46e37e905aad5160da8e..6d9f83442aead745fdc908dbd20d755cc3c22964 100644 (file)
@@ -1,6 +1,7 @@
 
-USING: leb128 tools.test ;
+USING: leb128 math tools.test ;
 
+[ -1 >uleb128 ] [ non-negative-number-expected? ] must-fail-with
 { B{ 0xe5 0x8e 0x26 } } [ 624485 >uleb128 ] unit-test
 { 624485 } [ B{ 0xe5 0x8e 0x26 } uleb128> ] unit-test
 { B{ 255 255 127 } } [ 0x1fffff >uleb128 ] unit-test