Created
June 3, 2019 06:36
-
-
Save adilw3nomad/dd8263799da965f8068eba6f0d110cd8 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
go | |
func TestCheckAnswer(t *testing.T) { | |
gotCorrect := CheckAnswer(“3”, “3”) | |
if gotCorrect != “Correct! Well done” { | |
t.Errorf(“CheckAnswer = %v; want ‘Correct! Well Done’”, gotCorrect) | |
} | |
gotIncorrect := CheckAnswer(“3”, “2”) | |
if gotIncorrect != “WRONG! Answer is: 2” { | |
t.Errorf(“CheckAnswer = %v; want ‘WRONG! Answer is: 2’”, gotIncorrect) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment