Test a function: Difference between revisions

→‎{{header|Wren}}: Improved output.
(Added Wren)
(→‎{{header|Wren}}: Improved output.)
Line 2,215:
 
var TestPal = Suite.new("Pal") { |it|
it.suite("'isPal' function:") { |it|
for (i in 0...words.count) {
it.should("return true'%(expected[i])' iffor its argument'%(words[i])' is a palindrome, false otherwise") {
Expect.call(isPal.call(words[i])).toEqual(expected[i])
}
Line 2,230:
{{out}}
<pre>
Palindromes:
Pal
'isPal' function:
✓ should return 'true' iffor its argument'rotor' is a palindrome, false otherwise
✓ should return true'false' iffor its argument'rosetta' is a palindrome, false otherwise
✓ should return 'true' iffor its'step argumenton no pets' is a palindrome, false otherwise
✓ should return 'true' iffor its argument'été' is a palindrome, false otherwise
✓ should return true'false' iffor its argument'wren' is a palindrome, false otherwise
✓ should return 'true' iffor its argument'🦊😀🦊' is a palindrome, false otherwise
 
 
9,477

edits