RosettaCodeData/Task/Test-a-function/J/test-a-function-1.j
Ingy döt Net 68f8f3e56b all tasks
2013-04-11 01:07:29 -07:00

16 lines
341 B
Text

NB. Contents of palindrome_test.ijs
NB. Basic testing
test_palinA=: monad define
assert isPalin0 'abcba'
assert isPalin0 'aa'
assert isPalin0 ''
assert -. isPalin0 'ab'
assert -. isPalin0 'abcdba'
)
NB. Can test for expected failure instead
palinB_expect=: 'assertion failure'
test_palinB=: monad define
assert isPalin0 'ab'
)