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