Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. package word
  2. import "testing"
  3.  
  4. func TestPalindrome(t *testing.T) {
  5. if !IsPalindrome("detartrated") {
  6. t.Error(`IsPalindrome("detartrated") = false`)
  7. }
  8. if !IsPalindrome("kayak") {
  9. t.Error(`IsPalindrome("kayak") = false`)
  10. }
  11. }
  12.  
  13. func TestNonPalindrome(t *testing.T) {
  14. if IsPalindrome("palindrome") {
  15. t.Error(`IsPalindrome("palindrome") = true`)
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement