Files
go-ci-lab/calculator_test.go
24_OskinEA 7fc099b286
All checks were successful
Go CI / lint (push) Successful in 1m49s
Go CI / test (push) Successful in 9s
Go CI / build (push) Successful in 9s
add gitea ci workflow
2026-05-17 21:40:13 +03:00

25 lines
404 B
Go

package calculator
import "testing"
func TestAdd(t *testing.T) {
result := Add(2, 3)
if result != 5 {
t.Errorf("expected 5, got %d", result)
}
}
func TestSubtract(t *testing.T) {
result := Subtract(5, 3)
if result != 2 {
t.Errorf("expected 2, got %d", result)
}
}
func TestMultiply(t *testing.T) {
result := Multiply(4, 3)
if result != 12 {
t.Errorf("expected 12, got %d", result)
}
}