Browse Source

Fix mistakes

pull/533/head
5 years ago committed by xpetit
parent
commit
dd86ba6387
  1. 6
      go/tests/printnbr_test/main.go
  2. 6
      go/tests/printstr_test/main.go

6
go/tests/printnbr_test/main.go

@ -8,6 +8,10 @@ import (
"lib" "lib"
) )
func printNbr(n int) {
fmt.Print(n)
}
func main() { func main() {
table := append(lib.MultRandInt(), table := append(lib.MultRandInt(),
lib.MinInt, lib.MinInt,
@ -15,6 +19,6 @@ func main() {
0, 0,
) )
for _, arg := range table { for _, arg := range table {
lib.Challenge("PrintNbr", student.PrintNbr, fmt.Print, arg) lib.Challenge("PrintNbr", student.PrintNbr, printNbr, arg)
} }
} }

6
go/tests/printstr_test/main.go

@ -8,9 +8,13 @@ import (
"lib" "lib"
) )
func printStr(s string) {
fmt.Print(s)
}
func main() { func main() {
table := append(lib.MultRandASCII(), "Hello World!") table := append(lib.MultRandASCII(), "Hello World!")
for _, arg := range table { for _, arg := range table {
lib.Challenge("PrintStr", student.PrintStr, fmt.Print, arg) lib.Challenge("PrintStr", student.PrintStr, printStr, arg)
} }
} }

Loading…
Cancel
Save