Created
December 21, 2021 19:51
-
-
Save developernaren/538d01b7c3c2b3d922609f4ec27ab54c 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 add | |
import ( | |
"fmt" | |
"testing" | |
) | |
func TestAdd(t *testing.T) { | |
expected := 5 | |
a := 2 | |
b := 3 | |
got := Add(a, b) | |
if got != expected { | |
panic(fmt.Sprintf("expected %d but got %d", expected, got)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment