Created
March 9, 2017 09:21
-
-
Save alextanhongpin/27f7cd910696e464c5cf967585f8028d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package isogram | |
import ( | |
"testing" | |
) | |
// booB #2nd order isogram | |
// Caucasus # 2nd order isogram | |
// geggee # 3rd order | |
func TestIsIsogram(t *testing.T) { | |
output := IsIsogram("Dermatoglyphics") | |
if output != true { | |
t.Errorf("Result was incorrect, got: %t, want: %t.", output, true) | |
} | |
} | |
func TestSecondOrderIsogram(t *testing.T) { | |
output := IsIsogram("booB") | |
if output != true { | |
t.Errorf("Result was incorrect, got: %t, want: %t.", output, true) | |
} | |
output = IsIsogram("Caucasus") | |
if output != true { | |
t.Errorf("Result was incorrect, got: %t, want: %t.", output, true) | |
} | |
} | |
func TestThirdOrderIsogram(t *testing.T) { | |
output := IsIsogram("geggee") | |
if output != true { | |
t.Errorf("Result was incorrect, got: %t, want: %t.", output, true) | |
} | |
} | |
func TestIsNotIsogram(t *testing.T) { | |
output := IsIsogram("aba") | |
if output != false { | |
t.Errorf("Result was incorrect, got: %t, want: %t.", output, false) | |
} | |
output = IsIsogram("moOse") | |
if output != false { | |
t.Errorf("Result was incorrect, got: %t, want: %t.", output, false) | |
} | |
output = IsIsogram("booBsB") | |
if output != false { | |
t.Errorf("Result was incorrect, got: %t, want: %t.", output, false) | |
} | |
output = IsIsogram("vexes") | |
if output != false { | |
t.Errorf("Result was incorrect, got: %t, want: %t.", output, false) | |
} | |
output = IsIsogram("MOose") | |
if output != false { | |
t.Errorf("Result was incorrect, got: %t, want: %t.", output, false) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment