]> gitweb.factorcode.org Git - factor.git/blob - basis/io/encodings/string/string-tests.factor
factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!
[factor.git] / basis / io / encodings / string / string-tests.factor
1 ! Copyright (C) 2008 Daniel Ehrenberg.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: strings io.encodings.utf8 io.encodings.utf16
4 io.encodings.string tools.test io.encodings.binary ;
5 IN: io.encodings.string.tests
6
7 { "hello" } [ "hello" utf8 decode ] unit-test
8 { B{ 0 1 22 255 } } [ B{ 0 1 22 255 } binary decode ] unit-test
9 { "he" } [ "\0h\0e" utf16be decode ] unit-test
10
11 { "hello" } [ "hello" utf8 encode >string ] unit-test
12 { "\0h\0e" } [ "he" utf16be encode >string ] unit-test