1 USING: accessors alien.c-types alien.data kernel
2 io.encodings.utf16 io.streams.byte-array tools.test ;
3 IN: io.encodings.utf16n
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