Skip to content

Instantly share code, notes, and snippets.

@developernaren
Created December 21, 2021 19:51
Show Gist options
  • Save developernaren/538d01b7c3c2b3d922609f4ec27ab54c to your computer and use it in GitHub Desktop.
Save developernaren/538d01b7c3c2b3d922609f4ec27ab54c to your computer and use it in GitHub Desktop.
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