serialize, io.streams.byte-array: fix unit tests for utf8 encoding strictness
							parent
							
								
									06f4934571
								
							
						
					
					
						commit
						261e55a918
					
				| 
						 | 
				
			
			@ -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 }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue