Test a function: Difference between revisions

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

edits