From dd86ba6387b098b9c2f7fd568863cf86e938cb45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=81=A3?= <⁣> Date: Sun, 17 May 2020 11:50:44 +0200 Subject: [PATCH] Fix mistakes --- go/tests/printnbr_test/main.go | 6 +++++- go/tests/printstr_test/main.go | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/go/tests/printnbr_test/main.go b/go/tests/printnbr_test/main.go index d8f929351..a98b05726 100644 --- a/go/tests/printnbr_test/main.go +++ b/go/tests/printnbr_test/main.go @@ -8,6 +8,10 @@ import ( "lib" ) +func printNbr(n int) { + fmt.Print(n) +} + func main() { table := append(lib.MultRandInt(), lib.MinInt, @@ -15,6 +19,6 @@ func main() { 0, ) for _, arg := range table { - lib.Challenge("PrintNbr", student.PrintNbr, fmt.Print, arg) + lib.Challenge("PrintNbr", student.PrintNbr, printNbr, arg) } } diff --git a/go/tests/printstr_test/main.go b/go/tests/printstr_test/main.go index cc59ddf7b..13fc85d11 100644 --- a/go/tests/printstr_test/main.go +++ b/go/tests/printstr_test/main.go @@ -8,9 +8,13 @@ import ( "lib" ) +func printStr(s string) { + fmt.Print(s) +} + func main() { table := append(lib.MultRandASCII(), "Hello World!") for _, arg := range table { - lib.Challenge("PrintStr", student.PrintStr, fmt.Print, arg) + lib.Challenge("PrintStr", student.PrintStr, printStr, arg) } }