diff --git a/unit-testing/main_test.go b/unit-testing/main_test.go new file mode 100644 index 0000000..dda2a8d --- /dev/null +++ b/unit-testing/main_test.go @@ -0,0 +1,14 @@ +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) + } +}