diff options
author | bd <bdunahu@operationnull.com> | 2024-05-18 19:12:47 -0600 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2024-05-18 19:12:47 -0600 |
commit | f6d333ef67fa2c9c199d4c401322fc31d90867da (patch) | |
tree | a97b33ec3f7bbac6b5174cbb30cf8f93ad19c885 /palindrome/palindrome-test.scm | |
parent | 05a303de6c8cf8e8acb00b2107f7a66c363140b3 (diff) |
Adapt palindrome into a ttd approach
Diffstat (limited to 'palindrome/palindrome-test.scm')
-rw-r--r-- | palindrome/palindrome-test.scm | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/palindrome/palindrome-test.scm b/palindrome/palindrome-test.scm new file mode 100644 index 0000000..4109154 --- /dev/null +++ b/palindrome/palindrome-test.scm @@ -0,0 +1,33 @@ +(use-modules (srfi srfi-64) + (palindrome)) + +(test-begin "harness") + + +(test-equal "test-not-palindrome" + #f + (palindrome? "palindrome")) + +(test-equal "test-is-palindrome" + #t + (palindrome? "racecar")) + +(test-equal "test-not-palindrome-bad-casing" + #f + (palindrome? "paLINDROMe")) + +(test-equal "test-palindrome-bad-casing" + #t + (palindrome? "raCECAr")) + +(test-equal "test-pp-not-palindrome" + "String paLINDROMe is not a palindrome!\n" + (pp "paLINDROMe")) + + +(test-equal "test-pp-palindrome" + "String raCECAr is a palindrome!\n" + (pp "raCECAr")) + + +(test-end "harness") |