Test a function: Difference between revisions
Content added Content deleted
m (→{{header|Phix}}: better descs) |
|||
Line 1,476: | Line 1,476: | ||
set_test_module("palindromes") -- (optional, w/o first line is omitted) |
set_test_module("palindromes") -- (optional, w/o first line is omitted) |
||
test_true(is_palindrome("abba")," |
test_true(is_palindrome("abba"),"abba") |
||
test_true(is_palindrome("abba")) |
test_true(is_palindrome("abba")) -- (no desc makes success hidden...) |
||
-- (...and failure somewhat laconic) |
|||
test_false(is_palindrome("abc"),"not |
test_false(is_palindrome("abc"),"not abc") |
||
test_true(is_palindrome("failure")," |
test_true(is_palindrome("failure"),"failure") |
||
test_summary()</lang> |
test_summary()</lang> |
||
Line 1,487: | Line 1,487: | ||
<pre> |
<pre> |
||
palindromes: |
palindromes: |
||
passed: |
passed: abba |
||
passed: not |
passed: not abc |
||
failed: |
failed: failure |
||
4 tests run, 3 passed, 1 failed, 75% success |
4 tests run, 3 passed, 1 failed, 75% success |