From 0aa029ba227a5ef944e207bb3a558a91f361572f Mon Sep 17 00:00:00 2001 From: 23_KorobovFD <23_KorobovFD@iux.local> Date: Sun, 17 May 2026 22:21:52 +0300 Subject: [PATCH] =?UTF-8?q?=D1=82=D0=B5=D1=81=D1=82=D1=8B=20=D1=81=20cover?= =?UTF-8?q?age?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- math/math_test.go | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 math/math_test.go 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