diff options
Diffstat (limited to 'exercises')
-rw-r--r-- | exercises/if/if1/main_test.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/exercises/if/if1/main_test.go b/exercises/if/if1/main_test.go new file mode 100644 index 0000000..589cf7f --- /dev/null +++ b/exercises/if/if1/main_test.go @@ -0,0 +1,25 @@ +// if1 +// Make me compile! + +// I AM NOT DONE +package main_test + +import "testing" + +func bigger(a int, b int) int { + // Complete this function to return the bigger number + // Use only if statements + return 0 +} + +func TestTwoIsBiggerThanOne(t *testing.T) { + if bigger(2, 1) != 2 { + t.Errorf("2 is bigger than 1") + } +} + +func TestTenIsBiggerThanFive(t *testing.T) { + if bigger(5, 10) != 10 { + t.Errorf("10 is bigger than 5") + } +} |