]> gitweb.factorcode.org Git - factor.git/commitdiff
serialize, io.streams.byte-array: fix unit tests for utf8 encoding strictness
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 26 Aug 2010 00:51:44 +0000 (17:51 -0700)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 26 Aug 2010 00:51:44 +0000 (17:51 -0700)
basis/serialize/serialize-tests.factor
core/io/streams/byte-array/byte-array-tests.factor

index 9213a54004973c236d4b88fbd357d0dcab46576d..639cc1e2b099c3d8181877a892f66aa27c5d2b8b 100644 (file)
@@ -45,7 +45,7 @@ CONSTANT: objects
         { 1 2 "three" }
         V{ 1 2 "three" }
         SBUF" hello world"
-        "hello \u123456 unicode"
+        "hello \u012345 unicode"
         \ dup
         [ \ dup dup ]
         T{ serialize-test f "a" 2 }
index 9772de6262b5d998e285943775352c946bc2ff26..1c7826719cd9eed9a583b98a9dd1ada4c5d2dd93 100644 (file)
@@ -11,7 +11,7 @@ IN: io.streams.byte-array.tests
 
 [ B{ BIN: 11110101 BIN: 10111111 BIN: 10000000 BIN: 10111111 BIN: 11101111 BIN: 10000000 BIN: 10111111 BIN: 11011111 BIN: 10000000 CHAR: x } ]
 [ { BIN: 101111111000000111111 BIN: 1111000000111111 BIN: 11111000000 CHAR: x } >string utf8 [ write ] with-byte-writer ] unit-test
-[ { BIN: 101111111000000111111 } t ] [ { BIN: 11110101 BIN: 10111111 BIN: 10000000 BIN: 10111111 } utf8 <byte-reader> stream-contents dup >array swap string? ] unit-test
+[ { BIN: 1111111000000111111 } t ] [ { BIN: 11110001 BIN: 10111111 BIN: 10000000 BIN: 10111111 } utf8 <byte-reader> stream-contents dup >array swap string? ] unit-test
 
 [ B{ 121 120 } 0 ] [
     B{ 0 121 120 0 0 0 0 0 0 } binary