factor/basis/io/encodings/utf16n/utf16n-tests.factor

10 lines
324 B
Factor
Raw Normal View History

2008-12-09 05:22:24 -05:00
USING: accessors alien.c-types kernel
io.encodings.utf16 io.streams.byte-array tools.test ;
2008-12-09 04:22:38 -05:00
IN: io.encodings.utf16n
2009-03-23 01:34:02 -04:00
: correct-endian ( obj -- ? )
2008-12-09 04:22:38 -05:00
code>> little-endian? [ utf16le = ] [ utf16be = ] if ;
[ t ] [ B{ } utf16n <byte-reader> correct-endian ] unit-test
[ t ] [ utf16n <byte-writer> correct-endian ] unit-test