]> gitweb.factorcode.org Git - factor.git/blob - core/io/encodings/utf16n/utf16n-tests.factor
c76e090ae925b4a46d9feabb19744da6fcba8e35
[factor.git] / core / io / encodings / utf16n / utf16n-tests.factor
1 USING: accessors alien.data io.encodings.utf16
2 io.encodings.utf16n io.streams.byte-array kernel tools.test ;
3 IN: io.encodings.utf16n.tests
4
5 : correct-endian ( obj -- ? )
6     code>> little-endian? [ utf16le = ] [ utf16be = ] if ;
7
8 { t } [ B{ } utf16n <byte-reader> correct-endian ] unit-test
9 { t } [ utf16n <byte-writer> correct-endian ] unit-test