Browse Source

Pass exercise name as an argument (no more magic)

pull/533/head
Xavier Petit 5 years ago committed by xpetit
parent
commit
1e130c1dff
  1. 2
      tests/go/solutions/addprimesum/test_addprimesum.go
  2. 2
      tests/go/solutions/alphamirror/test_alphamirror.go
  3. 2
      tests/go/solutions/balancedstring/test_balancedstring.go
  4. 6
      tests/go/solutions/brackets/test_brackets.go
  5. 2
      tests/go/solutions/brainfuck/test_brainfuck.go
  6. 6
      tests/go/solutions/capitalizeprog/test_capitalizeprog.go
  7. 4
      tests/go/solutions/cleanstr/test_cleanstr.go
  8. 6
      tests/go/solutions/compareprog/test_compareprog.go
  9. 2
      tests/go/solutions/costumeprofit/test_costumeprofit.go
  10. 2
      tests/go/solutions/countdown/test_countdown.go
  11. 4
      tests/go/solutions/displaya/test_displaya.go
  12. 2
      tests/go/solutions/displayalpham/test_displayalpham.go
  13. 2
      tests/go/solutions/displayalrevm/test_displayalrevm.go
  14. 2
      tests/go/solutions/displayfirstparam/test_displayfirstparam.go
  15. 2
      tests/go/solutions/displaylastparam/test_displaylastparam.go
  16. 4
      tests/go/solutions/displayz/test_displayz.go
  17. 2
      tests/go/solutions/doopprog/test_doopprog.go
  18. 4
      tests/go/solutions/expandstr/test_expandstr.go
  19. 2
      tests/go/solutions/firstword/test_firstword.go
  20. 2
      tests/go/solutions/fprime/test_fprime.go
  21. 2
      tests/go/solutions/gcd/test_gcd.go
  22. 2
      tests/go/solutions/grouping/test_grouping.go
  23. 2
      tests/go/solutions/hello/test_hello.go
  24. 2
      tests/go/solutions/hiddenp/test_hiddenp.go
  25. 2
      tests/go/solutions/inter/test_inter.go
  26. 4
      tests/go/solutions/ispowerof2/test_ispowerof2.go
  27. 6
      tests/go/solutions/lastword/test_lastword.go
  28. 2
      tests/go/solutions/nenokku/test_nenokku.go
  29. 2
      tests/go/solutions/onlya/test_onlya.go
  30. 2
      tests/go/solutions/onlyz/test_onlyz.go
  31. 2
      tests/go/solutions/options/test_options.go
  32. 4
      tests/go/solutions/paramcount/test_paramcount.go
  33. 2
      tests/go/solutions/piglatin/test_piglatin.go
  34. 2
      tests/go/solutions/printalphabetprog/test_printalphabetprog.go
  35. 2
      tests/go/solutions/printbits/test_printbits.go
  36. 2
      tests/go/solutions/printchessboard/test_printchessboard.go
  37. 2
      tests/go/solutions/printcombprog/test_printcombprog.go
  38. 2
      tests/go/solutions/printdigitsprog/test_printdigitsprog.go
  39. 2
      tests/go/solutions/printhex/test_printhex.go
  40. 2
      tests/go/solutions/printrevcombprog/test_printrevcombprog.go
  41. 2
      tests/go/solutions/printreversealphabetprog/test_printreversealphabetprog.go
  42. 4
      tests/go/solutions/printstrprog/test_printstrprog.go
  43. 14
      tests/go/solutions/range/test_range.go
  44. 2
      tests/go/solutions/repeatalpha/test_repeatalpha.go
  45. 14
      tests/go/solutions/reverserange/test_reverserange.go
  46. 4
      tests/go/solutions/reversestrcap/test_reversestrcap.go
  47. 6
      tests/go/solutions/revwstr/test_revwstr.go
  48. 2
      tests/go/solutions/robottoorigin/test_robottoorigin.go
  49. 2
      tests/go/solutions/romannumbers/test_romannumbers.go
  50. 8
      tests/go/solutions/rostring/test_rostring.go
  51. 6
      tests/go/solutions/rot13/test_rot13.go
  52. 4
      tests/go/solutions/rot14prog/test_rot14prog.go
  53. 6
      tests/go/solutions/rpncalc/test_rpncalc.go
  54. 2
      tests/go/solutions/searchreplace/test_searchreplace.go
  55. 2
      tests/go/solutions/strrevprog/test_strrevprog.go
  56. 2
      tests/go/solutions/switchcase/test_switchcase.go
  57. 2
      tests/go/solutions/tabmult/test_tabmult.go
  58. 2
      tests/go/solutions/union/test_union.go
  59. 2
      tests/go/solutions/uniqueoccurences/test_uniqueoccurences.go
  60. 2
      tests/go/solutions/wdmatch/test_wdmatch.go
  61. 6
      tests/go/test_atoibaseprog.go
  62. 2
      tests/go/test_boolean.go
  63. 2
      tests/go/test_comcheck.go
  64. 2
      tests/go/test_displayfile.go
  65. 2
      tests/go/test_doop.go
  66. 2
      tests/go/test_fixthemain.go
  67. 14
      tests/go/test_flags.go
  68. 2
      tests/go/test_nbrconvertalpha.go
  69. 4
      tests/go/test_paramcount.go
  70. 2
      tests/go/test_pilot.go
  71. 2
      tests/go/test_point.go
  72. 2
      tests/go/test_printalphabet.go
  73. 2
      tests/go/test_printdigits.go
  74. 2
      tests/go/test_printparams.go
  75. 2
      tests/go/test_printreversealphabet.go
  76. 8
      tests/go/test_raid2.go
  77. 2
      tests/go/test_rectangle.go
  78. 2
      tests/go/test_revparams.go
  79. 14
      tests/go/test_rotatevowels.go
  80. 2
      tests/go/test_sortparams.go

