base64/32/85: adding tests for all byte values.
parent
d89d4590ab
commit
fa1f9aa5a0
|
@ -1,5 +1,7 @@
|
||||||
USING: base64 io.encodings.ascii io.encodings.string kernel
|
USING: base64 byte-arrays io.encodings.ascii io.encodings.string
|
||||||
sequences splitting strings tools.test ;
|
kernel sequences splitting strings tools.test ;
|
||||||
|
|
||||||
|
{ t } [ 256 <iota> >byte-array dup >base64 base64> = ] unit-test
|
||||||
|
|
||||||
{ "abcdefghijklmnopqrstuvwxyz" } [ "abcdefghijklmnopqrstuvwxyz" ascii encode >base64 base64> ascii decode
|
{ "abcdefghijklmnopqrstuvwxyz" } [ "abcdefghijklmnopqrstuvwxyz" ascii encode >base64 base64> ascii decode
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
! Copyright (C) 2019 John Benediktsson
|
! Copyright (C) 2019 John Benediktsson
|
||||||
! See http://factorcode.org/license.txt for BSD license
|
! See http://factorcode.org/license.txt for BSD license
|
||||||
|
|
||||||
USING: base32 sequences tools.test ;
|
USING: base32 byte-arrays kernel sequences tools.test ;
|
||||||
|
|
||||||
|
{ t } [ 256 <iota> >byte-array dup >base32 base32> = ] unit-test
|
||||||
|
|
||||||
{ B{ } } [ f >base32 ] unit-test
|
{ B{ } } [ f >base32 ] unit-test
|
||||||
{ B{ } } [ B{ } >base32 ] unit-test
|
{ B{ } } [ B{ } >base32 ] unit-test
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
USING: base85 kernel strings tools.test ;
|
USING: base85 byte-arrays kernel sequences strings tools.test ;
|
||||||
|
|
||||||
{ t } [ "Hello, world" dup >base85 base85> >string = ] unit-test
|
{ t } [ 256 <iota> >byte-array dup >base85 base85> = ] unit-test
|
||||||
{ t } [ "ready" dup >base85 base85> >string = ] unit-test
|
|
||||||
|
|
||||||
{ "NM!" } [ "He" >base85 >string ] unit-test
|
{ "NM!" } [ "He" >base85 >string ] unit-test
|
||||||
{ t } [ "He" dup >base85 base85> >string = ] unit-test
|
{ t } [ "He" dup >base85 base85> >string = ] unit-test
|
||||||
|
|
Loading…
Reference in New Issue