rosetta-code.balanced-brackets: adding some tests.

db4
John Benediktsson 2014-12-08 17:41:31 -08:00
parent 94f66ec0be
commit 17d12ffaea
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
USING: tools.test ;
IN: rosetta-code.balanced-brackets
{ t } [ "" balanced? ] unit-test
{ t } [ "[]" balanced? ] unit-test
{ t } [ "[][]" balanced? ] unit-test
{ t } [ "[[][]]" balanced? ] unit-test
{ f } [ "][" balanced? ] unit-test
{ f } [ "][][" balanced? ] unit-test
{ f } [ "[]][[]" balanced? ] unit-test
{ t } [ "abc[]def" balanced? ] unit-test
{ f } [ "abc][def" balanced? ] unit-test