2
tests/go/solutions/addprimesum/test_addprimesum.go

@ -49,6 +49,6 @@ func main() {
table = append(table, "1 2")
for _, s := range table {
z01.ChallengeMain(strings.Fields(s)...)
z01.ChallengeMain("addprimesum", strings.Fields(s)...)
}
}

2
tests/go/solutions/alphamirror/test_alphamirror.go

@ -14,6 +14,6 @@ func main() {
args := [][]string{arg1, arg2, arg3, arg4, arg5, arg6}
for _, v := range args {
z01.ChallengeMain(v...)
z01.ChallengeMain("alphamirror", v...)
}
}

2
tests/go/solutions/balancedstring/test_balancedstring.go

@ -60,6 +60,6 @@ func main() {
//We can use the ChallengeMainExam function.
for _, arg := range table {
z01.ChallengeMain(arg)
z01.ChallengeMain("balancedstring", arg)
}
}

6
tests/go/solutions/brackets/test_brackets.go

@ -18,10 +18,10 @@ func main() {
}
// No args testig
z01.ChallengeMain()
z01.ChallengeMain("brackets")
for _, v := range oneArgs {
z01.ChallengeMain(v)
z01.ChallengeMain("brackets", v)
}
arg1 := []string{"", "{[(0 + 0)(1 + 1)](3*(-1)){()}}"}
@ -30,6 +30,6 @@ func main() {
multArg := [][]string{arg1, arg2, arg3}
for _, v := range multArg {
z01.ChallengeMain(v...)
z01.ChallengeMain("brackets", v...)
}
}

2
tests/go/solutions/brainfuck/test_brainfuck.go

@ -16,6 +16,6 @@ func main() {
strings.Join([]string{"ld++++++++++++++++++++++++++++++++++++++++++++this+is++a++++comment++++++++++++++[>d+<-]>.+", z01.RandStr(z01.RandIntBetween(1, 10), ".+"), ".+.>++++++++++."}, ""),
}
for _, v := range args {
z01.ChallengeMain(v)
z01.ChallengeMain("brainfuck", v)
}
}

6
tests/go/solutions/capitalizeprog/test_capitalizeprog.go

@ -16,8 +16,8 @@ func main() {
"9a LALALA!",
)
for _, arg := range table {
z01.ChallengeMain(arg)
z01.ChallengeMain("capitalizeprog", arg)
}
z01.ChallengeMain("hello", "hihihi")
z01.ChallengeMain()
z01.ChallengeMain("capitalizeprog", "hello", "hihihi")
z01.ChallengeMain("capitalizeprog")
}

4
tests/go/solutions/cleanstr/test_cleanstr.go

