From 10642047e683623d8e94fba7423cd26b12016151 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Thu, 2 Aug 2012 15:24:31 -0700 Subject: [PATCH] adding some tests for the recent integer>fixnum fix. --- core/byte-arrays/byte-arrays-tests.factor | 5 ++++- core/sbufs/sbufs-tests.factor | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/byte-arrays/byte-arrays-tests.factor b/core/byte-arrays/byte-arrays-tests.factor index e28083b2db..b6ee62f99f 100644 --- a/core/byte-arrays/byte-arrays-tests.factor +++ b/core/byte-arrays/byte-arrays-tests.factor @@ -14,4 +14,7 @@ IN: byte-arrays.tests [ B{ 123 } ] [ 123 0 B{ 0 } [ set-nth ] keep ] unit-test -[ 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 + +[ 1.5 B{ 1 2 3 } nth-unsafe ] must-fail +[ 0 1.5 B{ 1 2 3 } set-nth-unsafe ] must-fail diff --git a/core/sbufs/sbufs-tests.factor b/core/sbufs/sbufs-tests.factor index 9c2bcaeb6e..f7c9d82c46 100644 --- a/core/sbufs/sbufs-tests.factor +++ b/core/sbufs/sbufs-tests.factor @@ -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