From c98136caa8ff9db4e6087cef5ec86d513ee4967f Mon Sep 17 00:00:00 2001 From: raul Date: Sun, 12 May 2024 09:32:23 +0200 Subject: [PATCH] Add the actual test file --- unit-testing/main_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 unit-testing/main_test.go 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) + } +}