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
5 : correct-endian ( obj -- ? )
6 code>> little-endian? [ utf16le = ] [ utf16be = ] if ;
8 { t } [ B{ } utf16n <byte-reader> correct-endian ] unit-test
9 { t } [ utf16n <byte-writer> correct-endian ] unit-test