diff --git a/tests/go/atoibaseprog_test.go b/tests/go/atoibaseprog_test.go index 17e03d17..e385d031 100644 --- a/tests/go/atoibaseprog_test.go +++ b/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") } diff --git a/tests/go/boolean_test.go b/tests/go/boolean_test.go index 7bf31add..a9498036 100644 --- a/tests/go/boolean_test.go +++ b/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)...) } } diff --git a/tests/go/comcheck_test.go b/tests/go/comcheck_test.go index 989c1e73..a0ea5ce9 100644 --- a/tests/go/comcheck_test.go +++ b/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)...) } } diff --git a/tests/go/displayfile_test.go b/tests/go/displayfile_test.go index f4dd57f5..6b7cc3a4 100644 --- a/tests/go/displayfile_test.go +++ b/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)...) } } diff --git a/tests/go/doop_test.go b/tests/go/doop_test.go index 1f6dbdab..4da83165 100644 --- a/tests/go/doop_test.go +++ b/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)...) } } diff --git a/tests/go/fixthemain_test.go b/tests/go/fixthemain_test.go index c8e4ceea..831bf4f4 100644 --- a/tests/go/fixthemain_test.go +++ b/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() } diff --git a/tests/go/flags_test.go b/tests/go/flags_test.go index 528887b8..d4d18bea 100644 --- a/tests/go/flags_test.go +++ b/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) } } } diff --git a/tests/go/nbrconvertalpha_test.go b/tests/go/nbrconvertalpha_test.go index d0f56c6e..d1ba3fb2 100644 --- a/tests/go/nbrconvertalpha_test.go +++ b/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))...) } } } diff --git a/tests/go/paramcount_test.go b/tests/go/paramcount_test.go index 4a5a8d2e..40ec0a48 100644 --- a/tests/go/paramcount_test.go +++ b/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() } diff --git a/tests/go/pilot_test.go b/tests/go/pilot_test.go index 4d1302f1..831bf4f4 100644 --- a/tests/go/pilot_test.go +++ b/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() } diff --git a/tests/go/point_test.go b/tests/go/point_test.go index 27b8bc75..0939f868 100644 --- a/tests/go/point_test.go +++ b/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("") } diff --git a/tests/go/printalphabet_test.go b/tests/go/printalphabet_test.go index 18231c59..831bf4f4 100644 --- a/tests/go/printalphabet_test.go +++ b/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() } diff --git a/tests/go/printdigits_test.go b/tests/go/printdigits_test.go index dc3b6d53..831bf4f4 100644 --- a/tests/go/printdigits_test.go +++ b/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() } diff --git a/tests/go/printparams_test.go b/tests/go/printparams_test.go index 4f1e8492..6f060e2f 100644 --- a/tests/go/printparams_test.go +++ b/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)...) } } diff --git a/tests/go/printreversealphabet_test.go b/tests/go/printreversealphabet_test.go index 885fc002..831bf4f4 100644 --- a/tests/go/printreversealphabet_test.go +++ b/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() } diff --git a/tests/go/raid2_test.go b/tests/go/raid2_test.go index cbfba9f1..b1fab0cf 100644 --- a/tests/go/raid2_test.go +++ b/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") } diff --git a/tests/go/rectangle_test.go b/tests/go/rectangle_test.go index a5ae25aa..0939f868 100644 --- a/tests/go/rectangle_test.go +++ b/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("") } diff --git a/tests/go/revparams_test.go b/tests/go/revparams_test.go index 191394d0..47df036e 100644 --- a/tests/go/revparams_test.go +++ b/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...) } diff --git a/tests/go/rotatevowels_test.go b/tests/go/rotatevowels_test.go index 17c03098..f9347028 100644 --- a/tests/go/rotatevowels_test.go +++ b/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") } diff --git a/tests/go/solutions/addprimesum/addprimesum_test.go b/tests/go/solutions/addprimesum/addprimesum_test.go index 4a86894c..98fe9d4f 100644 --- a/tests/go/solutions/addprimesum/addprimesum_test.go +++ b/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)...) } } diff --git a/tests/go/solutions/alphamirror/alphamirror_test.go b/tests/go/solutions/alphamirror/alphamirror_test.go index c3cd4425..4fbb2333 100644 --- a/tests/go/solutions/alphamirror/alphamirror_test.go +++ b/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...) } } diff --git a/tests/go/solutions/balancedstring/balancedstring_test.go b/tests/go/solutions/balancedstring/balancedstring_test.go index 272604c0..bada290e 100644 --- a/tests/go/solutions/balancedstring/balancedstring_test.go +++ b/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) } } diff --git a/tests/go/solutions/brackets/brackets_test.go b/tests/go/solutions/brackets/brackets_test.go index ab63426b..fa7b4d6a 100644 --- a/tests/go/solutions/brackets/brackets_test.go +++ b/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...) } } diff --git a/tests/go/solutions/brainfuck/brainfuck_test.go b/tests/go/solutions/brainfuck/brainfuck_test.go index 5822630c..f495981c 100644 --- a/tests/go/solutions/brainfuck/brainfuck_test.go +++ b/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) } } diff --git a/tests/go/solutions/capitalizeprog/capitalizeprog_test.go b/tests/go/solutions/capitalizeprog/capitalizeprog_test.go index 4534e03b..1bfa77a1 100644 --- a/tests/go/solutions/capitalizeprog/capitalizeprog_test.go +++ b/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() } diff --git a/tests/go/solutions/cleanstr/cleanstr_test.go b/tests/go/solutions/cleanstr/cleanstr_test.go index 25db3efa..d88d0097 100644 --- a/tests/go/solutions/cleanstr/cleanstr_test.go +++ b/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...) } diff --git a/tests/go/solutions/compareprog/compareprog_test.go b/tests/go/solutions/compareprog/compareprog_test.go index 5291cc48..a2168634 100644 --- a/tests/go/solutions/compareprog/compareprog_test.go +++ b/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") } diff --git a/tests/go/solutions/costumeprofit/costumeprofit_test.go b/tests/go/solutions/costumeprofit/costumeprofit_test.go index d1c5bdd4..d8cd72ec 100644 --- a/tests/go/solutions/costumeprofit/costumeprofit_test.go +++ b/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) } } diff --git a/tests/go/solutions/countdown/countdown_test.go b/tests/go/solutions/countdown/countdown_test.go index f88c6920..831bf4f4 100644 --- a/tests/go/solutions/countdown/countdown_test.go +++ b/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() } diff --git a/tests/go/solutions/displaya/displaya_test.go b/tests/go/solutions/displaya/displaya_test.go index 396899aa..708f90db 100644 --- a/tests/go/solutions/displaya/displaya_test.go +++ b/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") } diff --git a/tests/go/solutions/displayalpham/displayalpham_test.go b/tests/go/solutions/displayalpham/displayalpham_test.go index 23bdd194..831bf4f4 100644 --- a/tests/go/solutions/displayalpham/displayalpham_test.go +++ b/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() } diff --git a/tests/go/solutions/displayalrevm/displayalrevm_test.go b/tests/go/solutions/displayalrevm/displayalrevm_test.go index 0fdbe703..831bf4f4 100644 --- a/tests/go/solutions/displayalrevm/displayalrevm_test.go +++ b/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() } diff --git a/tests/go/solutions/displayfirstparam/displayfirstparam_test.go b/tests/go/solutions/displayfirstparam/displayfirstparam_test.go index 15c8a8b7..8eece7db 100644 --- a/tests/go/solutions/displayfirstparam/displayfirstparam_test.go +++ b/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)...) } } diff --git a/tests/go/solutions/displaylastparam/displaylastparam_test.go b/tests/go/solutions/displaylastparam/displaylastparam_test.go index 11a6d113..06f51f31 100644 --- a/tests/go/solutions/displaylastparam/displaylastparam_test.go +++ b/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)...) } } diff --git a/tests/go/solutions/displayz/displayz_test.go b/tests/go/solutions/displayz/displayz_test.go index 22e5ea98..04b12c99 100644 --- a/tests/go/solutions/displayz/displayz_test.go +++ b/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") } diff --git a/tests/go/solutions/doopprog/doopprog_test.go b/tests/go/solutions/doopprog/doopprog_test.go index 16251ac6..97481436 100644 --- a/tests/go/solutions/doopprog/doopprog_test.go +++ b/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)...) } } diff --git a/tests/go/solutions/expandstr/expandstr_test.go b/tests/go/solutions/expandstr/expandstr_test.go index 4fd81958..dbb70a98 100644 --- a/tests/go/solutions/expandstr/expandstr_test.go +++ b/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() } diff --git a/tests/go/solutions/firstword/firstword_test.go b/tests/go/solutions/firstword/firstword_test.go index b0afff17..938ca928 100644 --- a/tests/go/solutions/firstword/firstword_test.go +++ b/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) } } diff --git a/tests/go/solutions/fprime/fprime_test.go b/tests/go/solutions/fprime/fprime_test.go index 5e06fcad..0e1793a7 100644 --- a/tests/go/solutions/fprime/fprime_test.go +++ b/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)...) } } diff --git a/tests/go/solutions/gcd/gcd_test.go b/tests/go/solutions/gcd/gcd_test.go index 08e89110..7d955b2c 100644 --- a/tests/go/solutions/gcd/gcd_test.go +++ b/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...) } } diff --git a/tests/go/solutions/grouping/grouping_test.go b/tests/go/solutions/grouping/grouping_test.go index 48045d80..f4152fbc 100644 --- a/tests/go/solutions/grouping/grouping_test.go +++ b/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) } } diff --git a/tests/go/solutions/hello/hello_test.go b/tests/go/solutions/hello/hello_test.go index ce0bfac6..831bf4f4 100644 --- a/tests/go/solutions/hello/hello_test.go +++ b/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() } diff --git a/tests/go/solutions/hiddenp/hiddenp_test.go b/tests/go/solutions/hiddenp/hiddenp_test.go index 40b30853..a61d1c11 100644 --- a/tests/go/solutions/hiddenp/hiddenp_test.go +++ b/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...) } } diff --git a/tests/go/solutions/inter/inter_test.go b/tests/go/solutions/inter/inter_test.go index dcf151ec..dc86caad 100644 --- a/tests/go/solutions/inter/inter_test.go +++ b/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)...) } } diff --git a/tests/go/solutions/ispowerof2/ispowerof2_test.go b/tests/go/solutions/ispowerof2/ispowerof2_test.go index 1616b7ef..00fcc37e 100644 --- a/tests/go/solutions/ispowerof2/ispowerof2_test.go +++ b/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") } diff --git a/tests/go/solutions/lastword/lastword_test.go b/tests/go/solutions/lastword/lastword_test.go index a7af9a9a..28e5134e 100644 --- a/tests/go/solutions/lastword/lastword_test.go +++ b/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() } diff --git a/tests/go/solutions/nenokku/nenokku_test.go b/tests/go/solutions/nenokku/nenokku_test.go index 71d5c59e..678c022a 100644 --- a/tests/go/solutions/nenokku/nenokku_test.go +++ b/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...) } } diff --git a/tests/go/solutions/onlya/onlya_test.go b/tests/go/solutions/onlya/onlya_test.go index a4015576..831bf4f4 100644 --- a/tests/go/solutions/onlya/onlya_test.go +++ b/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() } diff --git a/tests/go/solutions/onlyz/onlyz_test.go b/tests/go/solutions/onlyz/onlyz_test.go index ae6b26c0..831bf4f4 100644 --- a/tests/go/solutions/onlyz/onlyz_test.go +++ b/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() } diff --git a/tests/go/solutions/options/options_test.go b/tests/go/solutions/options/options_test.go index a94f6429..5153e592 100644 --- a/tests/go/solutions/options/options_test.go +++ b/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)...) } } diff --git a/tests/go/solutions/paramcount/paramcount_test.go b/tests/go/solutions/paramcount/paramcount_test.go index fc7b7bc7..40ec0a48 100644 --- a/tests/go/solutions/paramcount/paramcount_test.go +++ b/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() } diff --git a/tests/go/solutions/piglatin/piglatin_test.go b/tests/go/solutions/piglatin/piglatin_test.go index 9a3a4f75..02d69c5d 100644 --- a/tests/go/solutions/piglatin/piglatin_test.go +++ b/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...) } } diff --git a/tests/go/solutions/printalphabetprog/printalphabetprog_test.go b/tests/go/solutions/printalphabetprog/printalphabetprog_test.go index 32b138e1..831bf4f4 100644 --- a/tests/go/solutions/printalphabetprog/printalphabetprog_test.go +++ b/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() } diff --git a/tests/go/solutions/printbits/printbits_test.go b/tests/go/solutions/printbits/printbits_test.go index 621700bd..f5731159 100644 --- a/tests/go/solutions/printbits/printbits_test.go +++ b/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)...) } } diff --git a/tests/go/solutions/printchessboard/printchessboard_test.go b/tests/go/solutions/printchessboard/printchessboard_test.go index bbf56585..6c79a9c8 100644 --- a/tests/go/solutions/printchessboard/printchessboard_test.go +++ b/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...) } } diff --git a/tests/go/solutions/printcombprog/printcombprog_test.go b/tests/go/solutions/printcombprog/printcombprog_test.go index d6361950..831bf4f4 100644 --- a/tests/go/solutions/printcombprog/printcombprog_test.go +++ b/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() } diff --git a/tests/go/solutions/printdigitsprog/printdigitsprog_test.go b/tests/go/solutions/printdigitsprog/printdigitsprog_test.go index 5d97f630..831bf4f4 100644 --- a/tests/go/solutions/printdigitsprog/printdigitsprog_test.go +++ b/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() } diff --git a/tests/go/solutions/printhex/printhex_test.go b/tests/go/solutions/printhex/printhex_test.go index d21962dc..acc8e05a 100644 --- a/tests/go/solutions/printhex/printhex_test.go +++ b/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)...) } } diff --git a/tests/go/solutions/printrevcombprog/printrevcombprog_test.go b/tests/go/solutions/printrevcombprog/printrevcombprog_test.go index f70a7d70..831bf4f4 100644 --- a/tests/go/solutions/printrevcombprog/printrevcombprog_test.go +++ b/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() } diff --git a/tests/go/solutions/printreversealphabetprog/printreversealphabetprog_test.go b/tests/go/solutions/printreversealphabetprog/printreversealphabetprog_test.go index 2cf56ef8..831bf4f4 100644 --- a/tests/go/solutions/printreversealphabetprog/printreversealphabetprog_test.go +++ b/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() } diff --git a/tests/go/solutions/printstrprog/printstrprog_test.go b/tests/go/solutions/printstrprog/printstrprog_test.go index 04bc4e6c..69e063b7 100644 --- a/tests/go/solutions/printstrprog/printstrprog_test.go +++ b/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!") } diff --git a/tests/go/solutions/range/range_test.go b/tests/go/solutions/range/range_test.go index 0b62e300..70637ed5 100644 --- a/tests/go/solutions/range/range_test.go +++ b/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() } diff --git a/tests/go/solutions/repeatalpha/repeatalpha_test.go b/tests/go/solutions/repeatalpha/repeatalpha_test.go index ccd46dc7..79d7ca78 100644 --- a/tests/go/solutions/repeatalpha/repeatalpha_test.go +++ b/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) } } diff --git a/tests/go/solutions/reverserange/reverserange_test.go b/tests/go/solutions/reverserange/reverserange_test.go index 066032fb..70637ed5 100644 --- a/tests/go/solutions/reverserange/reverserange_test.go +++ b/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() } diff --git a/tests/go/solutions/reversestrcap/reversestrcap_test.go b/tests/go/solutions/reversestrcap/reversestrcap_test.go index dbc2460a..c981259c 100644 --- a/tests/go/solutions/reversestrcap/reversestrcap_test.go +++ b/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() } diff --git a/tests/go/solutions/revwstr/revwstr_test.go b/tests/go/solutions/revwstr/revwstr_test.go index 8817ffcb..f4eecb3f 100644 --- a/tests/go/solutions/revwstr/revwstr_test.go +++ b/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") } diff --git a/tests/go/solutions/robottoorigin/robottoorigin_test.go b/tests/go/solutions/robottoorigin/robottoorigin_test.go index 3ee7b719..8fa333b6 100644 --- a/tests/go/solutions/robottoorigin/robottoorigin_test.go +++ b/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) } } diff --git a/tests/go/solutions/romannumbers/romannumbers_test.go b/tests/go/solutions/romannumbers/romannumbers_test.go index 39d46d31..6bc290a8 100644 --- a/tests/go/solutions/romannumbers/romannumbers_test.go +++ b/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) } } diff --git a/tests/go/solutions/rostring/rostring_test.go b/tests/go/solutions/rostring/rostring_test.go index 921ed278..254240c7 100644 --- a/tests/go/solutions/rostring/rostring_test.go +++ b/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") } diff --git a/tests/go/solutions/rot13/rot13_test.go b/tests/go/solutions/rot13/rot13_test.go index 1fbf0bea..f150bd6e 100644 --- a/tests/go/solutions/rot13/rot13_test.go +++ b/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") } diff --git a/tests/go/solutions/rot14prog/rot14prog_test.go b/tests/go/solutions/rot14prog/rot14prog_test.go index 93448310..455c505d 100644 --- a/tests/go/solutions/rot14prog/rot14prog_test.go +++ b/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") } diff --git a/tests/go/solutions/rpncalc/rpncalc_test.go b/tests/go/solutions/rpncalc/rpncalc_test.go index f4f2d705..761ff597 100644 --- a/tests/go/solutions/rpncalc/rpncalc_test.go +++ b/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 %") } diff --git a/tests/go/solutions/searchreplace/searchreplace_test.go b/tests/go/solutions/searchreplace/searchreplace_test.go index 91880da1..f463cab0 100644 --- a/tests/go/solutions/searchreplace/searchreplace_test.go +++ b/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) } } diff --git a/tests/go/solutions/strrevprog/strrevprog_test.go b/tests/go/solutions/strrevprog/strrevprog_test.go index 4c048ab4..552392b7 100644 --- a/tests/go/solutions/strrevprog/strrevprog_test.go +++ b/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) } } diff --git a/tests/go/solutions/switchcase/switchcase_test.go b/tests/go/solutions/switchcase/switchcase_test.go index 3f4fdacd..e3c00208 100644 --- a/tests/go/solutions/switchcase/switchcase_test.go +++ b/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) } } diff --git a/tests/go/solutions/tabmult/tabmult_test.go b/tests/go/solutions/tabmult/tabmult_test.go index 8925d802..844d11be 100644 --- a/tests/go/solutions/tabmult/tabmult_test.go +++ b/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) } } diff --git a/tests/go/solutions/union/union_test.go b/tests/go/solutions/union/union_test.go index fb587f45..3874e6a3 100644 --- a/tests/go/solutions/union/union_test.go +++ b/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...) } } diff --git a/tests/go/solutions/uniqueoccurences/uniqueoccurences_test.go b/tests/go/solutions/uniqueoccurences/uniqueoccurences_test.go index db40bf37..c6f9cd66 100644 --- a/tests/go/solutions/uniqueoccurences/uniqueoccurences_test.go +++ b/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) } } diff --git a/tests/go/solutions/wdmatch/wdmatch_test.go b/tests/go/solutions/wdmatch/wdmatch_test.go index f6d0d167..771e95ec 100644 --- a/tests/go/solutions/wdmatch/wdmatch_test.go +++ b/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)...) } } diff --git a/tests/go/sortparams_test.go b/tests/go/sortparams_test.go index bb7e547c..12e7d03f 100644 --- a/tests/go/sortparams_test.go +++ b/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...) }