diff --git a/tests/go/activebits_test.go b/tests/go/activebits_test.go index 9a8ccca2..59278916 100644 --- a/tests/go/activebits_test.go +++ b/tests/go/activebits_test.go @@ -18,5 +18,4 @@ func TestActiveBits(t *testing.T) { for _, v := range args { z01.Challenge(t, student.ActiveBits, solutions.ActiveBits, v) } - } diff --git a/tests/go/advancedsortwordarr_test.go b/tests/go/advancedsortwordarr_test.go index 81c4fb3b..5e994e6d 100644 --- a/tests/go/advancedsortwordarr_test.go +++ b/tests/go/advancedsortwordarr_test.go @@ -40,5 +40,4 @@ func TestAdvancedSortWordArr(t *testing.T) { ) } } - } diff --git a/tests/go/alphacount_test.go b/tests/go/alphacount_test.go index ed01237b..f175aacb 100644 --- a/tests/go/alphacount_test.go +++ b/tests/go/alphacount_test.go @@ -25,6 +25,5 @@ func TestAlphaCount(t *testing.T) { for i := 0; i < len(arr); i++ { z01.Challenge(t, student.AlphaCount, solutions.AlphaCount, arr[i]) - } } diff --git a/tests/go/any_test.go b/tests/go/any_test.go index 0af272f1..99a4923e 100644 --- a/tests/go/any_test.go +++ b/tests/go/any_test.go @@ -19,42 +19,34 @@ func TestAny(t *testing.T) { table := []node{} for i := 0; i < 5; i++ { - functionSelected := functionsArray[z01.RandIntBetween(0, len(functionsArray)-1)] val := node{ f: functionSelected, arr: z01.MultRandWords(), } table = append(table, val) - } for i := 0; i < 5; i++ { - val := node{ f: solutions.IsNumeric, arr: z01.MultRandDigit(), } table = append(table, val) - } for i := 0; i < 5; i++ { - val := node{ f: solutions.IsLower, arr: z01.MultRandLower(), } table = append(table, val) - } for i := 0; i < 5; i++ { - val := node{ f: solutions.IsUpper, arr: z01.MultRandUpper(), } table = append(table, val) - } table = append(table, diff --git a/tests/go/appendrange_test.go b/tests/go/appendrange_test.go index d051e72c..bc276923 100644 --- a/tests/go/appendrange_test.go +++ b/tests/go/appendrange_test.go @@ -10,7 +10,6 @@ import ( ) func TestAppendRange(t *testing.T) { - type node struct { min int max int @@ -20,7 +19,6 @@ func TestAppendRange(t *testing.T) { //15 random pairs of ints for a Valid Range for i := 0; i < 15; i++ { - minVal := z01.RandIntBetween(-10000000, 1000000) gap := z01.RandIntBetween(1, 20) val := node{ @@ -31,7 +29,6 @@ func TestAppendRange(t *testing.T) { } //15 random pairs of ints with ||invalid range|| for i := 0; i < 15; i++ { - minVal := z01.RandIntBetween(-10000000, 1000000) gap := z01.RandIntBetween(1, 20) val := node{ diff --git a/tests/go/boolean_test.go b/tests/go/boolean_test.go index c4907d32..7bf31add 100644 --- a/tests/go/boolean_test.go +++ b/tests/go/boolean_test.go @@ -8,7 +8,6 @@ import ( ) func TestBoolean(t *testing.T) { - table := append(z01.MultRandWords(), "1 2 3 4 5") for _, s := range table { diff --git a/tests/go/btreedeletenode_test.go b/tests/go/btreedeletenode_test.go index 2e58513b..e9fa7b1b 100644 --- a/tests/go/btreedeletenode_test.go +++ b/tests/go/btreedeletenode_test.go @@ -97,7 +97,6 @@ func CompareTrees_delete(t *testing.T, fn interface{}, deleted string, rootOr, r if !student.BTreeIsBinary(rootS) || sel != nil { errorMessage_delete(t, fn, deleted, rootOr, root, rootS) } - } func TestBTreeDeleteNode(t *testing.T) { diff --git a/tests/go/btreeinsertdata_test.go b/tests/go/btreeinsertdata_test.go index 3d786f61..02d10495 100644 --- a/tests/go/btreeinsertdata_test.go +++ b/tests/go/btreeinsertdata_test.go @@ -125,5 +125,4 @@ func TestBTreeInsertData(t *testing.T) { rootS = student.BTreeInsertData(rootS, arg) CompareTrees_insert(t, fn, arg, root, rootS) } - } diff --git a/tests/go/btreesearchitem_test.go b/tests/go/btreesearchitem_test.go index 44136127..ed73acca 100644 --- a/tests/go/btreesearchitem_test.go +++ b/tests/go/btreesearchitem_test.go @@ -24,7 +24,6 @@ func errorMessage_search(t *testing.T, fn interface{}, root, a *solutions.TreeNo func CompareNode_search(t *testing.T, fn interface{}, arg1, a *solutions.TreeNode, b *student.TreeNode, seaVal string) { - if a == nil && b == nil { return } @@ -87,5 +86,4 @@ func TestBTreeSearchItem(t *testing.T) { selectedStu := student.BTreeSearchItem(rootS, v) CompareNode_search(t, fn, root, selectedSol, selectedStu, v) } - } diff --git a/tests/go/cat_test.go b/tests/go/cat_test.go index 05192a1e..c2d85797 100644 --- a/tests/go/cat_test.go +++ b/tests/go/cat_test.go @@ -29,7 +29,6 @@ func execC(name string, args ...string) (string, error) { } func TestCat(t *testing.T) { - var table []string pathFileName := "./student/cat/quest8.txt" pathFileName2 := "./student/cat/quest8T.txt" diff --git a/tests/go/compare_test.go b/tests/go/compare_test.go index c97c77be..95039ff9 100644 --- a/tests/go/compare_test.go +++ b/tests/go/compare_test.go @@ -38,7 +38,6 @@ func TestCompare(t *testing.T) { toCompare: wrongMatch, } table = append(table, val) - } // those are the test values from the README examples table = append(table, diff --git a/tests/go/concatparams_test.go b/tests/go/concatparams_test.go index cbf354a2..b9420e64 100644 --- a/tests/go/concatparams_test.go +++ b/tests/go/concatparams_test.go @@ -10,7 +10,6 @@ import ( ) func TestConcatParams(t *testing.T) { - table := [][]string{} //30 random slice of strings diff --git a/tests/go/convertbase_test.go b/tests/go/convertbase_test.go index bfbe8f19..b6ba974a 100644 --- a/tests/go/convertbase_test.go +++ b/tests/go/convertbase_test.go @@ -10,7 +10,6 @@ import ( ) func TestConvertBase(t *testing.T) { - type node struct { nbr string baseFrom string diff --git a/tests/go/countif_test.go b/tests/go/countif_test.go index 557b4443..0e03ed71 100644 --- a/tests/go/countif_test.go +++ b/tests/go/countif_test.go @@ -20,42 +20,34 @@ func TestCountIf(t *testing.T) { table := []node{} for i := 0; i < 5; i++ { - functionSelected := functionsArray[z01.RandIntBetween(0, len(functionsArray)-1)] val := node{ f: functionSelected, arr: z01.MultRandWords(), } table = append(table, val) - } for i := 0; i < 5; i++ { - val := node{ f: solutions.IsNumeric, arr: z01.MultRandDigit(), } table = append(table, val) - } for i := 0; i < 5; i++ { - val := node{ f: solutions.IsLower, arr: z01.MultRandLower(), } table = append(table, val) - } for i := 0; i < 5; i++ { - val := node{ f: solutions.IsUpper, arr: z01.MultRandUpper(), } table = append(table, val) - } table = append(table, diff --git a/tests/go/displayfile_test.go b/tests/go/displayfile_test.go index 53f18de5..c6c35e4f 100644 --- a/tests/go/displayfile_test.go +++ b/tests/go/displayfile_test.go @@ -9,7 +9,6 @@ import ( ) func TestDisplayfile(t *testing.T) { - var table []string pathFileName := "./student/displayfile/quest8.txt" diff --git a/tests/go/doop_test.go b/tests/go/doop_test.go index 33f28a31..1f6dbdab 100644 --- a/tests/go/doop_test.go +++ b/tests/go/doop_test.go @@ -10,7 +10,6 @@ import ( ) func TestDoop(t *testing.T) { - operatorsTable := []string{"+", "-", "*", "/", "%"} table := []string{} diff --git a/tests/go/fixthemain_test.go b/tests/go/fixthemain_test.go index e50bfaa2..c8e4ceea 100644 --- a/tests/go/fixthemain_test.go +++ b/tests/go/fixthemain_test.go @@ -7,6 +7,5 @@ import ( ) func TestFixthemain(t *testing.T) { - z01.ChallengeMain(t) } diff --git a/tests/go/foreach_test.go b/tests/go/foreach_test.go index 82583fcb..64636197 100644 --- a/tests/go/foreach_test.go +++ b/tests/go/foreach_test.go @@ -10,7 +10,6 @@ import ( ) func TestForEach(t *testing.T) { - functionsArray := []func(int){solutions.Add0, solutions.Add1, solutions.Add2, solutions.Add3} type node struct { @@ -23,14 +22,12 @@ func TestForEach(t *testing.T) { //15 random slice of random ints with a random function from selection for i := 0; i < 15; i++ { - functionSelected := functionsArray[z01.RandIntBetween(0, len(functionsArray)-1)] val := node{ f: functionSelected, arr: z01.MultRandIntBetween(-1000000, 1000000), } table = append(table, val) - } table = append(table, node{ diff --git a/tests/go/index_test.go b/tests/go/index_test.go index b424cce1..07f35b7b 100644 --- a/tests/go/index_test.go +++ b/tests/go/index_test.go @@ -40,7 +40,6 @@ func TestIndex(t *testing.T) { toFind: wrongMatch, } table = append(table, val) - } // those are the test values from the README examples table = append(table, diff --git a/tests/go/isprintable_test.go b/tests/go/isprintable_test.go index 184780a9..88fa0c6c 100644 --- a/tests/go/isprintable_test.go +++ b/tests/go/isprintable_test.go @@ -23,7 +23,6 @@ func TestIsPrintable(t *testing.T) { r[i] = letters[rand.Intn(len(letters))] } table = append(table, string(r)) - } // Special cases added to table diff --git a/tests/go/issorted_test.go b/tests/go/issorted_test.go index c87e4824..3288bd90 100644 --- a/tests/go/issorted_test.go +++ b/tests/go/issorted_test.go @@ -22,19 +22,16 @@ func TestIsSorted(t *testing.T) { //5 unordered slices for i := 0; i < 5; i++ { - functionSelected := functionsArray[z01.RandIntBetween(0, len(functionsArray)-1)] val := node{ f: functionSelected, arr: z01.MultRandIntBetween(-1000000, 1000000), } table = append(table, val) - } //5 slices ordered in ascending order for i := 0; i < 5; i++ { - functionSelected := functionsArray[z01.RandIntBetween(0, len(functionsArray)-1)] orderedArr := z01.MultRandIntBetween(-1000000, 1000000) sort.Ints(orderedArr) @@ -44,12 +41,10 @@ func TestIsSorted(t *testing.T) { arr: orderedArr, } table = append(table, val) - } //5 slices ordered in descending order for i := 0; i < 5; i++ { - functionSelected := functionsArray[z01.RandIntBetween(0, len(functionsArray)-1)] reverseArr := z01.MultRandIntBetween(-1000000, 1000000) sort.Sort(sort.Reverse(sort.IntSlice(reverseArr))) @@ -58,7 +53,6 @@ func TestIsSorted(t *testing.T) { arr: reverseArr, } table = append(table, val) - } table = append(table, node{ diff --git a/tests/go/listclear_test.go b/tests/go/listclear_test.go index 39f78d3b..8f6f52d5 100644 --- a/tests/go/listclear_test.go +++ b/tests/go/listclear_test.go @@ -69,7 +69,6 @@ func TestListClear(t *testing.T) { ) for _, arg := range table { - for i := 0; i < len(arg.Data); i++ { listPushBackTest4(link2, link, arg.Data[i]) } diff --git a/tests/go/listfind_test.go b/tests/go/listfind_test.go index b3994b75..ed63be25 100644 --- a/tests/go/listfind_test.go +++ b/tests/go/listfind_test.go @@ -77,5 +77,4 @@ func TestListFind(t *testing.T) { t.Fatalf("ListFind(ref: lksdf) == %s instead of %s\n", *aux, *aux1) } } - } diff --git a/tests/go/listforeach_test.go b/tests/go/listforeach_test.go index bf9f4b41..1ed6326e 100644 --- a/tests/go/listforeach_test.go +++ b/tests/go/listforeach_test.go @@ -82,7 +82,6 @@ func TestListForEach(t *testing.T) { }, ) for _, arg := range table { - for i := 0; i < len(arg.Data); i++ { listPushBackTest7(link2, link, arg.Data[i]) } diff --git a/tests/go/listforeachif_test.go b/tests/go/listforeachif_test.go index 592e329d..5229bfc3 100644 --- a/tests/go/listforeachif_test.go +++ b/tests/go/listforeachif_test.go @@ -57,7 +57,6 @@ func listToStringStu7(l *ListS8) string { } func listPushBackTest8(l *ListS8, l1 *List8, data interface{}) { - n := &Node8{Data: data} n1 := &NodeS8{Data: data} @@ -119,7 +118,6 @@ func TestListForEachIf(t *testing.T) { Data: solution.ConvertIntToInterface(z01.MultRandInt()), } table = append(table, val) - } // just strings for i := 0; i < 3; i++ { diff --git a/tests/go/map_test.go b/tests/go/map_test.go index 7adb5963..54129974 100644 --- a/tests/go/map_test.go +++ b/tests/go/map_test.go @@ -20,14 +20,12 @@ func TestMap(t *testing.T) { table := []node{} for i := 0; i < 15; i++ { - functionSelected := functionsArray[z01.RandIntBetween(0, len(functionsArray)-1)] val := node{ f: functionSelected, arr: z01.MultRandIntBetween(-1000000, 1000000), } table = append(table, val) - } table = append(table, node{ diff --git a/tests/go/nbrconvertalpha_test.go b/tests/go/nbrconvertalpha_test.go index 3b6f4192..d0f56c6e 100644 --- a/tests/go/nbrconvertalpha_test.go +++ b/tests/go/nbrconvertalpha_test.go @@ -9,7 +9,6 @@ import ( ) func TestNbrConvertAlpha(t *testing.T) { - type node struct { array []string } diff --git a/tests/go/printnbrinorder_test.go b/tests/go/printnbrinorder_test.go index e05fdfbc..e0f46a85 100644 --- a/tests/go/printnbrinorder_test.go +++ b/tests/go/printnbrinorder_test.go @@ -19,5 +19,4 @@ func TestPrintNbrInOrder(t *testing.T) { for _, arg := range table { z01.Challenge(t, student.PrintNbrInOrder, solutions.PrintNbrInOrder, arg) } - } diff --git a/tests/go/printwordstables_test.go b/tests/go/printwordstables_test.go index 9dc6ce7b..d8765337 100644 --- a/tests/go/printwordstables_test.go +++ b/tests/go/printwordstables_test.go @@ -11,12 +11,10 @@ import ( ) func TestPrintWordsTables(t *testing.T) { - table := [][]string{} //30 random slice of slice of strings for i := 0; i < 30; i++ { - val := solutions.SplitWhiteSpaces(strings.Join(z01.MultRandASCII(), " ")) table = append(table, val) } diff --git a/tests/go/raid1a_test.go b/tests/go/raid1a_test.go index 65c3dfd5..b202a9ea 100644 --- a/tests/go/raid1a_test.go +++ b/tests/go/raid1a_test.go @@ -9,7 +9,6 @@ import ( ) func TestRaid1a(t *testing.T) { - // testing examples of subjects table := []int{ 5, 3, diff --git a/tests/go/rectangle_test.go b/tests/go/rectangle_test.go index d574ab13..a5ae25aa 100644 --- a/tests/go/rectangle_test.go +++ b/tests/go/rectangle_test.go @@ -7,6 +7,5 @@ import ( ) func TestRectangle(t *testing.T) { - z01.ChallengeMain(t, "") } diff --git a/tests/go/rotatevowels_test.go b/tests/go/rotatevowels_test.go index a97dea5b..17c03098 100644 --- a/tests/go/rotatevowels_test.go +++ b/tests/go/rotatevowels_test.go @@ -8,7 +8,6 @@ import ( ) func TestRotateVowels(t *testing.T) { - Lower := z01.RuneRange('a', 'z') Upper := z01.RuneRange('A', 'Z') letters := Lower + Upper + " " @@ -28,5 +27,4 @@ func TestRotateVowels(t *testing.T) { z01.ChallengeMain(t, "happy thoughts", "good luck") z01.ChallengeMain(t, "al's elEphAnt is overly underweight!") z01.ChallengeMain(t, "aEi", "Ou") - } diff --git a/tests/go/solutions/addlinkednumbers/addlinkednumbers_test.go b/tests/go/solutions/addlinkednumbers/addlinkednumbers_test.go index 94a7794f..fdc8bcfd 100644 --- a/tests/go/solutions/addlinkednumbers/addlinkednumbers_test.go +++ b/tests/go/solutions/addlinkednumbers/addlinkednumbers_test.go @@ -84,7 +84,6 @@ func solNodeString(node *solNode) string { func compareNodes(t *testing.T, stuResult *stuNode, solResult *solNode, num1, num2 int) { if stuResult == nil && solResult == nil { - } else if stuResult != nil && solResult == nil { stuNum := stuNodeString(stuResult) t.Fatalf("\nAddLinkedNumbers(%v, %v) == %v instead of %v\n\n", diff --git a/tests/go/solutions/addlinkednumbers/main.go b/tests/go/solutions/addlinkednumbers/main.go index dae283a9..7b642812 100644 --- a/tests/go/solutions/addlinkednumbers/main.go +++ b/tests/go/solutions/addlinkednumbers/main.go @@ -36,5 +36,4 @@ func AddLinkedNumbers(num1, num2 *NodeAddL) *NodeAddL { } func main() { - } diff --git a/tests/go/solutions/addprimesum/addprimesum_test.go b/tests/go/solutions/addprimesum/addprimesum_test.go index 6dec6497..4a86894c 100644 --- a/tests/go/solutions/addprimesum/addprimesum_test.go +++ b/tests/go/solutions/addprimesum/addprimesum_test.go @@ -14,7 +14,6 @@ func isAPrime(nb int) bool { } if nb <= 3 { return true - } else if nb%2 == 0 || nb%3 == 0 { return false } @@ -30,7 +29,6 @@ func isAPrime(nb int) bool { } func TestAddPrimeSum(t *testing.T) { - var table []string // fill with all rpime numbers between 0 and 100 diff --git a/tests/go/solutions/addprimesum/main.go b/tests/go/solutions/addprimesum/main.go index e61d0c50..6775aaba 100644 --- a/tests/go/solutions/addprimesum/main.go +++ b/tests/go/solutions/addprimesum/main.go @@ -14,7 +14,6 @@ func isPrime(nb int) bool { } if nb <= 3 { return true - } else if nb%2 == 0 || nb%3 == 0 { return false } diff --git a/tests/go/solutions/advancedsortwordarr.go b/tests/go/solutions/advancedsortwordarr.go index c35462e9..f20cce3f 100644 --- a/tests/go/solutions/advancedsortwordarr.go +++ b/tests/go/solutions/advancedsortwordarr.go @@ -4,11 +4,10 @@ func CompArray(a, b string) int { if a < b { return -1 } - if a == b { - return 0 - } else { + if a > b { return 1 } + return 0 } func AdvancedSortWordArr(array []string, f func(a, b string) int) { @@ -17,7 +16,5 @@ func AdvancedSortWordArr(array []string, f func(a, b string) int) { array[i], array[i-1] = array[i-1], array[i] i = 0 } - } - } diff --git a/tests/go/solutions/alphamirror/main.go b/tests/go/solutions/alphamirror/main.go index 8f8a2580..f4ac4308 100644 --- a/tests/go/solutions/alphamirror/main.go +++ b/tests/go/solutions/alphamirror/main.go @@ -6,7 +6,6 @@ import ( ) func main() { - if len(os.Args) == 2 { arg := []rune(os.Args[1]) for i, ch := range arg { diff --git a/tests/go/solutions/atoibase.go b/tests/go/solutions/atoibase.go index 2bbc9aa2..64a52c86 100644 --- a/tests/go/solutions/atoibase.go +++ b/tests/go/solutions/atoibase.go @@ -22,7 +22,6 @@ func UniqueChar(s string) bool { if InStr(r[i], s[i+1:n]) { return false } - } return true } @@ -48,7 +47,6 @@ func Power(nbr int, pwr int) int { return nbr } return nbr * Power(nbr, pwr-1) - } func AtoiBase(s string, base string) int { diff --git a/tests/go/solutions/atoibaseprog/main.go b/tests/go/solutions/atoibaseprog/main.go index af6af66d..b325f9e6 100644 --- a/tests/go/solutions/atoibaseprog/main.go +++ b/tests/go/solutions/atoibaseprog/main.go @@ -20,7 +20,6 @@ func UniqueChar(s string) bool { if InStr(r[i], s[i+1:n]) { return false } - } return true } @@ -46,7 +45,6 @@ func Power(nbr int, pwr int) int { return nbr } return nbr * Power(nbr, pwr-1) - } func Index(s string, toFind string) int { @@ -79,5 +77,4 @@ func AtoiBase(s string, base string) int { } func main() { - } diff --git a/tests/go/solutions/atoiprog/main.go b/tests/go/solutions/atoiprog/main.go index 21dc185f..e09c6098 100644 --- a/tests/go/solutions/atoiprog/main.go +++ b/tests/go/solutions/atoiprog/main.go @@ -10,5 +10,4 @@ func Atoi(s string) int { } func main() { - } diff --git a/tests/go/solutions/balancedstring/balancedstring_test.go b/tests/go/solutions/balancedstring/balancedstring_test.go index 5dad2b52..272604c0 100644 --- a/tests/go/solutions/balancedstring/balancedstring_test.go +++ b/tests/go/solutions/balancedstring/balancedstring_test.go @@ -7,7 +7,6 @@ import ( ) func TestBalancedString(t *testing.T) { - // Declaration of an empty array of type string table := []string{} diff --git a/tests/go/solutions/brainfuck/brainfuck_test.go b/tests/go/solutions/brainfuck/brainfuck_test.go index b0a2a588..5822630c 100644 --- a/tests/go/solutions/brainfuck/brainfuck_test.go +++ b/tests/go/solutions/brainfuck/brainfuck_test.go @@ -8,7 +8,6 @@ import ( ) func TestBrainFuck(t *testing.T) { - // individual tests 1)Hello World! 2)Hi 3)abc 4)ABC args := []string{"++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.", diff --git a/tests/go/solutions/btree.go b/tests/go/solutions/btree.go index 88943fb3..16497ecc 100644 --- a/tests/go/solutions/btree.go +++ b/tests/go/solutions/btree.go @@ -193,7 +193,6 @@ func BTreeRotateLeft(node *TreeNode) *TreeNode { //Returns the maximum node in the subtree started by root func BTreeMax(root *TreeNode) *TreeNode { - if root == nil || root.Right == nil { return root } diff --git a/tests/go/solutions/challenge.go b/tests/go/solutions/challenge.go index 5120f23d..7860c179 100644 --- a/tests/go/solutions/challenge.go +++ b/tests/go/solutions/challenge.go @@ -86,7 +86,6 @@ func ChallengeTree(t *testing.T, fn1, fn2 interface{}, arg1 *TreeNode, arg2 interface{}, args ...interface{}) { - args1 := []interface{}{arg1} args2 := []interface{}{arg2} @@ -107,7 +106,6 @@ func ChallengeTree(t *testing.T, z01.Format(st1.Stdout), ) } - } func Challenge(t *testing.T, fn1, fn2 interface{}, arg1, arg2 interface{}, args ...interface{}) { @@ -131,7 +129,6 @@ func Challenge(t *testing.T, fn1, fn2 interface{}, arg1, arg2 interface{}, args z01.Format(st1.Stdout), ) } - } func PrintList(n *NodeI) string { diff --git a/tests/go/solutions/changeorder/changeorder_test.go b/tests/go/solutions/changeorder/changeorder_test.go index ebd7c743..04fffaa6 100644 --- a/tests/go/solutions/changeorder/changeorder_test.go +++ b/tests/go/solutions/changeorder/changeorder_test.go @@ -93,7 +93,6 @@ func compareNodes(t *testing.T, stuResult *stuNode, solResult *solNode, num1 int } func TestChangeorder(t *testing.T) { - // Declaration of the node that is going to take the group of arguments that are going to // inputed during each iteration of a Challenge between the student and the staff solution. // (note: a node is not always necessary but in this case it makes the writing of the test easier) @@ -129,7 +128,6 @@ func TestChangeorder(t *testing.T) { //Once the random node created, this iteration is added to the earlier declared table //along with the 4 specific examples taken from the examples of the readme. table = append(table, value) - } //The table with 4 specific exercises and 15 randoms is now ready to be "challenged" @@ -162,5 +160,4 @@ func TestChangeorder(t *testing.T) { // When both are satisfied with the coherence between the subject and its tests. The code can be commited // and redeployed by the team-01. // We then advised the staff team to test the new exercise invidually with their current build of the exam - } diff --git a/tests/go/solutions/changeorder/main.go b/tests/go/solutions/changeorder/main.go index dae67218..4c2a3474 100644 --- a/tests/go/solutions/changeorder/main.go +++ b/tests/go/solutions/changeorder/main.go @@ -60,5 +60,4 @@ func Changeorder(node *NodeAddL) *NodeAddL { } func main() { - } diff --git a/tests/go/solutions/chunk/main.go b/tests/go/solutions/chunk/main.go index f1d35492..b539b761 100644 --- a/tests/go/solutions/chunk/main.go +++ b/tests/go/solutions/chunk/main.go @@ -20,5 +20,4 @@ func Chunk(slice []int, size int) { } func main() { - } diff --git a/tests/go/solutions/compareprog/compareprog_test.go b/tests/go/solutions/compareprog/compareprog_test.go index 3a9521d6..5291cc48 100644 --- a/tests/go/solutions/compareprog/compareprog_test.go +++ b/tests/go/solutions/compareprog/compareprog_test.go @@ -35,7 +35,6 @@ func TestCompareProg(t *testing.T) { toCompare: wrongMatch, } table = append(table, val) - } // those are the test values from the README examples table = append(table, diff --git a/tests/go/solutions/costumeprofit/costumeprofit_test.go b/tests/go/solutions/costumeprofit/costumeprofit_test.go index 3251a964..d1c5bdd4 100644 --- a/tests/go/solutions/costumeprofit/costumeprofit_test.go +++ b/tests/go/solutions/costumeprofit/costumeprofit_test.go @@ -12,7 +12,6 @@ type node struct { } func TestCostumeProfit(t *testing.T) { - table := []node{} for i := 0; i < 25; i++ { diff --git a/tests/go/solutions/countdown/main.go b/tests/go/solutions/countdown/main.go index ac44c1f8..aec32ddd 100644 --- a/tests/go/solutions/countdown/main.go +++ b/tests/go/solutions/countdown/main.go @@ -5,7 +5,6 @@ import "fmt" func main() { count := 9 for count != -1 { - fmt.Print(count) count-- } diff --git a/tests/go/solutions/countif.go b/tests/go/solutions/countif.go index 7c24ea4c..0734edd2 100644 --- a/tests/go/solutions/countif.go +++ b/tests/go/solutions/countif.go @@ -1,7 +1,6 @@ package solutions func CountIf(f func(string) bool, arr []string) int { - counter := 0 for _, el := range arr { if f(el) { @@ -10,5 +9,4 @@ func CountIf(f func(string) bool, arr []string) int { } return counter - } diff --git a/tests/go/solutions/displayfile/main.go b/tests/go/solutions/displayfile/main.go index cd67714e..616c9c10 100644 --- a/tests/go/solutions/displayfile/main.go +++ b/tests/go/solutions/displayfile/main.go @@ -7,7 +7,6 @@ import ( ) func main() { - if len(os.Args) < 2 { fmt.Println("File name missing") return diff --git a/tests/go/solutions/doopprog/doopprog_test.go b/tests/go/solutions/doopprog/doopprog_test.go index fa0e4750..16251ac6 100644 --- a/tests/go/solutions/doopprog/doopprog_test.go +++ b/tests/go/solutions/doopprog/doopprog_test.go @@ -10,7 +10,6 @@ import ( ) func TestDoopProg(t *testing.T) { - operatorsTable := []string{"+", "-", "*", "/", "%"} table := []string{} diff --git a/tests/go/solutions/doppelgangerprog/main.go b/tests/go/solutions/doppelgangerprog/main.go index c71f3314..85169a68 100644 --- a/tests/go/solutions/doppelgangerprog/main.go +++ b/tests/go/solutions/doppelgangerprog/main.go @@ -12,5 +12,4 @@ func DoppelGanger(big, little string) int { } func main() { - } diff --git a/tests/go/solutions/fib/fib_test.go b/tests/go/solutions/fib/fib_test.go index 0bb226f7..aacfe69d 100644 --- a/tests/go/solutions/fib/fib_test.go +++ b/tests/go/solutions/fib/fib_test.go @@ -9,7 +9,6 @@ import ( ) func TestFib(t *testing.T) { - // Declaration of the node that is going to take the group of arguments that are going to // inputed during each iteration of a Challenge between the student and the staff solution. // (note: a node is not always necessary but in this case it makes the writing of the test easier) @@ -48,7 +47,6 @@ func TestFib(t *testing.T) { //Once the random node created, this iteration is added to the earlier declared table //along with the 4 specific examples taken from the examples of the readme. table = append(table, value) - } //The table with 4 specific exercises and 15 randoms is now ready to be "challenged" @@ -78,5 +76,4 @@ func TestFib(t *testing.T) { // When both are satisfied with the coherence between the subject and its tests. The code can be commited // and redeployed by the team-01. // We then advised the staff team to test the new exercise invidually with their current build of the exam - } diff --git a/tests/go/solutions/fib/main.go b/tests/go/solutions/fib/main.go index 789c8f20..702c1f2b 100644 --- a/tests/go/solutions/fib/main.go +++ b/tests/go/solutions/fib/main.go @@ -33,5 +33,4 @@ func Fib(n int) int { } func main() { - } diff --git a/tests/go/solutions/findprevprime.go b/tests/go/solutions/findprevprime.go index 39130c67..461480e0 100644 --- a/tests/go/solutions/findprevprime.go +++ b/tests/go/solutions/findprevprime.go @@ -8,5 +8,4 @@ func FindPrevPrime(nbr int) int { return nbr } return FindPrevPrime(nbr - 1) - } diff --git a/tests/go/solutions/findprevprimeprog/main.go b/tests/go/solutions/findprevprimeprog/main.go index 0f73dfe7..af1d1184 100644 --- a/tests/go/solutions/findprevprimeprog/main.go +++ b/tests/go/solutions/findprevprimeprog/main.go @@ -1,7 +1,6 @@ package main func main() { - } func FindPrevPrime(nbr int) int { @@ -12,11 +11,9 @@ func FindPrevPrime(nbr int) int { return nbr } return FindPrevPrime(nbr - 1) - } func IsPrime(nb int) bool { - if nb <= 0 || nb == 1 { return false } diff --git a/tests/go/solutions/flags/main.go b/tests/go/solutions/flags/main.go index 4330663c..9f55565b 100644 --- a/tests/go/solutions/flags/main.go +++ b/tests/go/solutions/flags/main.go @@ -59,7 +59,6 @@ func main() { fmt.Println(" ", v.shortenFlag) fmt.Println(" ", v.handler) } - } else if size <= 4 { var str []rune strToInsert := "" diff --git a/tests/go/solutions/foldint/main.go b/tests/go/solutions/foldint/main.go index 84b28d10..b8ac7126 100644 --- a/tests/go/solutions/foldint/main.go +++ b/tests/go/solutions/foldint/main.go @@ -10,5 +10,4 @@ func FoldInt(f func(int, int) int, arr []int, n int) { fmt.Println(result) } func main() { - } diff --git a/tests/go/solutions/foreach.go b/tests/go/solutions/foreach.go index 2462eb8f..ccc27fb5 100644 --- a/tests/go/solutions/foreach.go +++ b/tests/go/solutions/foreach.go @@ -5,29 +5,23 @@ import ( ) func ForEach(f func(int), arr []int) { - for _, el := range arr { f(el) } - } func Add0(nbr int) { - fmt.Println(nbr) } func Add1(nbr int) { - fmt.Println(nbr + 1) } func Add2(nbr int) { - fmt.Println(nbr + 2) } func Add3(nbr int) { - fmt.Println(nbr + 3) } diff --git a/tests/go/solutions/foreachprog/foreachprog_test.go b/tests/go/solutions/foreachprog/foreachprog_test.go index 2159e04d..80a17103 100644 --- a/tests/go/solutions/foreachprog/foreachprog_test.go +++ b/tests/go/solutions/foreachprog/foreachprog_test.go @@ -9,7 +9,6 @@ import ( ) func TestForEachProg(t *testing.T) { - functionsArray := []func(int){solutions.Add0, solutions.Add1, solutions.Add2, solutions.Add3} type node struct { @@ -22,14 +21,12 @@ func TestForEachProg(t *testing.T) { //15 random slice of random ints with a random function from selection for i := 0; i < 15; i++ { - functionSelected := functionsArray[z01.RandIntBetween(0, len(functionsArray)-1)] val := node{ f: functionSelected, arr: z01.MultRandIntBetween(-1000000, 1000000), } table = append(table, val) - } table = append(table, node{ diff --git a/tests/go/solutions/foreachprog/main.go b/tests/go/solutions/foreachprog/main.go index b4d9ef17..ee39c13c 100644 --- a/tests/go/solutions/foreachprog/main.go +++ b/tests/go/solutions/foreachprog/main.go @@ -5,33 +5,26 @@ import ( ) func ForEach(f func(int), arr []int) { - for _, el := range arr { f(el) } - } func Add0(nbr int) { - fmt.Println(nbr) } func Add1(nbr int) { - fmt.Println(nbr + 1) } func Add2(nbr int) { - fmt.Println(nbr + 2) } func Add3(nbr int) { - fmt.Println(nbr + 3) } func main() { - } diff --git a/tests/go/solutions/fprime/main.go b/tests/go/solutions/fprime/main.go index 86caef28..0a44ea34 100644 --- a/tests/go/solutions/fprime/main.go +++ b/tests/go/solutions/fprime/main.go @@ -35,5 +35,4 @@ func main() { par, _ := strconv.Atoi(os.Args[1]) fprime(par) } - } diff --git a/tests/go/solutions/game23/game23_test.go b/tests/go/solutions/game23/game23_test.go index 34663023..8eedb606 100644 --- a/tests/go/solutions/game23/game23_test.go +++ b/tests/go/solutions/game23/game23_test.go @@ -26,7 +26,6 @@ func nd(a, b int) int { } func TestGame23(t *testing.T) { - // Declaration of the node that is going to take the group of arguments that are going to // inputed during each iteration of a Challenge between the student and the staff solution. // (note: a node is not always necessary but in this case it makes the writing of the test easier) @@ -117,5 +116,4 @@ func TestGame23(t *testing.T) { // When both are satisfied with the coherence between the subject and its tests. The code can be commited // and redeployed by the team-01. // We then advised the staff team to test the new exercise invidually with their current build of the exam - } diff --git a/tests/go/solutions/gcd/gcd_test.go b/tests/go/solutions/gcd/gcd_test.go index 8e5656c0..08e89110 100644 --- a/tests/go/solutions/gcd/gcd_test.go +++ b/tests/go/solutions/gcd/gcd_test.go @@ -16,7 +16,6 @@ func TestGCD(t *testing.T) { args := [][]string{arg1, arg2, arg3, arg4, arg5} for i := 0; i < 25; i++ { - number1 := strconv.Itoa(z01.RandIntBetween(1, 100000)) number2 := strconv.Itoa(z01.RandIntBetween(1, 100)) args = append(args, []string{number1, number2}) diff --git a/tests/go/solutions/gcd/main.go b/tests/go/solutions/gcd/main.go index 7d856876..9d958957 100644 --- a/tests/go/solutions/gcd/main.go +++ b/tests/go/solutions/gcd/main.go @@ -8,7 +8,6 @@ import ( //Greatest common divisor func gcd(num1, num2 uint) uint { - for i := num1; i > 0; i-- { if num1%i == 0 && num2%i == 0 { return i @@ -29,5 +28,4 @@ func main() { v2, _ := strconv.Atoi(os.Args[2]) fmt.Println(gcd(uint(v1), uint(v2))) - } diff --git a/tests/go/solutions/grouping/grouping_test.go b/tests/go/solutions/grouping/grouping_test.go index fe8269d2..48045d80 100644 --- a/tests/go/solutions/grouping/grouping_test.go +++ b/tests/go/solutions/grouping/grouping_test.go @@ -7,7 +7,6 @@ import ( ) func TestGrouping(t *testing.T) { - type args struct { first string second string diff --git a/tests/go/solutions/halfcontestprog/halfcontestprog_test.go b/tests/go/solutions/halfcontestprog/halfcontestprog_test.go index 4d06f851..4e6d50da 100644 --- a/tests/go/solutions/halfcontestprog/halfcontestprog_test.go +++ b/tests/go/solutions/halfcontestprog/halfcontestprog_test.go @@ -50,5 +50,4 @@ func TestHalf_contest(t *testing.T) { for _, arg := range table { z01.Challenge(t, Halfcontest, solutions.Halfcontest, arg.h1, arg.m1, arg.h2, arg.m2) } - } diff --git a/tests/go/solutions/halfcontestprog/main.go b/tests/go/solutions/halfcontestprog/main.go index b717fdb5..3e423393 100644 --- a/tests/go/solutions/halfcontestprog/main.go +++ b/tests/go/solutions/halfcontestprog/main.go @@ -10,5 +10,4 @@ func Halfcontest(h1, m1, h2, m2 int) int { } func main() { - } diff --git a/tests/go/solutions/hiddenp/hiddenp_test.go b/tests/go/solutions/hiddenp/hiddenp_test.go index 13ec5a07..40b30853 100644 --- a/tests/go/solutions/hiddenp/hiddenp_test.go +++ b/tests/go/solutions/hiddenp/hiddenp_test.go @@ -22,7 +22,6 @@ func TestHiddenP(t *testing.T) { args = append(args, extraArg) args = append(args, extraArg2) - } for i := 0; i < 10; i++ { randomLowerLetter := z01.RandStr(2, z01.RuneRange('a', 'z')) @@ -32,10 +31,8 @@ func TestHiddenP(t *testing.T) { args = append(args, extraArg) args = append(args, extraArg2) - } for i := 0; i < 10; i++ { - randomLowerLetter := z01.RandStr(1, z01.RuneRange('a', 'z')) randomUpperLetter := z01.RandStr(1, z01.RuneRange('A', 'Z')) extraArg := []string{randomLowerLetter, z01.RandLower()} @@ -43,7 +40,6 @@ func TestHiddenP(t *testing.T) { args = append(args, extraArg) args = append(args, extraArg2) - } for _, v := range args { diff --git a/tests/go/solutions/hiddenp/main.go b/tests/go/solutions/hiddenp/main.go index a017ce4c..a44b6bfd 100644 --- a/tests/go/solutions/hiddenp/main.go +++ b/tests/go/solutions/hiddenp/main.go @@ -49,10 +49,8 @@ func main() { if count == len(first) { z01.PrintRune('1') - } else { z01.PrintRune('0') } z01.PrintRune('\n') - } diff --git a/tests/go/solutions/inter/inter_test.go b/tests/go/solutions/inter/inter_test.go index 24e04e2d..dcf151ec 100644 --- a/tests/go/solutions/inter/inter_test.go +++ b/tests/go/solutions/inter/inter_test.go @@ -23,7 +23,6 @@ func TestInter(t *testing.T) { table = append(table, strings.Join([]string{str1, str2}, " ")) table = append(table, strings.Join([]string{z01.RandAlnum(), z01.RandAlnum()}, " ")) - } for _, s := range table { diff --git a/tests/go/solutions/inter/main.go b/tests/go/solutions/inter/main.go index 212f1601..202ea74b 100644 --- a/tests/go/solutions/inter/main.go +++ b/tests/go/solutions/inter/main.go @@ -7,7 +7,6 @@ import ( ) func result(str1 string, str2 string) string { - arraystr1 := []rune(str1) arraystr2 := []rune(str2) sizeStr1 := len(arraystr1) @@ -25,7 +24,6 @@ func result(str1 string, str2 string) string { } func main() { - if len(os.Args) == 3 { fmt.Println(result(os.Args[1], os.Args[2])) } else { diff --git a/tests/go/solutions/interestingnumber/interestingnumber_test.go b/tests/go/solutions/interestingnumber/interestingnumber_test.go index c04ba3bd..d7836034 100644 --- a/tests/go/solutions/interestingnumber/interestingnumber_test.go +++ b/tests/go/solutions/interestingnumber/interestingnumber_test.go @@ -34,7 +34,6 @@ func TestInterestingNumber(t *testing.T) { //Once the random node created, this iteration is added to the earlier declared table //along with the 4 specific examples taken from the examples of the readme. table = append(table, value) - } for _, arg := range table { diff --git a/tests/go/solutions/interestingnumber/main.go b/tests/go/solutions/interestingnumber/main.go index 81ab3970..203a56bf 100644 --- a/tests/go/solutions/interestingnumber/main.go +++ b/tests/go/solutions/interestingnumber/main.go @@ -23,5 +23,4 @@ func InterestingNumber(n int) int { } func main() { - } diff --git a/tests/go/solutions/inverttree/main.go b/tests/go/solutions/inverttree/main.go index 424ce69d..85ab7316 100644 --- a/tests/go/solutions/inverttree/main.go +++ b/tests/go/solutions/inverttree/main.go @@ -23,5 +23,4 @@ func InvertTree(root *TNode) *TNode { } func main() { - } diff --git a/tests/go/solutions/issorted.go b/tests/go/solutions/issorted.go index ce2509e2..c1a1742e 100644 --- a/tests/go/solutions/issorted.go +++ b/tests/go/solutions/issorted.go @@ -5,9 +5,8 @@ func IsSortedBy1(a, b int) int { return -1 } else if a-b > 0 { return 1 - } else { - return 0 } + return 0 } func IsSortedBy10(a, b int) int { @@ -15,9 +14,8 @@ func IsSortedBy10(a, b int) int { return -10 } else if a-b > 0 { return 10 - } else { - return 0 } + return 0 } func IsSortedByDiff(a, b int) int { @@ -25,7 +23,6 @@ func IsSortedByDiff(a, b int) int { } func IsSorted(f func(int, int) int, arr []int) bool { - ascendingOrdered := true descendingOrdered := true @@ -42,5 +39,4 @@ func IsSorted(f func(int, int) int, arr []int) bool { } return ascendingOrdered || descendingOrdered - } diff --git a/tests/go/solutions/itoaprog/main.go b/tests/go/solutions/itoaprog/main.go index 72e2e6e4..81e0f3b1 100644 --- a/tests/go/solutions/itoaprog/main.go +++ b/tests/go/solutions/itoaprog/main.go @@ -9,5 +9,4 @@ func Itoa(v int) string { } func main() { - } diff --git a/tests/go/solutions/lcm/lcm_test.go b/tests/go/solutions/lcm/lcm_test.go index 1c4cc62a..23a56edb 100644 --- a/tests/go/solutions/lcm/lcm_test.go +++ b/tests/go/solutions/lcm/lcm_test.go @@ -9,7 +9,6 @@ import ( ) func TestLcm(t *testing.T) { - type node struct { first int second int diff --git a/tests/go/solutions/listclear.go b/tests/go/solutions/listclear.go index 0f58b3c3..d1cb250e 100644 --- a/tests/go/solutions/listclear.go +++ b/tests/go/solutions/listclear.go @@ -2,7 +2,6 @@ package solutions //cleans the list func ListClear(l *List) { - temp := l.Head next := l.Head for temp != nil { diff --git a/tests/go/solutions/listmerge.go b/tests/go/solutions/listmerge.go index 3f5cfe54..5b5df8ab 100644 --- a/tests/go/solutions/listmerge.go +++ b/tests/go/solutions/listmerge.go @@ -2,11 +2,9 @@ package solutions //merges the 2 lists in one(in the end of the first list) func ListMerge(l1 *List, l2 *List) { - if l1.Head == nil { l1.Head, l1.Tail = l2.Head, l2.Tail return } l1.Tail.Next = l2.Head - } diff --git a/tests/go/solutions/listpushfront.go b/tests/go/solutions/listpushfront.go index b73b4652..2b815d20 100644 --- a/tests/go/solutions/listpushfront.go +++ b/tests/go/solutions/listpushfront.go @@ -2,7 +2,6 @@ package solutions //inserts node on the first position of the list func ListPushFront(l *List, data interface{}) { - n := &NodeL{Data: data} if l.Head == nil { diff --git a/tests/go/solutions/listremoveifprog/main.go b/tests/go/solutions/listremoveifprog/main.go index 3e01186b..fe613ae2 100644 --- a/tests/go/solutions/listremoveifprog/main.go +++ b/tests/go/solutions/listremoveifprog/main.go @@ -30,5 +30,4 @@ func ListRemoveIf(l *List, data_ref interface{}) { } func main() { - } diff --git a/tests/go/solutions/listreverse.go b/tests/go/solutions/listreverse.go index 23812c05..919ab4d8 100644 --- a/tests/go/solutions/listreverse.go +++ b/tests/go/solutions/listreverse.go @@ -2,7 +2,6 @@ package solutions //reverses the list func ListReverse(l *List) { - current := l.Head prev := l.Head prev = nil diff --git a/tests/go/solutions/listsizeprog/main.go b/tests/go/solutions/listsizeprog/main.go index eb786bbb..e392f7f1 100644 --- a/tests/go/solutions/listsizeprog/main.go +++ b/tests/go/solutions/listsizeprog/main.go @@ -22,5 +22,4 @@ func ListSize(l *List) int { } func main() { - } diff --git a/tests/go/solutions/listsort.go b/tests/go/solutions/listsort.go index d49aa172..672b8767 100644 --- a/tests/go/solutions/listsort.go +++ b/tests/go/solutions/listsort.go @@ -1,7 +1,6 @@ package solutions func ListSort(l *NodeI) *NodeI { - Head := l if Head == nil { return nil diff --git a/tests/go/solutions/map.go b/tests/go/solutions/map.go index 0751eea3..5649d4db 100644 --- a/tests/go/solutions/map.go +++ b/tests/go/solutions/map.go @@ -9,7 +9,6 @@ func IsNegative0(value int) bool { } func Map(f func(int) bool, arr []int) []bool { - arrBool := make([]bool, len(arr)) for i, el := range arr { @@ -17,5 +16,4 @@ func Map(f func(int) bool, arr []int) []bool { } return arrBool - } diff --git a/tests/go/solutions/maxprog/main.go b/tests/go/solutions/maxprog/main.go index 644aebd7..9d11ae59 100644 --- a/tests/go/solutions/maxprog/main.go +++ b/tests/go/solutions/maxprog/main.go @@ -10,5 +10,4 @@ func Max(arr []int) int { } func main() { - } diff --git a/tests/go/solutions/merge/main.go b/tests/go/solutions/merge/main.go index 6443e09b..5afe35f1 100644 --- a/tests/go/solutions/merge/main.go +++ b/tests/go/solutions/merge/main.go @@ -20,5 +20,4 @@ func MergeTrees(t1 *TreeNodeM, t2 *TreeNodeM) *TreeNodeM { } func main() { - } diff --git a/tests/go/solutions/nauuo/main.go b/tests/go/solutions/nauuo/main.go index 6547e0a0..99253b50 100644 --- a/tests/go/solutions/nauuo/main.go +++ b/tests/go/solutions/nauuo/main.go @@ -34,5 +34,4 @@ func Nauuo(plus, minus, rand int) string { } func main() { - } diff --git a/tests/go/solutions/nauuo/nauuo_test.go b/tests/go/solutions/nauuo/nauuo_test.go index d689a964..b9b3c319 100644 --- a/tests/go/solutions/nauuo/nauuo_test.go +++ b/tests/go/solutions/nauuo/nauuo_test.go @@ -9,7 +9,6 @@ import ( ) func TestNauuo(t *testing.T) { - // Declaration of the node that is going to take the group of arguments that are going to // inputed during each iteration of a Challenge between the student and the staff solution. // (note: a node is not always necessary but in this case it makes the writing of the test easier) @@ -52,7 +51,6 @@ func TestNauuo(t *testing.T) { //Once the random node created, this iteration is added to the earlier declared table //along with the 4 specific examples taken from the examples of the readme. table = append(table, value) - } //The table with 4 specific exercises and 15 randoms is now ready to be "challenged" @@ -82,5 +80,4 @@ func TestNauuo(t *testing.T) { // When both are satisfied with the coherence between the subject and its tests. The code can be commited // and redeployed by the team-01. // We then advised the staff team to test the new exercise invidually with their current build of the exam - } diff --git a/tests/go/solutions/nbrconvertalpha/main.go b/tests/go/solutions/nbrconvertalpha/main.go index a67d33fa..614b6de7 100644 --- a/tests/go/solutions/nbrconvertalpha/main.go +++ b/tests/go/solutions/nbrconvertalpha/main.go @@ -8,7 +8,6 @@ import ( ) func IsNumeric(str string) bool { - for i := 0; i < len(str); i++ { if !(str[i] >= '0' && str[i] <= '9') { return false diff --git a/tests/go/solutions/nenokku/nenokku_test.go b/tests/go/solutions/nenokku/nenokku_test.go index 973c50ee..71d5c59e 100644 --- a/tests/go/solutions/nenokku/nenokku_test.go +++ b/tests/go/solutions/nenokku/nenokku_test.go @@ -11,7 +11,6 @@ type node struct { } func TestNenokku(t *testing.T) { - table := []node{} table = append(table, diff --git a/tests/go/solutions/printmemory/main.go b/tests/go/solutions/printmemory/main.go index bb113edf..b4e695a8 100644 --- a/tests/go/solutions/printmemory/main.go +++ b/tests/go/solutions/printmemory/main.go @@ -86,5 +86,4 @@ func PrintMemory(arr [10]int) { } func main() { - } diff --git a/tests/go/solutions/printmemory/printmemory_test.go b/tests/go/solutions/printmemory/printmemory_test.go index 50f942b4..ea10ca7b 100644 --- a/tests/go/solutions/printmemory/printmemory_test.go +++ b/tests/go/solutions/printmemory/printmemory_test.go @@ -19,5 +19,4 @@ func TestPrintMemory(t *testing.T) { } table2 := [10]int{104, 101, 108, 108, 111, 16, 21, 42} z01.Challenge(t, PrintMemory, solutions.PrintMemory, table2) - } diff --git a/tests/go/solutions/printnbrbase.go b/tests/go/solutions/printnbrbase.go index 451f2324..fac8d6ee 100644 --- a/tests/go/solutions/printnbrbase.go +++ b/tests/go/solutions/printnbrbase.go @@ -19,7 +19,6 @@ func PrintNbrBase(n int, base string) { PrintNbrBase(sign*(n/length), base) z01.PrintRune(rbase[sign*(n%length)]) } - } else { z01.PrintRune('N') z01.PrintRune('V') diff --git a/tests/go/solutions/printrevcombprog/main.go b/tests/go/solutions/printrevcombprog/main.go index 57906341..f71a7187 100644 --- a/tests/go/solutions/printrevcombprog/main.go +++ b/tests/go/solutions/printrevcombprog/main.go @@ -3,23 +3,19 @@ package main import "fmt" func main() { - for a := 9; a >= 2; { for b := a - 1; b >= 1; { for c := b - 1; c >= 0; { - if a > b && b > c && (a+b+c) != 3 { fmt.Printf("%d%d%d, ", a, b, c) } if (a + b + c) == 3 { fmt.Printf("%d%d%d\n", a, b, c) } - c-- } b-- } a-- } - } diff --git a/tests/go/solutions/priorprime/main.go b/tests/go/solutions/priorprime/main.go index 2feda143..7fd5e2b5 100644 --- a/tests/go/solutions/priorprime/main.go +++ b/tests/go/solutions/priorprime/main.go @@ -24,5 +24,4 @@ func Priorprime(x int) int { } func main() { - } diff --git a/tests/go/solutions/priorprime/priorprime_test.go b/tests/go/solutions/priorprime/priorprime_test.go index 2884f51a..bf10ae1e 100644 --- a/tests/go/solutions/priorprime/priorprime_test.go +++ b/tests/go/solutions/priorprime/priorprime_test.go @@ -9,7 +9,6 @@ import ( ) func TestPriorprime(t *testing.T) { - // Declaration of the node that is going to take the group of arguments that are going to // inputed during each iteration of a Challenge between the student and the staff solution. // (note: a node is not always necessary but in this case it makes the writing of the test easier) @@ -50,7 +49,6 @@ func TestPriorprime(t *testing.T) { //Once the random node created, this iteration is added to the earlier declared table //along with the 4 specific examples taken from the examples of the readme. table = append(table, value) - } //The table with 4 specific exercises and 15 randoms is now ready to be "challenged" @@ -80,5 +78,4 @@ func TestPriorprime(t *testing.T) { // When both are satisfied with the coherence between the subject and its tests. The code can be commited // and redeployed by the team-01. // We then advised the staff team to test the new exercise invidually with their current build of the exam - } diff --git a/tests/go/solutions/raid1a.go b/tests/go/solutions/raid1a.go index 1d260cfc..ede87425 100644 --- a/tests/go/solutions/raid1a.go +++ b/tests/go/solutions/raid1a.go @@ -22,7 +22,6 @@ func drawLine(x int, str string) { } func printTheLines(x, y int, strBeg, strMed, strEnd string) { - if y >= 1 { drawLine(x, strBeg) } diff --git a/tests/go/solutions/raid1b.go b/tests/go/solutions/raid1b.go index 5c4fb958..72042707 100644 --- a/tests/go/solutions/raid1b.go +++ b/tests/go/solutions/raid1b.go @@ -22,7 +22,6 @@ func drawLineRaid1b(x int, str string) { } func Raid1b(x, y int) { - if x < 1 || y < 1 { return } diff --git a/tests/go/solutions/raid1c.go b/tests/go/solutions/raid1c.go index 5f598170..cabc10fd 100644 --- a/tests/go/solutions/raid1c.go +++ b/tests/go/solutions/raid1c.go @@ -22,7 +22,6 @@ func drawLineRaid1c(x int, str string) { } func Raid1c(x, y int) { - if x < 1 || y < 1 { return } diff --git a/tests/go/solutions/raid1d.go b/tests/go/solutions/raid1d.go index a7894bcd..52eb7c49 100644 --- a/tests/go/solutions/raid1d.go +++ b/tests/go/solutions/raid1d.go @@ -22,7 +22,6 @@ func drawLineRaid1d(x int, str string) { } func Raid1d(x, y int) { - if x < 1 || y < 1 { return } diff --git a/tests/go/solutions/raid1e.go b/tests/go/solutions/raid1e.go index 84ce8108..a1b738a8 100644 --- a/tests/go/solutions/raid1e.go +++ b/tests/go/solutions/raid1e.go @@ -22,7 +22,6 @@ func drawLineRaid1e(x int, str string) { } func Raid1e(x, y int) { - if x < 1 || y < 1 { return } diff --git a/tests/go/solutions/range/main.go b/tests/go/solutions/range/main.go index ed79967e..db390125 100644 --- a/tests/go/solutions/range/main.go +++ b/tests/go/solutions/range/main.go @@ -18,7 +18,6 @@ func main() { return } fmt.Println(rangeOf(firstArg, secondArg)) - } else { fmt.Println() } diff --git a/tests/go/solutions/range/range_test.go b/tests/go/solutions/range/range_test.go index 1aa3d1d6..0b62e300 100644 --- a/tests/go/solutions/range/range_test.go +++ b/tests/go/solutions/range/range_test.go @@ -8,7 +8,6 @@ import ( ) func TestRange(t *testing.T) { - for i := 0; i < 10; i++ { start := z01.RandIntBetween(-20, 20) end := z01.RandIntBetween(-20, 20) diff --git a/tests/go/solutions/reachablenumberprog/main.go b/tests/go/solutions/reachablenumberprog/main.go index 79c3dc46..a34e5a31 100644 --- a/tests/go/solutions/reachablenumberprog/main.go +++ b/tests/go/solutions/reachablenumberprog/main.go @@ -18,5 +18,4 @@ func Reachablenumber(n int) int { } func main() { - } diff --git a/tests/go/solutions/reachablenumberprog/reachablenumber_test.go b/tests/go/solutions/reachablenumberprog/reachablenumber_test.go index aa261635..1eda1d48 100644 --- a/tests/go/solutions/reachablenumberprog/reachablenumber_test.go +++ b/tests/go/solutions/reachablenumberprog/reachablenumber_test.go @@ -34,7 +34,6 @@ func TestReachableNumber(t *testing.T) { //Once the random node created, this iteration is added to the earlier declared table //along with the 4 specific examples taken from the examples of the readme. table = append(table, value) - } //The table with 4 specific exercises and 15 randoms is now ready to be "challenged" diff --git a/tests/go/solutions/reduceint/main.go b/tests/go/solutions/reduceint/main.go index 116eed1c..0b09982c 100644 --- a/tests/go/solutions/reduceint/main.go +++ b/tests/go/solutions/reduceint/main.go @@ -11,5 +11,4 @@ func ReduceInt(f func(int, int) int, arr []int) { } func main() { - } diff --git a/tests/go/solutions/repeatalpha/main.go b/tests/go/solutions/repeatalpha/main.go index 4bb03806..79da72da 100644 --- a/tests/go/solutions/repeatalpha/main.go +++ b/tests/go/solutions/repeatalpha/main.go @@ -15,7 +15,6 @@ func toLowerCase(a rune) rune { } func main() { - if len(os.Args) > 1 { arg := []rune(os.Args[1]) for _, c := range arg { diff --git a/tests/go/solutions/reverse/main.go b/tests/go/solutions/reverse/main.go index 396e0109..13256dd2 100644 --- a/tests/go/solutions/reverse/main.go +++ b/tests/go/solutions/reverse/main.go @@ -32,5 +32,4 @@ func Reverse(node *NodeAddL) *NodeAddL { } func main() { - } diff --git a/tests/go/solutions/reverse/reverse_test.go b/tests/go/solutions/reverse/reverse_test.go index 17e0bc7f..b84c5b04 100644 --- a/tests/go/solutions/reverse/reverse_test.go +++ b/tests/go/solutions/reverse/reverse_test.go @@ -60,8 +60,13 @@ func solListToNum(node *solNode) int { } func compareNodes(t *testing.T, stuResult *stuNode, solResult *solNode, num1 int) { - if stuResult == nil && solResult == nil { - + if stuResult != nil && solResult != nil { + stuNum := stuListToNum(stuResult) + solNum := solListToNum(solResult) + if stuNum != solNum { + t.Fatalf("\nReverse(%d) == %v instead of %v\n\n", + num1, stuNum, solNum) + } } else if stuResult != nil && solResult == nil { stuNum := stuListToNum(stuResult) t.Fatalf("\nReverse(%d) == %v instead of %v\n\n", @@ -70,18 +75,10 @@ func compareNodes(t *testing.T, stuResult *stuNode, solResult *solNode, num1 int solNum := solListToNum(solResult) t.Fatalf("\nReverse(%d) == %v instead of %v\n\n", num1, "", solNum) - } else { - stuNum := stuListToNum(stuResult) - solNum := solListToNum(solResult) - if stuNum != solNum { - t.Fatalf("\nReverse(%d) == %v instead of %v\n\n", - num1, stuNum, solNum) - } } } func TestReverse(t *testing.T) { - // Declaration of the node that is going to take the group of arguments that are going to // inputed during each iteration of a Challenge between the student and the staff solution. // (note: a node is not always necessary but in this case it makes the writing of the test easier) @@ -117,7 +114,6 @@ func TestReverse(t *testing.T) { //Once the random node created, this iteration is added to the earlier declared table //along with the 4 specific examples taken from the examples of the readme. table = append(table, value) - } //The table with 4 specific exercises and 15 randoms is now ready to be "challenged" @@ -150,5 +146,4 @@ func TestReverse(t *testing.T) { // When both are satisfied with the coherence between the subject and its tests. The code can be commited // and redeployed by the team-01. // We then advised the staff team to test the new exercise invidually with their current build of the exam - } diff --git a/tests/go/solutions/reverserange/main.go b/tests/go/solutions/reverserange/main.go index 856a0a4e..78e67875 100644 --- a/tests/go/solutions/reverserange/main.go +++ b/tests/go/solutions/reverserange/main.go @@ -18,7 +18,6 @@ func main() { return } fmt.Println(reverseRange(firstArg, secondArg)) - } else { fmt.Println() } diff --git a/tests/go/solutions/revivethreenums/main.go b/tests/go/solutions/revivethreenums/main.go index 84dac479..12468b30 100644 --- a/tests/go/solutions/revivethreenums/main.go +++ b/tests/go/solutions/revivethreenums/main.go @@ -41,5 +41,4 @@ func Revive_three_nums(a, b, c, d int) int { } func main() { - } diff --git a/tests/go/solutions/revivethreenums/revivethreenums_test.go b/tests/go/solutions/revivethreenums/revivethreenums_test.go index 3236c79d..db266dd4 100644 --- a/tests/go/solutions/revivethreenums/revivethreenums_test.go +++ b/tests/go/solutions/revivethreenums/revivethreenums_test.go @@ -41,7 +41,6 @@ func TestRevivethreenums(t *testing.T) { //Once the random node created, this iteration is added to the earlier declared table //along with the 4 specific examples taken from the examples of the readme. table = append(table, value) - } //The table with 4 specific exercises and 15 randoms is now ready to be "challenged" diff --git a/tests/go/solutions/revwstr/revwstr_test.go b/tests/go/solutions/revwstr/revwstr_test.go index 2346e83b..8817ffcb 100644 --- a/tests/go/solutions/revwstr/revwstr_test.go +++ b/tests/go/solutions/revwstr/revwstr_test.go @@ -33,5 +33,4 @@ func TestRevWstr(t *testing.T) { z01.ChallengeMainExam(t) z01.ChallengeMainExam(t, "1param", "2param", "3param", "4param") - } diff --git a/tests/go/solutions/sametree/main.go b/tests/go/solutions/sametree/main.go index 8beb0e36..f4a1ae2c 100644 --- a/tests/go/solutions/sametree/main.go +++ b/tests/go/solutions/sametree/main.go @@ -27,5 +27,4 @@ func checkIfEq(t1 *TreeNodeL, t2 *TreeNodeL) bool { } func main() { - } diff --git a/tests/go/solutions/searchreplace/searchreplace_test.go b/tests/go/solutions/searchreplace/searchreplace_test.go index 7a6bc0bb..91880da1 100644 --- a/tests/go/solutions/searchreplace/searchreplace_test.go +++ b/tests/go/solutions/searchreplace/searchreplace_test.go @@ -7,7 +7,6 @@ import ( ) func TestSearchReplace(t *testing.T) { - type nodeTest struct { dataSearched string letterLookedFor string @@ -17,7 +16,6 @@ func TestSearchReplace(t *testing.T) { table := []nodeTest{} for i := 0; i < 20; i++ { - letter1 := []rune(z01.RandAlnum()) letter2 := []rune(z01.RandAlnum()) @@ -27,7 +25,6 @@ func TestSearchReplace(t *testing.T) { letterLookedFor: string(letter1[0]), letterReplacing: string(letter2[0]), }) - } table = append(table, diff --git a/tests/go/solutions/slice.go b/tests/go/solutions/slice.go index b342eec0..d296436f 100644 --- a/tests/go/solutions/slice.go +++ b/tests/go/solutions/slice.go @@ -1,7 +1,6 @@ package solutions func Slice(arr []string, nbr ...int) []string { - if len(nbr) == 0 { return arr } diff --git a/tests/go/solutions/sliceprog/main.go b/tests/go/solutions/sliceprog/main.go index 223d4ec2..c328d3a1 100644 --- a/tests/go/solutions/sliceprog/main.go +++ b/tests/go/solutions/sliceprog/main.go @@ -4,7 +4,6 @@ func main() { } func Slice(arr []string, nbr ...int) []string { - if len(nbr) == 0 { return arr } diff --git a/tests/go/solutions/sliceprog/sliceprog_test.go b/tests/go/solutions/sliceprog/sliceprog_test.go index 6eb228b2..768558f7 100644 --- a/tests/go/solutions/sliceprog/sliceprog_test.go +++ b/tests/go/solutions/sliceprog/sliceprog_test.go @@ -9,7 +9,6 @@ import ( ) func TestSlice(t *testing.T) { - arr := [][]interface{}{ { []string{"coding", "algorithm", "ascii", "package", "golang"}, diff --git a/tests/go/solutions/sortedlistmerge.go b/tests/go/solutions/sortedlistmerge.go index 68ecbbf2..c9f65823 100644 --- a/tests/go/solutions/sortedlistmerge.go +++ b/tests/go/solutions/sortedlistmerge.go @@ -13,5 +13,4 @@ func SortedListMerge(l1 *NodeI, l2 *NodeI) *NodeI { } l2.Next = SortedListMerge(l1, l2.Next) return l2 - } diff --git a/tests/go/solutions/sortlist.go b/tests/go/solutions/sortlist.go index af5448db..f94ab544 100644 --- a/tests/go/solutions/sortlist.go +++ b/tests/go/solutions/sortlist.go @@ -6,7 +6,6 @@ type Nodelist struct { } func SortList(l *Nodelist, cmp func(a, b int) bool) *Nodelist { - head := l if head == nil { return nil diff --git a/tests/go/solutions/sortll/main.go b/tests/go/solutions/sortll/main.go index 4a39a8a2..58cd1105 100644 --- a/tests/go/solutions/sortll/main.go +++ b/tests/go/solutions/sortll/main.go @@ -42,5 +42,4 @@ func Sortll(node *NodeAddL) *NodeAddL { return node } func main() { - } diff --git a/tests/go/solutions/sortll/sortll_test.go b/tests/go/solutions/sortll/sortll_test.go index 2800d470..a13caa29 100644 --- a/tests/go/solutions/sortll/sortll_test.go +++ b/tests/go/solutions/sortll/sortll_test.go @@ -61,7 +61,6 @@ func solListToNum(node *solNode) int { func compareNodes(t *testing.T, stuResult *stuNode, solResult *solNode, num1 int) { if stuResult == nil && solResult == nil { - } else if stuResult != nil && solResult == nil { stuNum := stuListToNum(stuResult) t.Fatalf("\nSortll(%d) == %v instead of %v\n\n", @@ -81,7 +80,6 @@ func compareNodes(t *testing.T, stuResult *stuNode, solResult *solNode, num1 int } func TestSortll(t *testing.T) { - // Declaration of the node that is going to take the group of arguments that are going to // inputed during each iteration of a Challenge between the student and the staff solution. // (note: a node is not always necessary but in this case it makes the writing of the test easier) @@ -117,7 +115,6 @@ func TestSortll(t *testing.T) { //Once the random node created, this iteration is added to the earlier declared table //along with the 4 specific examples taken from the examples of the readme. table = append(table, value) - } //The table with 4 specific exercises and 15 randoms is now ready to be "challenged" @@ -150,5 +147,4 @@ func TestSortll(t *testing.T) { // When both are satisfied with the coherence between the subject and its tests. The code can be commited // and redeployed by the team-01. // We then advised the staff team to test the new exercise invidually with their current build of the exam - } diff --git a/tests/go/solutions/sortwordarrprog/main.go b/tests/go/solutions/sortwordarrprog/main.go index b7bb48c9..756d1f1f 100644 --- a/tests/go/solutions/sortwordarrprog/main.go +++ b/tests/go/solutions/sortwordarrprog/main.go @@ -9,5 +9,4 @@ func SortWordArr(array []string) { } func main() { - } diff --git a/tests/go/solutions/splitprog/splitprog_test.go b/tests/go/solutions/splitprog/splitprog_test.go index ac228f99..9ec1b934 100644 --- a/tests/go/solutions/splitprog/splitprog_test.go +++ b/tests/go/solutions/splitprog/splitprog_test.go @@ -11,7 +11,6 @@ import ( ) func TestSplitProg(t *testing.T) { - separators := []string{"!=HA=!", "!==!", " ", diff --git a/tests/go/solutions/splitwhitespaces.go b/tests/go/solutions/splitwhitespaces.go index a7e6d674..1c765aee 100644 --- a/tests/go/solutions/splitwhitespaces.go +++ b/tests/go/solutions/splitwhitespaces.go @@ -1,7 +1,6 @@ package solutions func SplitWhiteSpaces(str string) []string { - answer := []string{} word := "" for _, r := range str { diff --git a/tests/go/solutions/strlenprog/strlenprog_test.go b/tests/go/solutions/strlenprog/strlenprog_test.go index 3287cc79..84588a35 100644 --- a/tests/go/solutions/strlenprog/strlenprog_test.go +++ b/tests/go/solutions/strlenprog/strlenprog_test.go @@ -8,7 +8,6 @@ import ( ) func TestStrLenProg(t *testing.T) { - randomStringCharset := "a b c d e f g h ijklmnopqrstuvwxyz A B C D E FGHIJKLMNOPRSTUVWXYZ" table := []string{} diff --git a/tests/go/solutions/swapbits/main.go b/tests/go/solutions/swapbits/main.go index 872f11e8..4983ca26 100644 --- a/tests/go/solutions/swapbits/main.go +++ b/tests/go/solutions/swapbits/main.go @@ -5,5 +5,4 @@ func SwapBits(n byte) byte { } func main() { - } diff --git a/tests/go/solutions/swapprog/main.go b/tests/go/solutions/swapprog/main.go index 594185c3..031538bc 100644 --- a/tests/go/solutions/swapprog/main.go +++ b/tests/go/solutions/swapprog/main.go @@ -7,5 +7,4 @@ func Swap(a, b *int) { } func main() { - } diff --git a/tests/go/solutions/sweetproblem/main.go b/tests/go/solutions/sweetproblem/main.go index 386097ed..a35a852c 100644 --- a/tests/go/solutions/sweetproblem/main.go +++ b/tests/go/solutions/sweetproblem/main.go @@ -57,5 +57,4 @@ func Sweetproblem(a, b, c int) int { } func main() { - } diff --git a/tests/go/solutions/sweetproblem/sweetproblem_test.go b/tests/go/solutions/sweetproblem/sweetproblem_test.go index d1db43c1..dc0cc700 100644 --- a/tests/go/solutions/sweetproblem/sweetproblem_test.go +++ b/tests/go/solutions/sweetproblem/sweetproblem_test.go @@ -47,7 +47,6 @@ func TestSweerproblem(t *testing.T) { //Once the random node created, this iteration is added to the earlier declared table //along with the 4 specific examples taken from the examples of the readme. table = append(table, value) - } //The table with 4 specific exercises and 15 randoms is now ready to be "challenged" diff --git a/tests/go/solutions/switchcase/main.go b/tests/go/solutions/switchcase/main.go index c3601a1b..991de3cc 100644 --- a/tests/go/solutions/switchcase/main.go +++ b/tests/go/solutions/switchcase/main.go @@ -8,7 +8,6 @@ import ( ) func main() { - if len(os.Args) != 2 { fmt.Println() } else { diff --git a/tests/go/solutions/tabmult/tabmult_test.go b/tests/go/solutions/tabmult/tabmult_test.go index 2feaca7e..8925d802 100644 --- a/tests/go/solutions/tabmult/tabmult_test.go +++ b/tests/go/solutions/tabmult/tabmult_test.go @@ -19,5 +19,4 @@ func TestTabMult(t *testing.T) { for _, arg := range table { z01.ChallengeMainExam(t, arg) } - } diff --git a/tests/go/solutions/twosum/main.go b/tests/go/solutions/twosum/main.go index 524586e7..cd6b3c50 100644 --- a/tests/go/solutions/twosum/main.go +++ b/tests/go/solutions/twosum/main.go @@ -12,5 +12,4 @@ func TwoSum(nums []int, target int) []int { } func main() { - } diff --git a/tests/go/solutions/union/main.go b/tests/go/solutions/union/main.go index 586397b7..4d46f00e 100644 --- a/tests/go/solutions/union/main.go +++ b/tests/go/solutions/union/main.go @@ -15,7 +15,6 @@ func isIn(a rune, arr []rune) bool { } func main() { - if len(os.Args) == 3 { var res []rune str1 := []rune(os.Args[1]) diff --git a/tests/go/solutions/volumechanger/main.go b/tests/go/solutions/volumechanger/main.go index 6018bec0..3e06dac4 100644 --- a/tests/go/solutions/volumechanger/main.go +++ b/tests/go/solutions/volumechanger/main.go @@ -12,5 +12,4 @@ func Volumechanger(a, b int) int { } func main() { - } diff --git a/tests/go/solutions/volumechanger/volumechanger_test.go b/tests/go/solutions/volumechanger/volumechanger_test.go index 832f3076..d5ac33cb 100644 --- a/tests/go/solutions/volumechanger/volumechanger_test.go +++ b/tests/go/solutions/volumechanger/volumechanger_test.go @@ -35,7 +35,6 @@ func TestVolumechanger(t *testing.T) { //Once the random node created, this iteration is added to the earlier declared table //along with the 4 specific examples taken from the examples of the readme. table = append(table, value) - } //The table with 4 specific exercises and 15 randoms is now ready to be "challenged" diff --git a/tests/go/solutions/ztail/main.go b/tests/go/solutions/ztail/main.go index c9755421..0e4d2bdc 100644 --- a/tests/go/solutions/ztail/main.go +++ b/tests/go/solutions/ztail/main.go @@ -34,7 +34,6 @@ func numberOfBytes(args []string) (int, []string) { if err != nil { files = append(files, v) } - } return nbytes, files } @@ -51,7 +50,6 @@ func fileSize(fi *os.File) int64 { } func main() { - n := len(os.Args) if n < 4 { fmt.Println("Not enough arguments") diff --git a/tests/go/sortedlistmerge_test.go b/tests/go/sortedlistmerge_test.go index e0930dad..06978f3d 100644 --- a/tests/go/sortedlistmerge_test.go +++ b/tests/go/sortedlistmerge_test.go @@ -71,7 +71,6 @@ func TestSortedListMerge(t *testing.T) { data2: z01.MultRandInt(), } table = append(table, val) - } table = append(table, nodeTest{ @@ -108,6 +107,5 @@ func TestSortedListMerge(t *testing.T) { link2 = &NodeI13{} linkTest = &NodeIS13{} linkTest2 = &NodeIS13{} - } } diff --git a/tests/go/sortlistinsert_test.go b/tests/go/sortlistinsert_test.go index c2a7c7fb..dc5c6106 100644 --- a/tests/go/sortlistinsert_test.go +++ b/tests/go/sortlistinsert_test.go @@ -118,7 +118,6 @@ func TestSortListInsert(t *testing.T) { } func sortStudentsList(l *NodeI14) *NodeI14 { - Head := l if Head == nil { return nil diff --git a/tests/go/split_test.go b/tests/go/split_test.go index e9ca1fa6..0c8e6847 100644 --- a/tests/go/split_test.go +++ b/tests/go/split_test.go @@ -12,7 +12,6 @@ import ( ) func TestSplit(t *testing.T) { - separators := []string{"!=HA=!", "!==!", " ", diff --git a/tests/go/splitwhitespaces_test.go b/tests/go/splitwhitespaces_test.go index 8beec1e1..5a317d5f 100644 --- a/tests/go/splitwhitespaces_test.go +++ b/tests/go/splitwhitespaces_test.go @@ -11,12 +11,10 @@ import ( ) func TestSplitWhiteSpaces(t *testing.T) { - table := []string{} //30 random slice of strings for i := 0; i < 30; i++ { - val := strings.Join(z01.MultRandASCII(), " ") table = append(table, val) } diff --git a/tests/go/toupper_test.go b/tests/go/toupper_test.go index e9910b65..5f940482 100644 --- a/tests/go/toupper_test.go +++ b/tests/go/toupper_test.go @@ -10,7 +10,6 @@ import ( ) func TestToUpper(t *testing.T) { - table := z01.MultRandASCII() table = append(table,