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) } }