golang-exercises/unit-testing/main_test.go

15 lines
182 B
Go
Raw Permalink Normal View History

2024-05-12 09:32:23 +02:00
package main
import (
"testing"
)
func TestGetSquareRoot(t *testing.T) {
got := getSquareRoot(49)
want := 7
if got != want {
t.Errorf("Got %v, wanted %v\n", got, want)
}
}