test-go-project/main_test.go

9 lines
141 B
Go

package main
import "testing"
func TestAdd(t *testing.T) {
if got := Add(2, 3); got != 5 {
t.Errorf("Add(2, 3) = %d, want 5", got)
}
}