Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package word
- import "testing"
- func TestPalindrome(t *testing.T) {
- if !IsPalindrome("detartrated") {
- t.Error(`IsPalindrome("detartrated") = false`)
- }
- if !IsPalindrome("kayak") {
- t.Error(`IsPalindrome("kayak") = false`)
- }
- }
- func TestNonPalindrome(t *testing.T) {
- if IsPalindrome("palindrome") {
- t.Error(`IsPalindrome("palindrome") = true`)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement