Browse Source

Abandon testing package for programs and remove exam exception

content-update
Xavier Petit 4 years ago committed by xpetit
parent
commit
0e28914485
  1. 11
      tests/go/atoibaseprog_test.go
  2. 7
      tests/go/boolean_test.go
  3. 7
      tests/go/comcheck_test.go
  4. 7
      tests/go/displayfile_test.go
  5. 7
      tests/go/doop_test.go
  6. 8
      tests/go/fixthemain_test.go
  7. 20
      tests/go/flags_test.go
  8. 7
      tests/go/nbrconvertalpha_test.go
  9. 9
      tests/go/paramcount_test.go
  10. 8
      tests/go/pilot_test.go
  11. 8
      tests/go/point_test.go
  12. 8
      tests/go/printalphabet_test.go
  13. 8
      tests/go/printdigits_test.go
  14. 7
      tests/go/printparams_test.go
  15. 8
      tests/go/printreversealphabet_test.go
  16. 14
      tests/go/raid2_test.go
  17. 8
      tests/go/rectangle_test.go
  18. 8
      tests/go/revparams_test.go
  19. 19
      tests/go/rotatevowels_test.go
  20. 5
      tests/go/solutions/addprimesum/addprimesum_test.go
  21. 6
      tests/go/solutions/alphamirror/alphamirror_test.go
  22. 6
      tests/go/solutions/balancedstring/balancedstring_test.go
  23. 10
      tests/go/solutions/brackets/brackets_test.go
  24. 5
      tests/go/solutions/brainfuck/brainfuck_test.go
  25. 10
      tests/go/solutions/capitalizeprog/capitalizeprog_test.go
  26. 8
      tests/go/solutions/cleanstr/cleanstr_test.go
  27. 10
      tests/go/solutions/compareprog/compareprog_test.go
  28. 5
      tests/go/solutions/costumeprofit/costumeprofit_test.go
  29. 6
      tests/go/solutions/countdown/countdown_test.go
  30. 7
      tests/go/solutions/displaya/displaya_test.go
  31. 6
      tests/go/solutions/displayalpham/displayalpham_test.go
  32. 6
      tests/go/solutions/displayalrevm/displayalrevm_test.go
  33. 5
      tests/go/solutions/displayfirstparam/displayfirstparam_test.go
  34. 5
      tests/go/solutions/displaylastparam/displaylastparam_test.go
  35. 7
      tests/go/solutions/displayz/displayz_test.go
  36. 5
      tests/go/solutions/doopprog/doopprog_test.go
  37. 8
      tests/go/solutions/expandstr/expandstr_test.go
  38. 6
      tests/go/solutions/firstword/firstword_test.go
  39. 5
      tests/go/solutions/fprime/fprime_test.go
  40. 5
      tests/go/solutions/gcd/gcd_test.go
  41. 6
      tests/go/solutions/grouping/grouping_test.go
  42. 6
      tests/go/solutions/hello/hello_test.go
  43. 6
      tests/go/solutions/hiddenp/hiddenp_test.go
  44. 5
      tests/go/solutions/inter/inter_test.go
  45. 7
      tests/go/solutions/ispowerof2/ispowerof2_test.go
  46. 10
      tests/go/solutions/lastword/lastword_test.go
  47. 6
      tests/go/solutions/nenokku/nenokku_test.go
  48. 6
      tests/go/solutions/onlya/onlya_test.go
  49. 6
      tests/go/solutions/onlyz/onlyz_test.go
  50. 5
      tests/go/solutions/options/options_test.go
  51. 7
      tests/go/solutions/paramcount/paramcount_test.go
  52. 6
      tests/go/solutions/piglatin/piglatin_test.go
  53. 6
      tests/go/solutions/printalphabetprog/printalphabetprog_test.go
  54. 5
      tests/go/solutions/printbits/printbits_test.go
  55. 5
      tests/go/solutions/printchessboard/printchessboard_test.go
  56. 6
      tests/go/solutions/printcombprog/printcombprog_test.go
  57. 6
      tests/go/solutions/printdigitsprog/printdigitsprog_test.go
  58. 5
      tests/go/solutions/printhex/printhex_test.go
  59. 6
      tests/go/solutions/printrevcombprog/printrevcombprog_test.go
  60. 6
      tests/go/solutions/printreversealphabetprog/printreversealphabetprog_test.go
  61. 8
      tests/go/solutions/printstrprog/printstrprog_test.go
  62. 17
      tests/go/solutions/range/range_test.go
  63. 6
      tests/go/solutions/repeatalpha/repeatalpha_test.go
  64. 17
      tests/go/solutions/reverserange/reverserange_test.go
  65. 8
      tests/go/solutions/reversestrcap/reversestrcap_test.go
  66. 10
      tests/go/solutions/revwstr/revwstr_test.go
  67. 6
      tests/go/solutions/robottoorigin/robottoorigin_test.go
  68. 5
      tests/go/solutions/romannumbers/romannumbers_test.go
  69. 12
      tests/go/solutions/rostring/rostring_test.go
  70. 10
      tests/go/solutions/rot13/rot13_test.go
  71. 8
      tests/go/solutions/rot14prog/rot14prog_test.go
  72. 10
      tests/go/solutions/rpncalc/rpncalc_test.go
  73. 6
      tests/go/solutions/searchreplace/searchreplace_test.go
  74. 6
      tests/go/solutions/strrevprog/strrevprog_test.go
  75. 6
      tests/go/solutions/switchcase/switchcase_test.go
  76. 5
      tests/go/solutions/tabmult/tabmult_test.go
  77. 5
      tests/go/solutions/union/union_test.go
  78. 6
      tests/go/solutions/uniqueoccurences/uniqueoccurences_test.go
  79. 5
      tests/go/solutions/wdmatch/wdmatch_test.go
  80. 8
      tests/go/sortparams_test.go

11
tests/go/atoibaseprog_test.go

@ -1,8 +1,7 @@
package student_test
package main
import (
"math/rand"
"testing"
"github.com/01-edu/z01"
)
@ -51,7 +50,7 @@ func randomStringFromBase(base string) string {
}
// this is the function that creates the TESTS
func TestAtoiBaseProg(t *testing.T) {
func main() {
type node struct {
s string
base string
@ -85,8 +84,8 @@ func TestAtoiBaseProg(t *testing.T) {
node{s: "bbbbbab", base: "-ab"},
)
for _, arg := range table {
z01.ChallengeMain(t, arg.s, arg.base)
z01.ChallengeMain(arg.s, arg.base)
}
z01.ChallengeMain(t)
z01.ChallengeMain(t, "125", "0123456789", "something")
z01.ChallengeMain()
z01.ChallengeMain("125", "0123456789", "something")
}

7
tests/go/boolean_test.go

@ -1,16 +1,15 @@
package student_test
package main
import (
"strings"
"testing"
"github.com/01-edu/z01"
)
func TestBoolean(t *testing.T) {
func main() {
table := append(z01.MultRandWords(), "1 2 3 4 5")
for _, s := range table {
z01.ChallengeMain(t, strings.Fields(s)...)
z01.ChallengeMain(strings.Fields(s)...)
}
}

7
tests/go/comcheck_test.go

@ -1,13 +1,12 @@
package student_test
package main
import (
"strings"
"testing"
"github.com/01-edu/z01"
)
func TestComCheck(t *testing.T) {
func main() {
table := append(z01.MultRandWords(),
"01",
"galaxy",
@ -18,6 +17,6 @@ func TestComCheck(t *testing.T) {
"as ds galaxy 01 asd")
for _, s := range table {
z01.ChallengeMain(t, strings.Fields(s)...)
z01.ChallengeMain(strings.Fields(s)...)
}
}

7
tests/go/displayfile_test.go

@ -1,14 +1,13 @@
package student_test
package main
import (
"os"
"strings"
"testing"
"github.com/01-edu/z01"
)
func TestDisplayfile(t *testing.T) {
func main() {
pathFileName := "./student/displayfile/quest8.txt"
_, err := os.Stat(pathFileName)
if err != nil {
@ -16,6 +15,6 @@ func TestDisplayfile(t *testing.T) {
}
table := []string{"", pathFileName, "quest8.txt asdsada"}
for _, s := range table {
z01.ChallengeMain(t, strings.Fields(s)...)
z01.ChallengeMain(strings.Fields(s)...)
}
}

7
tests/go/doop_test.go

@ -1,15 +1,14 @@
package student_test
package main
import (
"strings"
"testing"
"strconv"
"github.com/01-edu/z01"
)
func TestDoop(t *testing.T) {
func main() {
operatorsTable := []string{"+", "-", "*", "/", "%"}
table := []string{}
@ -38,6 +37,6 @@ func TestDoop(t *testing.T) {
table = append(table, "9223372036854775809 - 3")
table = append(table, "9223372036854775807 * 3")
for _, s := range table {
z01.ChallengeMain(t, strings.Fields(s)...)
z01.ChallengeMain(strings.Fields(s)...)
}
}

8
tests/go/fixthemain_test.go

@ -1,11 +1,9 @@
package student_test
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestFixthemain(t *testing.T) {
z01.ChallengeMain(t)
func main() {
z01.ChallengeMain()
}

20
tests/go/flags_test.go

@ -1,8 +1,6 @@
package student_test
package main
import (
"testing"
"github.com/01-edu/z01"
)
@ -13,7 +11,7 @@ type node struct {
randArg []string
}
func TestFlags(t *testing.T) {
func main() {
str := []string{"--insert=", "--order"}
strShorthand := []string{"-i=", "-o"}
var randflag []string
@ -32,20 +30,20 @@ func TestFlags(t *testing.T) {
node.randArg = append(node.randArg, "")
z01.ChallengeMain(t, node.flagsShorthand[0]+"v2", "v1")
z01.ChallengeMain(t, node.flagsShorthand[1], "v1")
z01.ChallengeMain(t, "-h")
z01.ChallengeMain(t, "--help")
z01.ChallengeMain(t)
z01.ChallengeMain(node.flagsShorthand[0]+"v2", "v1")
z01.ChallengeMain(node.flagsShorthand[1], "v1")
z01.ChallengeMain("-h")
z01.ChallengeMain("--help")
z01.ChallengeMain()
for _, v2 := range node.randArgFlag {
for _, v1 := range node.randArg {
z01.ChallengeMain(t, node.flags[0]+v2, node.flags[1], v1)
z01.ChallengeMain(node.flags[0]+v2, node.flags[1], v1)
}
}
for _, v2 := range node.randArgFlag {
for _, v1 := range node.randArg {
z01.ChallengeMain(t, node.flagsShorthand[0]+v2, node.flagsShorthand[1], v1)
z01.ChallengeMain(node.flagsShorthand[0]+v2, node.flagsShorthand[1], v1)
}
}
}

7
tests/go/nbrconvertalpha_test.go

@ -1,14 +1,13 @@
package student_test
package main
import (
"strconv"
"strings"
"testing"
"github.com/01-edu/z01"
)
func TestNbrConvertAlpha(t *testing.T) {
func main() {
type node struct {
array []string
}
@ -40,7 +39,7 @@ func TestNbrConvertAlpha(t *testing.T) {
for _, i := range table {
for _, a := range i.array {
z01.ChallengeMain(t, strings.Fields((a))...)
z01.ChallengeMain(strings.Fields((a))...)
}
}
}

9
tests/go/paramcount_test.go

@ -1,13 +1,12 @@
package student_test
package main
import (
"strconv"
"testing"
"github.com/01-edu/z01"
)
func TestParamCount(t *testing.T) {
func main() {
arg1 := []string{"2", "5", "u", "19"}
arg2 := []string{"2"}
arg3 := []string{"1", "2", "3", "5", "7", "24"}
@ -29,8 +28,8 @@ func TestParamCount(t *testing.T) {
}
for _, v := range args {
z01.ChallengeMain(t, v...)
z01.ChallengeMain(v...)
}
z01.ChallengeMain(t)
z01.ChallengeMain()
}

8
tests/go/pilot_test.go

@ -1,11 +1,9 @@
package student_test
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestPilot(t *testing.T) {
z01.ChallengeMain(t)
func main() {
z01.ChallengeMain()
}

8
tests/go/point_test.go

@ -1,11 +1,9 @@
package student_test
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestPoint(t *testing.T) {
z01.ChallengeMain(t, "")
func main() {
z01.ChallengeMain("")
}

8
tests/go/printalphabet_test.go

@ -1,11 +1,9 @@
package student_test
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestPrintAlphabet(t *testing.T) {
z01.ChallengeMain(t)
func main() {
z01.ChallengeMain()
}

8
tests/go/printdigits_test.go

@ -1,11 +1,9 @@
package student_test
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestPrintDigits(t *testing.T) {
z01.ChallengeMain(t)
func main() {
z01.ChallengeMain()
}

7
tests/go/printparams_test.go

@ -1,15 +1,14 @@
package student_test
package main
import (
"strings"
"testing"
"github.com/01-edu/z01"
)
func TestPrintParams(t *testing.T) {
func main() {
table := append(z01.MultRandWords(), "choumi is the best cat")
for _, s := range table {
z01.ChallengeMain(t, strings.Fields(s)...)
z01.ChallengeMain(strings.Fields(s)...)
}
}

8
tests/go/printreversealphabet_test.go

@ -1,11 +1,9 @@
package student_test
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestPrintReverseAlphabet(t *testing.T) {
z01.ChallengeMain(t)
func main() {
z01.ChallengeMain()
}

14
tests/go/raid2_test.go

@ -1,12 +1,10 @@
package student_test
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestRaid2(t *testing.T) {
func main() {
// Valid sudokus
arg1 := []string{".96.4...1", "1...6...4", "5.481.39.",
"..795..43", ".3..8....", "4.5.23.18",
@ -199,15 +197,15 @@ func TestRaid2(t *testing.T) {
invalid := [][]string{argin1, argin2, argin3, argin4, argin5}
for _, v := range valid {
z01.ChallengeMain(t, v...)
z01.ChallengeMain(v...)
}
for _, i := range invalid {
z01.ChallengeMain(t, i...)
z01.ChallengeMain(i...)
}
// No arguments
z01.ChallengeMain(t)
z01.ChallengeMain()
// Wrong number of arguments
z01.ChallengeMain(t, "not", "a", "sudoku")
z01.ChallengeMain("not", "a", "sudoku")
}

8
tests/go/rectangle_test.go

@ -1,11 +1,9 @@
package student_test
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestRectangle(t *testing.T) {
z01.ChallengeMain(t, "")
func main() {
z01.ChallengeMain("")
}

8
tests/go/revparams_test.go

@ -1,12 +1,10 @@
package student_test
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestRevParams(t *testing.T) {
func main() {
args := []string{"choumi", "is", "the", "best", "cat"}
z01.ChallengeMain(t, args...)
z01.ChallengeMain(args...)
}

19
tests/go/rotatevowels_test.go

@ -1,13 +1,12 @@
package student_test
package main
import (
"strings"
"testing"
"github.com/01-edu/z01"
)
func TestRotateVowels(t *testing.T) {
func main() {
Lower := z01.RuneRange('a', 'z')
Upper := z01.RuneRange('A', 'Z')
letters := Lower + Upper + " "
@ -19,12 +18,12 @@ func TestRotateVowels(t *testing.T) {
arr = append(arr, "")
for _, v := range arr {
z01.ChallengeMain(t, strings.Fields(v)...)
z01.ChallengeMain(strings.Fields(v)...)
}
z01.ChallengeMain(t, "Hello World")
z01.ChallengeMain(t, "HEllO World", "problem solved")
z01.ChallengeMain(t, "str", "shh", "psst")
z01.ChallengeMain(t, "happy thoughts", "good luck")
z01.ChallengeMain(t, "al's elEphAnt is overly underweight!")
z01.ChallengeMain(t, "aEi", "Ou")
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")
}

5
tests/go/solutions/addprimesum/addprimesum_test.go

@ -3,7 +3,6 @@ package main
import (
"strconv"
"strings"
"testing"
"github.com/01-edu/z01"
)
@ -28,7 +27,7 @@ func isAPrime(nb int) bool {
return true
}
func TestAddPrimeSum(t *testing.T) {
func main() {
var table []string
// fill with all rpime numbers between 0 and 100
@ -50,6 +49,6 @@ func TestAddPrimeSum(t *testing.T) {
table = append(table, "1 2")
for _, s := range table {
z01.ChallengeMainExam(t, strings.Fields(s)...)
z01.ChallengeMain(strings.Fields(s)...)
}
}

6
tests/go/solutions/alphamirror/alphamirror_test.go

@ -1,12 +1,10 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestAlphaMirror(t *testing.T) {
func main() {
arg1 := []string{""}
arg2 := []string{"One", "ring!"}
arg3 := []string{"testing spaces and #!*"}
@ -16,6 +14,6 @@ func TestAlphaMirror(t *testing.T) {
args := [][]string{arg1, arg2, arg3, arg4, arg5, arg6}
for _, v := range args {
z01.ChallengeMainExam(t, v...)
z01.ChallengeMain(v...)
}
}

6
tests/go/solutions/balancedstring/balancedstring_test.go

@ -1,12 +1,10 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestBalancedString(t *testing.T) {
func main() {
// Declaration of an empty array of type string
table := []string{}
@ -62,6 +60,6 @@ func TestBalancedString(t *testing.T) {
//We can use the ChallengeMainExam function.
for _, arg := range table {
z01.ChallengeMainExam(t, arg)
z01.ChallengeMain(arg)
}
}

10
tests/go/solutions/brackets/brackets_test.go

@ -1,12 +1,10 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestBrackets(t *testing.T) {
func main() {
oneArgs := []string{"(johndoe)", ")()", "([)]", "{2*[d - 3]/(12)}"}
// 18 random tests ( at least half are valid)
@ -20,10 +18,10 @@ func TestBrackets(t *testing.T) {
}
// No args testig
z01.ChallengeMainExam(t)
z01.ChallengeMain()
for _, v := range oneArgs {
z01.ChallengeMainExam(t, v)
z01.ChallengeMain(v)
}
arg1 := []string{"", "{[(0 + 0)(1 + 1)](3*(-1)){()}}"}
@ -32,6 +30,6 @@ func TestBrackets(t *testing.T) {
multArg := [][]string{arg1, arg2, arg3}
for _, v := range multArg {
z01.ChallengeMainExam(t, v...)
z01.ChallengeMain(v...)
}
}

5
tests/go/solutions/brainfuck/brainfuck_test.go

@ -2,12 +2,11 @@ package main
import (
"strings"
"testing"
"github.com/01-edu/z01"
)
func TestBrainFuck(t *testing.T) {
func main() {
// individual tests 1)Hello World! 2)Hi 3)abc 4)ABC
args := []string{"++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.",
@ -17,6 +16,6 @@ func TestBrainFuck(t *testing.T) {
strings.Join([]string{"ld++++++++++++++++++++++++++++++++++++++++++++this+is++a++++comment++++++++++++++[>d+<-]>.+", z01.RandStr(z01.RandIntBetween(1, 10), ".+"), ".+.>++++++++++."}, ""),
}
for _, v := range args {
z01.ChallengeMainExam(t, v)
z01.ChallengeMain(v)
}
}

10
tests/go/solutions/capitalizeprog/capitalizeprog_test.go

@ -1,12 +1,10 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestCapitalizeProg(t *testing.T) {
func main() {
table := append(
z01.MultRandASCII(),
"Hello! How are you? How+are+things+4you?",
@ -18,8 +16,8 @@ func TestCapitalizeProg(t *testing.T) {
"9a LALALA!",
)
for _, arg := range table {
z01.ChallengeMainExam(t, arg)
z01.ChallengeMain(arg)
}
z01.ChallengeMainExam(t, "hello", "hihihi")
z01.ChallengeMainExam(t)
z01.ChallengeMain("hello", "hihihi")
z01.ChallengeMain()
}

8
tests/go/solutions/cleanstr/cleanstr_test.go

@ -1,12 +1,10 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestCleanStr(t *testing.T) {
func main() {
args := []string{"you see it's easy to display the same thing",
" only it's harder ",
"how funny",
@ -15,10 +13,10 @@ func TestCleanStr(t *testing.T) {
}
for _, v := range args {
z01.ChallengeMainExam(t, v)
z01.ChallengeMain(v)
}
arg1 := []string{"this is not", "happening"}
z01.ChallengeMainExam(t, arg1...)
z01.ChallengeMain(arg1...)
}

10
tests/go/solutions/compareprog/compareprog_test.go

@ -1,12 +1,10 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestCompareProg(t *testing.T) {
func main() {
type node struct {
s string
toCompare string
@ -43,8 +41,8 @@ func TestCompareProg(t *testing.T) {
node{s: "Ola!", toCompare: "Ol"},
)
for _, arg := range table {
z01.ChallengeMainExam(t, arg.s, arg.toCompare)
z01.ChallengeMain(arg.s, arg.toCompare)
}
z01.ChallengeMainExam(t)
z01.ChallengeMainExam(t, "1 arg", "2args", "3args")
z01.ChallengeMain()
z01.ChallengeMain("1 arg", "2args", "3args")
}

5
tests/go/solutions/costumeprofit/costumeprofit_test.go

@ -2,7 +2,6 @@ package main
import (
"strconv"
"testing"
"github.com/01-edu/z01"
)
@ -11,7 +10,7 @@ type node struct {
A, B, C, D, E, F int
}
func TestCostumeProfit(t *testing.T) {
func main() {
table := []node{}
for i := 0; i < 25; i++ {
@ -31,6 +30,6 @@ func TestCostumeProfit(t *testing.T) {
d := strconv.Itoa(arg.D)
e := strconv.Itoa(arg.E)
f := strconv.Itoa(arg.F)
z01.ChallengeMainExam(t, a, b, c, d, e, f)
z01.ChallengeMain(a, b, c, d, e, f)
}
}

6
tests/go/solutions/countdown/countdown_test.go

@ -1,11 +1,9 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestCountdown(t *testing.T) {
z01.ChallengeMainExam(t)
func main() {
z01.ChallengeMain()
}

7
tests/go/solutions/displaya/displaya_test.go

@ -2,20 +2,19 @@ package main
import (
"strings"
"testing"
"github.com/01-edu/z01"
)
func TestDisplaya(t *testing.T) {
func main() {
table := append(z01.MultRandWords(), "dsfda")
table = append(table, "")
table = append(table, "1")
table = append(table, "1")
for _, s := range table {
z01.ChallengeMainExam(t, strings.Fields(s)...)
z01.ChallengeMain(strings.Fields(s)...)
}
z01.ChallengeMainExam(t, "1", "a")
z01.ChallengeMain("1", "a")
}

6
tests/go/solutions/displayalpham/displayalpham_test.go

@ -1,11 +1,9 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestDisplayAlphaM(t *testing.T) {
z01.ChallengeMainExam(t)
func main() {
z01.ChallengeMain()
}

6
tests/go/solutions/displayalrevm/displayalrevm_test.go

@ -1,11 +1,9 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestDisplayAlRevM(t *testing.T) {
z01.ChallengeMainExam(t)
func main() {
z01.ChallengeMain()
}

5
tests/go/solutions/displayfirstparam/displayfirstparam_test.go

@ -2,18 +2,17 @@ package main
import (
"strings"
"testing"
"github.com/01-edu/z01"
)
func TestDisplayFirstParam(t *testing.T) {
func main() {
table := append(z01.MultRandWords(), " ")
table = append(table, "1")
table = append(table, "1 2")
table = append(table, "1 2 3")
for _, s := range table {
z01.ChallengeMainExam(t, strings.Fields(s)...)
z01.ChallengeMain(strings.Fields(s)...)
}
}

5
tests/go/solutions/displaylastparam/displaylastparam_test.go

@ -2,17 +2,16 @@ package main
import (
"strings"
"testing"
"github.com/01-edu/z01"
)
func TestDisplayLastParam(t *testing.T) {
func main() {
table := append(z01.MultRandWords(), " ")
table = append(table, "1")
table = append(table, "1 2")
for _, s := range table {
z01.ChallengeMainExam(t, strings.Fields(s)...)
z01.ChallengeMain(strings.Fields(s)...)
}
}

7
tests/go/solutions/displayz/displayz_test.go

@ -2,20 +2,19 @@ package main
import (
"strings"
"testing"
"github.com/01-edu/z01"
)
func TestDisplayz(t *testing.T) {
func main() {
table := append(z01.MultRandWords(), "dsfdz")
table = append(table, "")
table = append(table, "1")
table = append(table, "1")
for _, s := range table {
z01.ChallengeMainExam(t, strings.Fields(s)...)
z01.ChallengeMain(strings.Fields(s)...)
}
z01.ChallengeMainExam(t, "1", "z")
z01.ChallengeMain("1", "z")
}

5
tests/go/solutions/doopprog/doopprog_test.go

@ -2,14 +2,13 @@ package main
import (
"strings"
"testing"
"strconv"
"github.com/01-edu/z01"
)
func TestDoopProg(t *testing.T) {
func main() {
operatorsTable := []string{"+", "-", "*", "/", "%"}
table := []string{}
@ -39,6 +38,6 @@ func TestDoopProg(t *testing.T) {
table = append(table, "9223372036854775807 * 3")
for _, s := range table {
z01.ChallengeMainExam(t, strings.Fields(s)...)
z01.ChallengeMain(strings.Fields(s)...)
}
}

8
tests/go/solutions/expandstr/expandstr_test.go

@ -1,12 +1,10 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestExpandStr(t *testing.T) {
func main() {
arg1 := []string{"hello", "you"}
arg2 := []string{" only it's harder "}
arg3 := []string{"you see it's easy to display the same thing"}
@ -19,7 +17,7 @@ func TestExpandStr(t *testing.T) {
}
for _, v := range args {
z01.ChallengeMainExam(t, v...)
z01.ChallengeMain(v...)
}
z01.ChallengeMainExam(t)
z01.ChallengeMain()
}

6
tests/go/solutions/firstword/firstword_test.go

@ -1,12 +1,10 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestFirstWord(t *testing.T) {
func main() {
table := append(z01.MultRandWords(),
"",
" a as",
@ -18,6 +16,6 @@ func TestFirstWord(t *testing.T) {
table = append(table, "salut ! !")
for _, s := range table {
z01.ChallengeMainExam(t, s)
z01.ChallengeMain(s)
}
}

5
tests/go/solutions/fprime/fprime_test.go

@ -3,12 +3,11 @@ package main
import (
"strconv"
"strings"
"testing"
"github.com/01-edu/z01"
)
func TestFprime(t *testing.T) {
func main() {
table := []string{}
for i := 0; i < 10; i++ {
table = append(table, strconv.Itoa(z01.RandIntBetween(1, 100)))
@ -28,6 +27,6 @@ func TestFprime(t *testing.T) {
table = append(table, "1000003")
for _, s := range table {
z01.ChallengeMainExam(t, strings.Fields(s)...)
z01.ChallengeMain(strings.Fields(s)...)
}
}

5
tests/go/solutions/gcd/gcd_test.go

@ -2,12 +2,11 @@ package main
import (
"strconv"
"testing"
"github.com/01-edu/z01"
)
func TestGCD(t *testing.T) {
func main() {
arg1 := []string{"23"}
arg2 := []string{"12", "23"}
arg3 := []string{"25", "15"}
@ -22,6 +21,6 @@ func TestGCD(t *testing.T) {
}
for _, v := range args {
z01.ChallengeMainExam(t, v...)
z01.ChallengeMain(v...)
}
}

6
tests/go/solutions/grouping/grouping_test.go

@ -1,12 +1,10 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestGrouping(t *testing.T) {
func main() {
type args struct {
first string
second string
@ -33,7 +31,7 @@ func TestGrouping(t *testing.T) {
arr = append(arr, helper)
for _, s := range arr {
z01.ChallengeMainExam(t, s.first, s.second)
z01.ChallengeMain(s.first, s.second)
}
}

6
tests/go/solutions/hello/hello_test.go

@ -1,11 +1,9 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestHello(t *testing.T) {
z01.ChallengeMainExam(t)
func main() {
z01.ChallengeMain()
}

6
tests/go/solutions/hiddenp/hiddenp_test.go

@ -1,12 +1,10 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestHiddenP(t *testing.T) {
func main() {
arg1 := []string{"fgex.;", "tyf34gdgf;'ektufjhgdgex.;.;rtjynur6"}
arg2 := []string{"abc", "2altrb53c.sse"}
arg3 := []string{"abc", "btarc"}
@ -43,6 +41,6 @@ func TestHiddenP(t *testing.T) {
}
for _, v := range args {
z01.ChallengeMainExam(t, v...)
z01.ChallengeMain(v...)
}
}

5
tests/go/solutions/inter/inter_test.go

@ -2,12 +2,11 @@ package main
import (
"strings"
"testing"
"github.com/01-edu/z01"
)
func TestInter(t *testing.T) {
func main() {
table := append(z01.MultRandWords(),
"padinton paqefwtdjetyiytjneytjoeyjnejeyj",
"ddf6vewg64f twthgdwthdwfteewhrtag6h4ffdhsd",
@ -26,6 +25,6 @@ func TestInter(t *testing.T) {
}
for _, s := range table {
z01.ChallengeMainExam(t, strings.Fields(s)...)
z01.ChallengeMain(strings.Fields(s)...)
}
}

7
tests/go/solutions/ispowerof2/ispowerof2_test.go

@ -3,12 +3,11 @@ package main
import (
"strconv"
"strings"
"testing"
"github.com/01-edu/z01"
)
func TestIsPowerOf2(t *testing.T) {
func main() {
var args []string
for i := 1; i < 5; i++ {
args = append(args, strconv.Itoa(i))
@ -24,7 +23,7 @@ func TestIsPowerOf2(t *testing.T) {
args = append(args, "8388608")
for _, v := range args {
z01.ChallengeMainExam(t, strings.Fields(v)...)
z01.ChallengeMain(strings.Fields(v)...)
}
z01.ChallengeMainExam(t, "1", "2")
z01.ChallengeMain("1", "2")
}

10
tests/go/solutions/lastword/lastword_test.go

@ -1,12 +1,10 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestLastWord(t *testing.T) {
func main() {
args := []string{
"FOR PONY",
"this ... is sparta, then again, maybe not",
@ -19,9 +17,9 @@ func TestLastWord(t *testing.T) {
}
for _, v := range args {
z01.ChallengeMainExam(t, v)
z01.ChallengeMain(v)
}
z01.ChallengeMainExam(t, "a", "b")
z01.ChallengeMainExam(t)
z01.ChallengeMain("a", "b")
z01.ChallengeMain()
}

6
tests/go/solutions/nenokku/nenokku_test.go

@ -1,8 +1,6 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
@ -10,7 +8,7 @@ type node struct {
operations []string
}
func TestNenokku(t *testing.T) {
func main() {
table := []node{}
table = append(table,
@ -50,6 +48,6 @@ func TestNenokku(t *testing.T) {
}
for _, arg := range table {
z01.ChallengeMainExam(t, arg.operations...)
z01.ChallengeMain(arg.operations...)
}
}

6
tests/go/solutions/onlya/onlya_test.go

@ -1,11 +1,9 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestOnlya(t *testing.T) {
z01.ChallengeMainExam(t)
func main() {
z01.ChallengeMain()
}

6
tests/go/solutions/onlyz/onlyz_test.go

@ -1,11 +1,9 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestOnlyz(t *testing.T) {
z01.ChallengeMainExam(t)
func main() {
z01.ChallengeMain()
}

5
tests/go/solutions/options/options_test.go

@ -2,12 +2,11 @@ package main
import (
"strings"
"testing"
"github.com/01-edu/z01"
)
func TestOptions(t *testing.T) {
func main() {
var table []string
table = append(table, "-"+z01.RandLower(),
@ -30,6 +29,6 @@ func TestOptions(t *testing.T) {
)
for _, s := range table {
z01.ChallengeMainExam(t, strings.Fields(s)...)
z01.ChallengeMain(strings.Fields(s)...)
}
}

7
tests/go/solutions/paramcount/paramcount_test.go

@ -2,12 +2,11 @@ package main
import (
"strconv"
"testing"
"github.com/01-edu/z01"
)
func TestParamCount(t *testing.T) {
func main() {
arg1 := []string{"2", "5", "u", "19"}
arg2 := []string{"2"}
arg3 := []string{"1", "2", "3", "5", "7", "24"}
@ -29,8 +28,8 @@ func TestParamCount(t *testing.T) {
}
for _, v := range args {
z01.ChallengeMainExam(t, v...)
z01.ChallengeMain(v...)
}
z01.ChallengeMainExam(t)
z01.ChallengeMain()
}

6
tests/go/solutions/piglatin/piglatin_test.go

@ -1,12 +1,10 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestPigLatin(t *testing.T) {
func main() {
type args struct {
first []string
}
@ -17,6 +15,6 @@ func TestPigLatin(t *testing.T) {
}
for _, v := range arr {
z01.ChallengeMainExam(t, v.first...)
z01.ChallengeMain(v.first...)
}
}

6
tests/go/solutions/printalphabetprog/printalphabetprog_test.go

@ -1,11 +1,9 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestPrintAlphabetProg(t *testing.T) {
z01.ChallengeMainExam(t)
func main() {
z01.ChallengeMain()
}

5
tests/go/solutions/printbits/printbits_test.go

@ -3,12 +3,11 @@ package main
import (
"strconv"
"strings"
"testing"
"github.com/01-edu/z01"
)
func TestPrintBits(t *testing.T) {
func main() {
var arg []string
for i := 0; i < 20; i++ {
arg = append(arg, strconv.Itoa(z01.RandIntBetween(0, 255)))
@ -21,6 +20,6 @@ func TestPrintBits(t *testing.T) {
arg = append(arg, z01.RandBasic())
for _, v := range arg {
z01.ChallengeMainExam(t, strings.Fields(v)...)
z01.ChallengeMain(strings.Fields(v)...)
}
}

5
tests/go/solutions/printchessboard/printchessboard_test.go

@ -2,12 +2,11 @@ package main
import (
"strconv"
"testing"
"github.com/01-edu/z01"
)
func TestPrintChessBoard(t *testing.T) {
func main() {
table := [][]string{}
table = append(table,
@ -28,6 +27,6 @@ func TestPrintChessBoard(t *testing.T) {
}
for _, v := range table {
z01.ChallengeMainExam(t, v...)
z01.ChallengeMain(v...)
}
}

6
tests/go/solutions/printcombprog/printcombprog_test.go

@ -1,11 +1,9 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestPrintCombProg(t *testing.T) {
z01.ChallengeMainExam(t)
func main() {
z01.ChallengeMain()
}

6
tests/go/solutions/printdigitsprog/printdigitsprog_test.go

@ -1,11 +1,9 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestPrintDigitsProg(t *testing.T) {
z01.ChallengeMainExam(t)
func main() {
z01.ChallengeMain()
}

5
tests/go/solutions/printhex/printhex_test.go

@ -3,12 +3,11 @@ package main
import (
"strconv"
"strings"
"testing"
"github.com/01-edu/z01"
)
func TestPrintHex(t *testing.T) {
func main() {
var table []string
table = append(table,
" ",
@ -25,6 +24,6 @@ func TestPrintHex(t *testing.T) {
}
for _, s := range table {
z01.ChallengeMainExam(t, strings.Fields(s)...)
z01.ChallengeMain(strings.Fields(s)...)
}
}

6
tests/go/solutions/printrevcombprog/printrevcombprog_test.go

@ -1,11 +1,9 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestPrintRevCombProg(t *testing.T) {
z01.ChallengeMainExam(t)
func main() {
z01.ChallengeMain()
}

6
tests/go/solutions/printreversealphabetprog/printreversealphabetprog_test.go

@ -1,11 +1,9 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestPrintReverseAlphabetProg(t *testing.T) {
z01.ChallengeMainExam(t)
func main() {
z01.ChallengeMain()
}

8
tests/go/solutions/printstrprog/printstrprog_test.go

@ -1,15 +1,13 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestPrintStrProg(t *testing.T) {
func main() {
table := z01.MultRandASCII()
for _, arg := range table {
z01.ChallengeMainExam(t, arg)
z01.ChallengeMain(arg)
}
z01.ChallengeMainExam(t, "Hello World!")
z01.ChallengeMain("Hello World!")
}

17
tests/go/solutions/range/range_test.go

@ -2,21 +2,20 @@ package main
import (
"strconv"
"testing"
"github.com/01-edu/z01"
)
func TestRange(t *testing.T) {
func main() {
for i := 0; i < 10; i++ {
start := z01.RandIntBetween(-20, 20)
end := z01.RandIntBetween(-20, 20)
z01.ChallengeMainExam(t, strconv.Itoa(start), strconv.Itoa(end))
z01.ChallengeMain(strconv.Itoa(start), strconv.Itoa(end))
}
z01.ChallengeMainExam(t, "2", "1", "3")
z01.ChallengeMainExam(t, "a", "1")
z01.ChallengeMainExam(t, "1", "b")
z01.ChallengeMainExam(t, "1", "nan")
z01.ChallengeMainExam(t, "nan", "b")
z01.ChallengeMainExam(t)
z01.ChallengeMain("2", "1", "3")
z01.ChallengeMain("a", "1")
z01.ChallengeMain("1", "b")
z01.ChallengeMain("1", "nan")
z01.ChallengeMain("nan", "b")
z01.ChallengeMain()
}

6
tests/go/solutions/repeatalpha/repeatalpha_test.go

@ -1,12 +1,10 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestRepeatAlpha(t *testing.T) {
func main() {
args := []string{"Hello",
"World",
"Home",
@ -21,6 +19,6 @@ func TestRepeatAlpha(t *testing.T) {
}
for _, v := range args {
z01.ChallengeMainExam(t, v)
z01.ChallengeMain(v)
}
}

17
tests/go/solutions/reverserange/reverserange_test.go

@ -2,21 +2,20 @@ package main
import (
"strconv"
"testing"
"github.com/01-edu/z01"
)
func TestReverseRange(t *testing.T) {
func main() {
for i := 0; i < 10; i++ {
start := z01.RandIntBetween(-20, 20)
end := z01.RandIntBetween(-20, 20)
z01.ChallengeMainExam(t, strconv.Itoa(start), strconv.Itoa(end))
z01.ChallengeMain(strconv.Itoa(start), strconv.Itoa(end))
}
z01.ChallengeMainExam(t, "2", "1", "3")
z01.ChallengeMainExam(t, "a", "1")
z01.ChallengeMainExam(t, "1", "b")
z01.ChallengeMainExam(t, "1", "nan")
z01.ChallengeMainExam(t, "nan", "b")
z01.ChallengeMainExam(t)
z01.ChallengeMain("2", "1", "3")
z01.ChallengeMain("a", "1")
z01.ChallengeMain("1", "b")
z01.ChallengeMain("1", "nan")
z01.ChallengeMain("nan", "b")
z01.ChallengeMain()
}

8
tests/go/solutions/reversestrcap/reversestrcap_test.go

@ -1,12 +1,10 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestReverseStrCap(t *testing.T) {
func main() {
arg1 := []string{"First SMALL TesT"}
arg2 := []string{"SEconD Test IS a LItTLE EasIEr", "bEwaRe IT'S NoT HARd WhEN ", " Go a dernier 0123456789 for the road e"}
args := [][]string{arg1, arg2}
@ -18,7 +16,7 @@ func TestReverseStrCap(t *testing.T) {
args = append(args, []string{""})
for _, v := range args {
z01.ChallengeMainExam(t, v...)
z01.ChallengeMain(v...)
}
z01.ChallengeMainExam(t)
z01.ChallengeMain()
}

10
tests/go/solutions/revwstr/revwstr_test.go

@ -1,12 +1,10 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestRevWstr(t *testing.T) {
func main() {
table := []string{}
table = append(table,
@ -28,9 +26,9 @@ func TestRevWstr(t *testing.T) {
}
for _, s := range table {
z01.ChallengeMainExam(t, s)
z01.ChallengeMain(s)
}
z01.ChallengeMainExam(t)
z01.ChallengeMainExam(t, "1param", "2param", "3param", "4param")
z01.ChallengeMain()
z01.ChallengeMain("1param", "2param", "3param", "4param")
}

6
tests/go/solutions/robottoorigin/robottoorigin_test.go

@ -1,12 +1,10 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestRobotToOrigin(t *testing.T) {
func main() {
table := []string{}
table = append(table,
@ -20,6 +18,6 @@ func TestRobotToOrigin(t *testing.T) {
}
for _, arg := range table {
z01.ChallengeMainExam(t, arg)
z01.ChallengeMain(arg)
}
}

5
tests/go/solutions/romannumbers/romannumbers_test.go

@ -2,12 +2,11 @@ package main
import (
"strconv"
"testing"
"github.com/01-edu/z01"
)
func TestRomanNumbers(t *testing.T) {
func main() {
rand := []string{
"0",
"4000",
@ -20,6 +19,6 @@ func TestRomanNumbers(t *testing.T) {
rand = append(rand, strconv.Itoa(z01.RandIntBetween(0, 4000)))
}
for _, v := range rand {
z01.ChallengeMainExam(t, v)
z01.ChallengeMain(v)
}
}

12
tests/go/solutions/rostring/rostring_test.go

@ -1,12 +1,10 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestRoString(t *testing.T) {
func main() {
corrArgs := []string{"abc ",
"Let there be light",
" AkjhZ zLKIJz , 23y",
@ -19,13 +17,13 @@ func TestRoString(t *testing.T) {
}
for _, v := range corrArgs {
z01.ChallengeMainExam(t, v)
z01.ChallengeMain(v)
}
//without parameter
z01.ChallengeMainExam(t)
z01.ChallengeMain()
//with more than one parameter
z01.ChallengeMainExam(t, "this", "is")
z01.ChallengeMainExam(t, "not", "good", "for you")
z01.ChallengeMain("this", "is")
z01.ChallengeMain("not", "good", "for you")
}

10
tests/go/solutions/rot13/rot13_test.go

@ -1,19 +1,17 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestRot13(t *testing.T) {
func main() {
table := append(z01.MultRandWords(), " ")
table = append(table, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPRSTUVWXYZ")
table = append(table, "a b c d e f g h ijklmnopqrstuvwxyz A B C D E FGHIJKLMNOPRSTUVWXYZ")
for _, s := range table {
z01.ChallengeMainExam(t, s)
z01.ChallengeMain(s)
}
z01.ChallengeMainExam(t, "1 argument", "2 arguments")
z01.ChallengeMainExam(t, "1 argument", "2 arguments", "3 arguments")
z01.ChallengeMain("1 argument", "2 arguments")
z01.ChallengeMain("1 argument", "2 arguments", "3 arguments")
}

8
tests/go/solutions/rot14prog/rot14prog_test.go

@ -1,12 +1,10 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestRot14Prog(t *testing.T) {
func main() {
type nodeTest struct {
data []string
}
@ -21,8 +19,8 @@ func TestRot14Prog(t *testing.T) {
for _, arg := range table {
for _, s := range arg.data {
z01.ChallengeMainExam(t, ""+s+"")
z01.ChallengeMain("" + s + "")
}
}
z01.ChallengeMainExam(t, "", "something", "something1")
z01.ChallengeMain("", "something", "something1")
}

10
tests/go/solutions/rpncalc/rpncalc_test.go

@ -1,12 +1,10 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestRpnCalc(t *testing.T) {
func main() {
args := []string{
"1 2 * 3 * 4 +",
"3 1 2 * * 4 %",
@ -25,8 +23,8 @@ func TestRpnCalc(t *testing.T) {
}
for _, v := range args {
z01.ChallengeMainExam(t, v)
z01.ChallengeMain(v)
}
z01.ChallengeMainExam(t)
z01.ChallengeMainExam(t, "1 2 * 3 * 4 +", "10 33 - 12 %")
z01.ChallengeMain()
z01.ChallengeMain("1 2 * 3 * 4 +", "10 33 - 12 %")
}

6
tests/go/solutions/searchreplace/searchreplace_test.go

@ -1,12 +1,10 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestSearchReplace(t *testing.T) {
func main() {
type nodeTest struct {
dataSearched string
letterLookedFor string
@ -46,6 +44,6 @@ func TestSearchReplace(t *testing.T) {
)
for _, arg := range table {
z01.ChallengeMainExam(t, arg.dataSearched, arg.letterLookedFor, arg.letterReplacing)
z01.ChallengeMain(arg.dataSearched, arg.letterLookedFor, arg.letterReplacing)
}
}

6
tests/go/solutions/strrevprog/strrevprog_test.go

@ -1,12 +1,10 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestStrRevProg(t *testing.T) {
func main() {
table := append(
z01.MultRandASCII(),
"Hello!",
@ -14,6 +12,6 @@ func TestStrRevProg(t *testing.T) {
"Hola!",
)
for _, arg := range table {
z01.ChallengeMainExam(t, arg)
z01.ChallengeMain(arg)
}
}

6
tests/go/solutions/switchcase/switchcase_test.go

@ -1,17 +1,15 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestSwitchcase(t *testing.T) {
func main() {
table := append(z01.MultRandWords(), " ")
table = append(table, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
table = append(table, "abcdefghi jklmnop qrstuvwxyz ABCDEFGHI JKLMNOPQR STUVWXYZ ! ")
for _, s := range table {
z01.ChallengeMainExam(t, s)
z01.ChallengeMain(s)
}
}

5
tests/go/solutions/tabmult/tabmult_test.go

@ -2,12 +2,11 @@ package main
import (
"strconv"
"testing"
"github.com/01-edu/z01"
)
func TestTabMult(t *testing.T) {
func main() {
var table []string
for i := 1; i < 10; i++ {
table = append(table, strconv.Itoa(i))
@ -17,6 +16,6 @@ func TestTabMult(t *testing.T) {
}
for _, arg := range table {
z01.ChallengeMainExam(t, arg)
z01.ChallengeMain(arg)
}
}

5
tests/go/solutions/union/union_test.go

@ -2,12 +2,11 @@ package main
import (
"strings"
"testing"
"github.com/01-edu/z01"
)
func TestUnion(t *testing.T) {
func main() {
arg1 := []string{"zpadinton", "paqefwtdjetyiytjneytjoeyjnejeyj"}
arg2 := []string{"ddf6vewg64f", "gtwthgdwthdwfteewhrtag6h4ffdhsd"}
arg3 := []string{""}
@ -23,6 +22,6 @@ func TestUnion(t *testing.T) {
args := [][]string{arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8}
for _, v := range args {
z01.ChallengeMainExam(t, v...)
z01.ChallengeMain(v...)
}
}

6
tests/go/solutions/uniqueoccurences/uniqueoccurences_test.go

@ -1,12 +1,10 @@
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestUniqueOccurences(t *testing.T) {
func main() {
table := []string{}
table = append(table,
@ -22,6 +20,6 @@ func TestUniqueOccurences(t *testing.T) {
}
for _, arg := range table {
z01.ChallengeMainExam(t, arg)
z01.ChallengeMain(arg)
}
}

5
tests/go/solutions/wdmatch/wdmatch_test.go

@ -2,12 +2,11 @@ package main
import (
"strings"
"testing"
"github.com/01-edu/z01"
)
func TestWdMatch(t *testing.T) {
func main() {
table := append(z01.MultRandWords(),
" ",
"faya fgvvfdxcacpolhyghbreda",
@ -17,6 +16,6 @@ func TestWdMatch(t *testing.T) {
)
for _, s := range table {
z01.ChallengeMainExam(t, strings.Fields(s)...)
z01.ChallengeMain(strings.Fields(s)...)
}
}

8
tests/go/sortparams_test.go

@ -1,12 +1,10 @@
package student_test
package main
import (
"testing"
"github.com/01-edu/z01"
)
func TestSortParams(t *testing.T) {
func main() {
args := []string{"1", "a", "2", "A", "3", "b", "4", "C"}
z01.ChallengeMain(t, args...)
z01.ChallengeMain(args...)
}

Loading…
Cancel
Save