@ -13,10 +13,10 @@ func main() {
}
for _, v := range args {
z01.ChallengeMain(v)
z01.ChallengeMain("cleanstr", v)
}
arg1 := []string{"this is not", "happening"}
z01.ChallengeMain(arg1...)
z01.ChallengeMain("cleanstr", arg1...)
}

6
tests/go/solutions/compareprog/test_compareprog.go

@ -41,8 +41,8 @@ func main() {
node{s: "Ola!", toCompare: "Ol"},
)
for _, arg := range table {
z01.ChallengeMain(arg.s, arg.toCompare)
z01.ChallengeMain("compareprog", arg.s, arg.toCompare)
}
z01.ChallengeMain()
z01.ChallengeMain("1 arg", "2args", "3args")
z01.ChallengeMain("compareprog")
z01.ChallengeMain("compareprog", "1 arg", "2args", "3args")
}

2
tests/go/solutions/costumeprofit/test_costumeprofit.go

@ -30,6 +30,6 @@ func main() {
d := strconv.Itoa(arg.D)
e := strconv.Itoa(arg.E)
f := strconv.Itoa(arg.F)
z01.ChallengeMain(a, b, c, d, e, f)
z01.ChallengeMain("costumeprofit", a, b, c, d, e, f)
}
}

2
tests/go/solutions/countdown/test_countdown.go

@ -5,5 +5,5 @@ import (
)
func main() {
z01.ChallengeMain()
z01.ChallengeMain("countdown")
}

4
tests/go/solutions/displaya/test_displaya.go

@ -13,8 +13,8 @@ func main() {
table = append(table, "1")
for _, s := range table {
z01.ChallengeMain(strings.Fields(s)...)
z01.ChallengeMain("displaya", strings.Fields(s)...)
}
z01.ChallengeMain("1", "a")
z01.ChallengeMain("displaya", "1", "a")
}

2
tests/go/solutions/displayalpham/test_displayalpham.go

@ -5,5 +5,5 @@ import (
)
func main() {
z01.ChallengeMain()
z01.ChallengeMain("displayalpham")
}

2
tests/go/solutions/displayalrevm/test_displayalrevm.go

@ -5,5 +5,5 @@ import (
)
func main() {
z01.ChallengeMain()
z01.ChallengeMain("displayalrevm")
}

2
tests/go/solutions/displayfirstparam/test_displayfirstparam.go

@ -13,6 +13,6 @@ func main() {
table = append(table, "1 2 3")
for _, s := range table {
z01.ChallengeMain(strings.Fields(s)...)
z01.ChallengeMain("displayfirstparam", strings.Fields(s)...)
}
}

2
tests/go/solutions/displaylastparam/test_displaylastparam.go

@ -12,6 +12,6 @@ func main() {
table = append(table, "1 2")
for _, s := range table {
z01.ChallengeMain(strings.Fields(s)...)
z01.ChallengeMain("displaylastparam", strings.Fields(s)...)
}
}

4
tests/go/solutions/displayz/test_displayz.go

@ -13,8 +13,8 @@ func main() {
table = append(table, "1")
for _, s := range table {
z01.ChallengeMain(strings.Fields(s)...)
z01.ChallengeMain("displayz", strings.Fields(s)...)
}
z01.ChallengeMain("1", "z")
z01.ChallengeMain("displayz", "1", "z")
}

2
tests/go/solutions/doopprog/test_doopprog.go

@ -38,6 +38,6 @@ func main() {
table = append(table, "9223372036854775807 * 3")
for _, s := range table {
z01.ChallengeMain(strings.Fields(s)...)
z01.ChallengeMain("doopprog", strings.Fields(s)...)
}
}

4
tests/go/solutions/expandstr/test_expandstr.go

@ -17,7 +17,7 @@ func main() {
}
for _, v := range args {
z01.ChallengeMain(v...)
z01.ChallengeMain("expandstr", v...)
}
z01.ChallengeMain()
z01.ChallengeMain("expandstr")
}

2
tests/go/solutions/firstword/test_firstword.go

@ -16,6 +16,6 @@ func main() {
table = append(table, "salut ! !")
for _, s := range table {
z01.ChallengeMain(s)
z01.ChallengeMain("firstword", s)
}
}

2
tests/go/solutions/fprime/test_fprime.go

