]> gitweb.factorcode.org Git - factor.git/commitdiff
strings: a few more peace-of-mind tests setting out-of-range code points in strings
authorJoe Groff <arcata@gmail.com>
Wed, 20 Jul 2011 20:52:42 +0000 (13:52 -0700)
committerJoe Groff <arcata@gmail.com>
Wed, 20 Jul 2011 20:52:42 +0000 (13:52 -0700)
core/strings/strings-tests.factor

index bebdb328206d2a5ab377b10d80d8b7738ba90b5c..869543fc0a2cbd71bb463837702ab7840ca5cac0 100644 (file)
@@ -67,6 +67,10 @@ unit-test
 [ ] [ HEX: 4321 3 "s" get set-nth ] unit-test
 [ ] [ HEX: 654321 5 "s" get set-nth ] unit-test
 
+[ ] [ HEX: -1 5 "s" get set-nth ] unit-test
+[ ] [ HEX: 80,0000 5 "s" get set-nth ] unit-test
+[ ] [ HEX: 100,0000 5 "s" get set-nth ] unit-test
+
 [
     {
         CHAR: h
@@ -121,5 +125,3 @@ unit-test
         [ <string> clone resize-string first ] keep =
     ] all-integers?
 ] unit-test
-
-[ HEX: 7fffff ] [ { -1 } >string first ] unit-test