about summary refs log tree commit diff
path: root/main/subtractions/subtractions_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'main/subtractions/subtractions_test.go')
-rw-r--r--main/subtractions/subtractions_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/main/subtractions/subtractions_test.go b/main/subtractions/subtractions_test.go
new file mode 100644
index 0000000..eaf49e1
--- /dev/null
+++ b/main/subtractions/subtractions_test.go
@@ -0,0 +1,19 @@
+package subtractions
+
+import "testing"
+
+func Test_SubtractNumbers(t *testing.T) {
+	ans := subtractNumbers(10, 7)
+
+	if ans != 3 {
+		t.Fatal("Expected 3 but got ", ans)
+	}
+}
+
+func Test_SubtractNumbers2(t *testing.T) {
+	ans := subtractNumbers(10, 6)
+
+	if ans != 4 {
+		t.Fatal("Expected 4 but got ", ans)
+	}
+}