@ -27,6 +27,6 @@ func main() {
table = append(table, "1000003")
for _, s := range table {
z01.ChallengeMain(strings.Fields(s)...)
z01.ChallengeMain("fprime", strings.Fields(s)...)
}
}

2
tests/go/solutions/gcd/test_gcd.go

@ -21,6 +21,6 @@ func main() {
}
for _, v := range args {
z01.ChallengeMain(v...)
z01.ChallengeMain("gcd", v...)
}
}

2
tests/go/solutions/grouping/test_grouping.go

@ -31,7 +31,7 @@ func main() {
arr = append(arr, helper)
for _, s := range arr {
z01.ChallengeMain(s.first, s.second)
z01.ChallengeMain("grouping", s.first, s.second)
}
}

2
tests/go/solutions/hello/test_hello.go

@ -5,5 +5,5 @@ import (
)
func main() {
z01.ChallengeMain()
z01.ChallengeMain("hello")
}

2
tests/go/solutions/hiddenp/test_hiddenp.go

@ -41,6 +41,6 @@ func main() {
}
for _, v := range args {
z01.ChallengeMain(v...)
z01.ChallengeMain("hiddenp", v...)
}
}

2
tests/go/solutions/inter/test_inter.go

@ -25,6 +25,6 @@ func main() {
}
for _, s := range table {
z01.ChallengeMain(strings.Fields(s)...)
z01.ChallengeMain("inter", strings.Fields(s)...)
}
}

4
tests/go/solutions/ispowerof2/test_ispowerof2.go

@ -23,7 +23,7 @@ func main() {
args = append(args, "8388608")
for _, v := range args {
z01.ChallengeMain(strings.Fields(v)...)
z01.ChallengeMain("ispowerof2", strings.Fields(v)...)
}
z01.ChallengeMain("1", "2")
z01.ChallengeMain("ispowerof2", "1", "2")
}

6
tests/go/solutions/lastword/test_lastword.go

@ -17,9 +17,9 @@ func main() {
}
for _, v := range args {
z01.ChallengeMain(v)
z01.ChallengeMain("lastword", v)
}
z01.ChallengeMain("a", "b")
z01.ChallengeMain()
z01.ChallengeMain("lastword", "a", "b")
z01.ChallengeMain("lastword")
}

2
tests/go/solutions/nenokku/test_nenokku.go

@ -48,6 +48,6 @@ func main() {
}
for _, arg := range table {
z01.ChallengeMain(arg.operations...)
z01.ChallengeMain("nenokku", arg.operations...)
}
}

2
tests/go/solutions/onlya/test_onlya.go

@ -5,5 +5,5 @@ import (
)
func main() {
z01.ChallengeMain()
z01.ChallengeMain("onlya")
}

2
tests/go/solutions/onlyz/test_onlyz.go

@ -5,5 +5,5 @@ import (
)
func main() {
z01.ChallengeMain()
z01.ChallengeMain("onlyz")
}

2
tests/go/solutions/options/test_options.go

@ -29,6 +29,6 @@ func main() {
)
for _, s := range table {
z01.ChallengeMain(strings.Fields(s)...)
z01.ChallengeMain("options", strings.Fields(s)...)
}
}

4
tests/go/solutions/paramcount/test_paramcount.go

@ -28,8 +28,8 @@ func main() {
}
for _, v := range args {
z01.ChallengeMain(v...)
z01.ChallengeMain("paramcount", v...)
}
z01.ChallengeMain()
z01.ChallengeMain("paramcount")
}

2
tests/go/solutions/piglatin/test_piglatin.go

@ -15,6 +15,6 @@ func main() {
}
for _, v := range arr {
z01.ChallengeMain(v.first...)
z01.ChallengeMain("piglatin", v.first...)
}
}

2
tests/go/solutions/printalphabetprog/test_printalphabetprog.go

@ -5,5 +5,5 @@ import (
)
func main() {
z01.ChallengeMain()
z01.ChallengeMain("printalphabetprog")
}

2
tests/go/solutions/printbits/test_printbits.go

@ -20,6 +20,6 @@ func main() {
arg = append(arg, z01.RandBasic())
for _, v := range arg {
z01.ChallengeMain(strings.Fields(v)...)
z01.ChallengeMain("printbits", strings.Fields(v)...)
}
}

2
tests/go/solutions/printchessboard/test_printchessboard.go

