Commit 4dfd9d89 authored by David Paul's avatar David Paul
Browse files

Add test to recursive exercise to ensure recursive result is actually used

parent 9a2e8f98
......@@ -78,9 +78,10 @@ exercise.tests = [Test("a", "Enter a word/phrase to check: a\na is a palindrome\
Test("anna", "Enter a word/phrase to check: anna\nanna is a palindrome\n", "anna"),
Test("banana", "Enter a word/phrase to check: banana\nbanana is not a palindrome\n", "banana"),
Test("racecar", "Enter a word/phrase to check: racecar\nracecar is a palindrome\n", "racecar"),
Test("abca", "Enter a word/phrase to check: abca\nabca is not a palindrome\n", "abca"),
Test("Anna", "Enter a word/phrase to check: Anna\nAnna is not a palindrome\n", "Anna")]
exercise.checks = [Check("You should use len to check the length of the string", "len\\("),
Check("You need to make a recursive call to is_palindrome", "return(\\s)+(.)*is_palindrome\\("),
Check("You need to return a recursive call to is_palindrome", "return(\\s)+(.)*is_palindrome\\("),
Check("You need a base case in your recursive function", "return(\\s)+[^i][^s]")]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment