diff --git a/math/math_test.go b/math/math_test.go new file mode 100644 index 0000000..506b952 --- /dev/null +++ b/math/math_test.go @@ -0,0 +1,27 @@ +package math + +import "testing" + +func TestAdd(t *testing.T) { + result := Add(2, 3) + expected := 5 + if result != expected { + t.Errorf("Add(2,3) = %d; want %d", result, expected) + } +} + +func TestSubtract(t *testing.T) { + result := Subtract(5, 2) + expected := 3 + if result != expected { + t.Errorf("Subtract(5,2) = %d; want %d", result, expected) + } +} + +func TestMultiply(t *testing.T) { + result := Multiply(4, 3) + expected := 12 + if result != expected { + t.Errorf("Multiply(4,3) = %d; want %d", result, expected) + } +} \ No newline at end of file