@ -27,6 +27,6 @@ func main() {
}
for _, v := range table {
z01.ChallengeMain(v...)
z01.ChallengeMain("printchessboard", v...)
}
}

2
tests/go/solutions/printcombprog/test_printcombprog.go

@ -5,5 +5,5 @@ import (
)
func main() {
z01.ChallengeMain()
z01.ChallengeMain("printcombprog")
}

2
tests/go/solutions/printdigitsprog/test_printdigitsprog.go

@ -5,5 +5,5 @@ import (
)
func main() {
z01.ChallengeMain()
z01.ChallengeMain("printdigitsprog")
}

2
tests/go/solutions/printhex/test_printhex.go

@ -24,6 +24,6 @@ func main() {
}
for _, s := range table {
z01.ChallengeMain(strings.Fields(s)...)
z01.ChallengeMain("printhex", strings.Fields(s)...)
}
}

2
tests/go/solutions/printrevcombprog/test_printrevcombprog.go

@ -5,5 +5,5 @@ import (
)
func main() {
z01.ChallengeMain()
z01.ChallengeMain("printrevcombprog")
}

2
tests/go/solutions/printreversealphabetprog/test_printreversealphabetprog.go

@ -5,5 +5,5 @@ import (
)
func main() {
z01.ChallengeMain()
z01.ChallengeMain("printreversealphabetprog")
}

4
tests/go/solutions/printstrprog/test_printstrprog.go

@ -7,7 +7,7 @@ import (
func main() {
table := z01.MultRandASCII()
for _, arg := range table {
z01.ChallengeMain(arg)
z01.ChallengeMain("printstrprog", arg)
}
z01.ChallengeMain("Hello World!")
z01.ChallengeMain("printstrprog", "Hello World!")
}

14
tests/go/solutions/range/test_range.go

@ -10,12 +10,12 @@ func main() {
for i := 0; i < 10; i++ {
start := z01.RandIntBetween(-20, 20)
end := z01.RandIntBetween(-20, 20)
z01.ChallengeMain(strconv.Itoa(start), strconv.Itoa(end))
z01.ChallengeMain("range", strconv.Itoa(start), strconv.Itoa(end))
}
z01.ChallengeMain("2", "1", "3")
z01.ChallengeMain("a", "1")
z01.ChallengeMain("1", "b")
z01.ChallengeMain("1", "nan")
z01.ChallengeMain("nan", "b")
z01.ChallengeMain()
z01.ChallengeMain("range", "2", "1", "3")
z01.ChallengeMain("range", "a", "1")
z01.ChallengeMain("range", "1", "b")
z01.ChallengeMain("range", "1", "nan")
z01.ChallengeMain("range", "nan", "b")
z01.ChallengeMain("range")
}

2
tests/go/solutions/repeatalpha/test_repeatalpha.go

@ -19,6 +19,6 @@ func main() {
}
for _, v := range args {
z01.ChallengeMain(v)
z01.ChallengeMain("repeatalpha", v)
}
}

14
tests/go/solutions/reverserange/test_reverserange.go

@ -10,12 +10,12 @@ func main() {
for i := 0; i < 10; i++ {
start := z01.RandIntBetween(-20, 20)
end := z01.RandIntBetween(-20, 20)
z01.ChallengeMain(strconv.Itoa(start), strconv.Itoa(end))
z01.ChallengeMain("reverserange", strconv.Itoa(start), strconv.Itoa(end))
}
z01.ChallengeMain("2", "1", "3")
z01.ChallengeMain("a", "1")
z01.ChallengeMain("1", "b")
z01.ChallengeMain("1", "nan")
z01.ChallengeMain("nan", "b")
z01.ChallengeMain()
z01.ChallengeMain("reverserange", "2", "1", "3")
z01.ChallengeMain("reverserange", "a", "1")
z01.ChallengeMain("reverserange", "1", "b")
z01.ChallengeMain("reverserange", "1", "nan")
z01.ChallengeMain("reverserange", "nan", "b")
z01.ChallengeMain("reverserange")
}

4
tests/go/solutions/reversestrcap/test_reversestrcap.go

@ -16,7 +16,7 @@ func main() {
args = append(args, []string{""})
for _, v := range args {
z01.ChallengeMain(v...)
z01.ChallengeMain("reversestrcap", v...)
}
z01.ChallengeMain()
z01.ChallengeMain("reversestrcap")
}

