13 lines
184 B
Go
13 lines
184 B
Go
package integers
|
|
|
|
import "testing"
|
|
|
|
func TestAdder(t *testing.T) {
|
|
sum := Add(2, 2)
|
|
expected := 4
|
|
|
|
if sum != expected {
|
|
t.Errorf("expected '%d' but got '%d'", expected, sum)
|
|
}
|
|
}
|