Last active
December 20, 2015 10:31
-
-
Save fsouza/6116437 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 str | |
func Reverse(input string) string { | |
return "" | |
} |
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 str | |
import ( | |
"testing" | |
) | |
func TestReverse(t *testing.T) { | |
input := "AB" | |
output := Reverse(input) | |
expected := "BA" | |
if output != expected { | |
t.Errorf("Expected %s, got %s", expected, output) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Meu reverse https://gist.github.com/tulios/6117781