6
tests/go/solutions/revwstr/test_revwstr.go

@ -26,9 +26,9 @@ func main() {
}
for _, s := range table {
z01.ChallengeMain(s)
z01.ChallengeMain("revwstr", s)
}
z01.ChallengeMain()
z01.ChallengeMain("1param", "2param", "3param", "4param")
z01.ChallengeMain("revwstr")
z01.ChallengeMain("revwstr", "1param", "2param", "3param", "4param")
}

2
tests/go/solutions/robottoorigin/test_robottoorigin.go

@ -18,6 +18,6 @@ func main() {
}
for _, arg := range table {
z01.ChallengeMain(arg)
z01.ChallengeMain("robottoorigin", arg)
}
}

2
tests/go/solutions/romannumbers/test_romannumbers.go

@ -19,6 +19,6 @@ func main() {
rand = append(rand, strconv.Itoa(z01.RandIntBetween(0, 4000)))
}
for _, v := range rand {
z01.ChallengeMain(v)
z01.ChallengeMain("romannumbers", v)
}
}

8
tests/go/solutions/rostring/test_rostring.go

@ -17,13 +17,13 @@ func main() {
}
for _, v := range corrArgs {
z01.ChallengeMain(v)
z01.ChallengeMain("rostring", v)
}
//without parameter
z01.ChallengeMain()
z01.ChallengeMain("rostring")
//with more than one parameter
z01.ChallengeMain("this", "is")
z01.ChallengeMain("not", "good", "for you")
z01.ChallengeMain("rostring", "this", "is")
z01.ChallengeMain("rostring", "not", "good", "for you")
}

6
tests/go/solutions/rot13/test_rot13.go

@ -10,8 +10,8 @@ func main() {
table = append(table, "a b c d e f g h ijklmnopqrstuvwxyz A B C D E FGHIJKLMNOPRSTUVWXYZ")
for _, s := range table {
z01.ChallengeMain(s)
z01.ChallengeMain("rot13", s)
}
z01.ChallengeMain("1 argument", "2 arguments")
z01.ChallengeMain("1 argument", "2 arguments", "3 arguments")
z01.ChallengeMain("rot13", "1 argument", "2 arguments")
z01.ChallengeMain("rot13", "1 argument", "2 arguments", "3 arguments")
}

4
tests/go/solutions/rot14prog/test_rot14prog.go

@ -19,8 +19,8 @@ func main() {
for _, arg := range table {
for _, s := range arg.data {
z01.ChallengeMain("" + s + "")
z01.ChallengeMain("rot14prog", "" + s + "")
}
}
z01.ChallengeMain("", "something", "something1")
z01.ChallengeMain("rot14prog", "", "something", "something1")
}

6
tests/go/solutions/rpncalc/test_rpncalc.go

@ -23,8 +23,8 @@ func main() {
}
for _, v := range args {
z01.ChallengeMain(v)
z01.ChallengeMain("rpncalc", v)
}
z01.ChallengeMain()
z01.ChallengeMain("1 2 * 3 * 4 +", "10 33 - 12 %")
z01.ChallengeMain("rpncalc")
z01.ChallengeMain("rpncalc", "1 2 * 3 * 4 +", "10 33 - 12 %")
}

2
tests/go/solutions/searchreplace/test_searchreplace.go

@ -44,6 +44,6 @@ func main() {
)
for _, arg := range table {
z01.ChallengeMain(arg.dataSearched, arg.letterLookedFor, arg.letterReplacing)
z01.ChallengeMain("searchreplace", arg.dataSearched, arg.letterLookedFor, arg.letterReplacing)
}
}

2
tests/go/solutions/strrevprog/test_strrevprog.go

@ -12,6 +12,6 @@ func main() {
"Hola!",
)
for _, arg := range table {
z01.ChallengeMain(arg)
z01.ChallengeMain("strrevprog", arg)
}
}

2
tests/go/solutions/switchcase/test_switchcase.go

@ -10,6 +10,6 @@ func main() {
table = append(table, "abcdefghi jklmnop qrstuvwxyz ABCDEFGHI JKLMNOPQR STUVWXYZ ! ")
for _, s := range table {
z01.ChallengeMain(s)
z01.ChallengeMain("switchcase", s)
}
}

2
tests/go/solutions/tabmult/test_tabmult.go

@ -16,6 +16,6 @@ func main() {
}
for _, arg := range table {
z01.ChallengeMain(arg)
z01.ChallengeMain("tabmult", arg)
}
}

2
tests/go/solutions/union/test_union.go

@ -22,6 +22,6 @@ func main() {
args := [][]string{arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8}
for _, v := range args {
z01.ChallengeMain(v...)
z01.ChallengeMain("union", v...)
}
}

2
tests/go/solutions/uniqueoccurences/test_uniqueoccurences.go

@ -20,6 +20,6 @@ func main() {
}
for _, arg := range table {
z01.ChallengeMain(arg)
z01.ChallengeMain("uniqueoccurences", arg)
}
}

2
tests/go/solutions/wdmatch/test_wdmatch.go

@ -16,6 +16,6 @@ func main() {
)
for _, s := range table {
z01.ChallengeMain(strings.Fields(s)...)
z01.ChallengeMain("wdmatch", strings.Fields(s)...)
}
}

6
tests/go/test_atoibaseprog.go

@ -84,8 +84,8 @@ func main() {
node{s: "bbbbbab", base: "-ab"},
)
for _, arg := range table {
z01.ChallengeMain(arg.s, arg.base)
z01.ChallengeMain("atoibaseprog", arg.s, arg.base)
}
z01.ChallengeMain()
z01.ChallengeMain("125", "0123456789", "something")
z01.ChallengeMain("atoibaseprog")
z01.ChallengeMain("atoibaseprog", "125", "0123456789", "something")
}

2
tests/go/test_boolean.go

@ -10,6 +10,6 @@ func main() {
table := append(z01.MultRandWords(), "1 2 3 4 5")
for _, s := range table {
z01.ChallengeMain(strings.Fields(s)...)
z01.ChallengeMain("boolean", strings.Fields(s)...)
}
}

2
tests/go/test_comcheck.go

@ -17,6 +17,6 @@ func main() {
"as ds galaxy 01 asd")
for _, s := range table {
z01.ChallengeMain(strings.Fields(s)...)
z01.ChallengeMain("comcheck", strings.Fields(s)...)
}
}

2
tests/go/test_displayfile.go

@ -15,6 +15,6 @@ func main() {
}
table := []string{"", pathFileName, "quest8.txt asdsada"}
for _, s := range table {
z01.ChallengeMain(strings.Fields(s)...)
z01.ChallengeMain("displayfile", strings.Fields(s)...)
}
}

2
tests/go/test_doop.go

@ -37,6 +37,6 @@ func main() {
table = append(table, "9223372036854775809 - 3")
table = append(table, "9223372036854775807 * 3")
for _, s := range table {
z01.ChallengeMain(strings.Fields(s)...)
z01.ChallengeMain("doop", strings.Fields(s)...)
}
}

2
tests/go/test_fixthemain.go

@ -5,5 +5,5 @@ import (
)
func main() {
z01.ChallengeMain()
z01.ChallengeMain("fixthemain")
}

14
tests/go/test_flags.go

@ -30,20 +30,20 @@ func main() {
node.randArg = append(node.randArg, "")
z01.ChallengeMain(node.flagsShorthand[0]+"v2", "v1")
z01.ChallengeMain(node.flagsShorthand[1], "v1")
z01.ChallengeMain("-h")
z01.ChallengeMain("--help")
z01.ChallengeMain()
z01.ChallengeMain("flags", node.flagsShorthand[0]+"v2", "v1")
z01.ChallengeMain("flags", node.flagsShorthand[1], "v1")
z01.ChallengeMain("flags", "-h")
z01.ChallengeMain("flags", "--help")
z01.ChallengeMain("flags")
for _, v2 := range node.randArgFlag {
for _, v1 := range node.randArg {
z01.ChallengeMain(node.flags[0]+v2, node.flags[1], v1)
z01.ChallengeMain("flags", node.flags[0]+v2, node.flags[1], v1)
}
}
for _, v2 := range node.randArgFlag {
for _, v1 := range node.randArg {
z01.ChallengeMain(node.flagsShorthand[0]+v2, node.flagsShorthand[1], v1)
z01.ChallengeMain("flags", node.flagsShorthand[0]+v2, node.flagsShorthand[1], v1)
}
}
}

