Test a function: Difference between revisions
Content added Content deleted
m (Ada: Fix link to AUnit, add link to Trendy Test) |
(Add Tailspin solution) |
||
Line 2,343: | Line 2,343: | ||
} |
} |
||
}</lang> |
}</lang> |
||
=={{header|Tailspin}}== |
|||
<lang tailspin> |
|||
templates palindrome |
|||
[$...] -> # |
|||
when <=$(last..first:-1)> do '$...;' ! |
|||
end palindrome |
|||
test 'palindrome filter' |
|||
assert 'rotor' -> palindrome <='rotor'> 'rotor is a palindrome' |
|||
assert ['rosetta' -> palindrome] <=[]> 'rosetta is not a palindrome' |
|||
end 'palindrome filter' |
|||
</lang> |
|||
=={{header|Tcl}}== |
=={{header|Tcl}}== |