]> gitweb.factorcode.org Git - factor.git/commitdiff
adding some tests for the recent integer>fixnum fix.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 2 Aug 2012 22:24:31 +0000 (15:24 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 2 Aug 2012 22:24:31 +0000 (15:24 -0700)
core/byte-arrays/byte-arrays-tests.factor
core/sbufs/sbufs-tests.factor

index e28083b2dbf5a21a39f089224e261994479bcd13..b6ee62f99f2388874d2d0a1c92a470cf8cb6a6e4 100644 (file)
@@ -14,4 +14,7 @@ IN: byte-arrays.tests
 \r
 [ B{ 123 } ] [ 123 0 B{ 0 } [ set-nth ] keep ] unit-test\r
 \r
-[ B{ 123 } ] [ 123 >bignum 0 B{ 0 } [ set-nth ] keep ] unit-test
\ No newline at end of file
+[ B{ 123 } ] [ 123 >bignum 0 B{ 0 } [ set-nth ] keep ] unit-test\r
+\r
+[ 1.5 B{ 1 2 3 } nth-unsafe ] must-fail\r
+[ 0 1.5 B{ 1 2 3 } set-nth-unsafe ] must-fail\r
index 9c2bcaeb6e2b3b21c702cc48c6d2b1065dc98911..f7c9d82c4610c6440a3497da9a64dcb5ecb3129d 100644 (file)
@@ -22,3 +22,7 @@ IN: sbufs.tests
 [ fixnum ] [ 1 >bignum SBUF" " new-sequence length class-of ] unit-test
 
 [ fixnum ] [ 1 >bignum iota [ ] SBUF" " map-as length class-of ] unit-test
+
+[ 1.5 SBUF" " new-sequence ] must-fail
+
+[ CHAR: A 0.5 0.5 SBUF" a" set-nth-unsafe ] must-fail