2
tests/go/test_nbrconvertalpha.go

@ -39,7 +39,7 @@ func main() {
for _, i := range table {
for _, a := range i.array {
z01.ChallengeMain(strings.Fields((a))...)
z01.ChallengeMain("nbrconvertalpha", strings.Fields((a))...)
}
}
}

4
tests/go/test_paramcount.go

@ -28,8 +28,8 @@ func main() {
}
for _, v := range args {
z01.ChallengeMain(v...)
z01.ChallengeMain("paramcount", v...)
}
z01.ChallengeMain()
z01.ChallengeMain("paramcount")
}

2
tests/go/test_pilot.go

@ -5,5 +5,5 @@ import (
)
func main() {
z01.ChallengeMain()
z01.ChallengeMain("pilot")
}

2
tests/go/test_point.go

@ -5,5 +5,5 @@ import (
)
func main() {
z01.ChallengeMain("")
z01.ChallengeMain("point", "")
}

2
tests/go/test_printalphabet.go

@ -5,5 +5,5 @@ import (
)
func main() {
z01.ChallengeMain()
z01.ChallengeMain("printalphabet")
}

2
tests/go/test_printdigits.go

@ -5,5 +5,5 @@ import (
)
func main() {
z01.ChallengeMain()
z01.ChallengeMain("printdigits")
}

2
tests/go/test_printparams.go

@ -9,6 +9,6 @@ import (
func main() {
table := append(z01.MultRandWords(), "choumi is the best cat")
for _, s := range table {
z01.ChallengeMain(strings.Fields(s)...)
z01.ChallengeMain("printparams", strings.Fields(s)...)
}
}

2
tests/go/test_printreversealphabet.go

@ -5,5 +5,5 @@ import (
)
func main() {
z01.ChallengeMain()
z01.ChallengeMain("printreversealphabet")
}

8
tests/go/test_raid2.go

@ -197,15 +197,15 @@ func main() {
invalid := [][]string{argin1, argin2, argin3, argin4, argin5}
for _, v := range valid {
z01.ChallengeMain(v...)
z01.ChallengeMain("raid2", v...)
}
for _, i := range invalid {
z01.ChallengeMain(i...)
z01.ChallengeMain("raid2", i...)
}
// No arguments
z01.ChallengeMain()
z01.ChallengeMain("raid2")
// Wrong number of arguments
z01.ChallengeMain("not", "a", "sudoku")
z01.ChallengeMain("raid2", "not", "a", "sudoku")
}

2
tests/go/test_rectangle.go

@ -5,5 +5,5 @@ import (
)
func main() {
z01.ChallengeMain("")
z01.ChallengeMain("rectangle")
}

2
tests/go/test_revparams.go

@ -6,5 +6,5 @@ import (
func main() {
args := []string{"choumi", "is", "the", "best", "cat"}
z01.ChallengeMain(args...)
z01.ChallengeMain("revparams", args...)
}

14
tests/go/test_rotatevowels.go

@ -18,12 +18,12 @@ func main() {
arr = append(arr, "")
for _, v := range arr {
z01.ChallengeMain(strings.Fields(v)...)
z01.ChallengeMain("rotatevowels", strings.Fields(v)...)
}
z01.ChallengeMain("Hello World")
z01.ChallengeMain("HEllO World", "problem solved")
z01.ChallengeMain("str", "shh", "psst")
z01.ChallengeMain("happy thoughts", "good luck")
z01.ChallengeMain("al's elEphAnt is overly underweight!")
z01.ChallengeMain("aEi", "Ou")
z01.ChallengeMain("rotatevowels", "Hello World")
z01.ChallengeMain("rotatevowels", "HEllO World", "problem solved")
z01.ChallengeMain("rotatevowels", "str", "shh", "psst")
z01.ChallengeMain("rotatevowels", "happy thoughts", "good luck")
z01.ChallengeMain("rotatevowels", "al's elEphAnt is overly underweight!")
z01.ChallengeMain("rotatevowels", "aEi", "Ou")
}

2
tests/go/test_sortparams.go

@ -6,5 +6,5 @@ import (
func main() {
args := []string{"1", "a", "2", "A", "3", "b", "4", "C"}
z01.ChallengeMain(args...)
z01.ChallengeMain("sortparams", args...)
}

Loading…
Cancel
Save