diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 00000000..d0c32220 --- /dev/null +++ b/tests/README.md @@ -0,0 +1,23 @@ +# tests + +## Docker image + +The tests must be in a Docker image that will be executed with (among others) the following options : + +- `--read-only` Mount the container's root filesystem as read only +- `--user 1000:1000` Avoid to give root rights +- `--tmpfs /jail:size=200M,noatime,exec,nodev,nosuid,uid=1000,gid=1000,nr_inodes=5k,mode=1700` Mount a 200MB tmpfs directory to create files and run tests +- `--memory 500M` Memory limit of 500 MB +- `--cpus 2.0` Number of CPUs (2 threads) +- `--mount readonly,type=volume,source=student/username,destination=/app/student` The student's code is available in /app/student +- `--env HOME=/jail` Set the only writable folder as home directory +- `--env TMPDIR=/jail` Set the only writable folder as temporary directory +- `--env USERNAME=` Username +- `--env EXERCISE=` Exercise name +- `--env DOMAIN=` Domain name (e.g. gp.ynov-bordeaux.com) +- `--env EXPECTED_FILES=` A space-separated list of required files + +The username is the Gitea login. +No command or arguments are used, the entrypoint has to run the tests. +The exit status of the container will determine whether or not the test has passed. +Any output will be printed in the platform but not interpreted. diff --git a/tests/go/Dockerfile b/tests/go/Dockerfile new file mode 100644 index 00000000..4bed8627 --- /dev/null +++ b/tests/go/Dockerfile @@ -0,0 +1,7 @@ +FROM golang:1 + +RUN go get golang.org/x/tools/cmd/goimports +RUN go get github.com/01-edu/z01 +RUN go get github.com/01-edu/public/rc +COPY . /app +ENTRYPOINT ["/bin/bash", "/app/entrypoint.sh"] diff --git a/tests/go/abort_test.go b/tests/go/abort_test.go new file mode 100644 index 00000000..7284eed6 --- /dev/null +++ b/tests/go/abort_test.go @@ -0,0 +1,19 @@ +package student_test + +import ( + "testing" + + solutions "./solutions" + student "./student" + "github.com/01-edu/z01" +) + +func TestAbort(t *testing.T) { + arg := z01.MultRandInt() + arg = append(arg, z01.RandInt()) + for i := 0; i < 15; i++ { + z01.Challenge(t, student.Abort, solutions.Abort, arg[0], arg[1], arg[2], arg[3], arg[4]) + arg = z01.MultRandInt() + arg = append(arg, z01.RandInt()) + } +} diff --git a/tests/go/activebits_test.go b/tests/go/activebits_test.go new file mode 100644 index 00000000..a487fee6 --- /dev/null +++ b/tests/go/activebits_test.go @@ -0,0 +1,21 @@ +package student_test + +import ( + solutions "./solutions" + student "./student" + "github.com/01-edu/z01" + "testing" +) + +func TestActiveBits(t *testing.T) { + args := []int{z01.RandIntBetween(2, 20)} + + for i := 0; i < 20; i++ { + args = append(args, z01.RandIntBetween(2, 20)) + } + + 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 new file mode 100644 index 00000000..0716c9e7 --- /dev/null +++ b/tests/go/advancedsortwordarr_test.go @@ -0,0 +1,44 @@ +package student_test + +import ( + "reflect" + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestAdvancedSortWordArr(t *testing.T) { + var table [][]string + + for i := 0; i < 10; i++ { + table = append(table, z01.MultRandWords()) + } + + table = append(table, []string{"a", "A", "1", "b", "B", "2", "c", "C", "3"}) + + for _, org := range table { + //copy for using the solution function + cp_sol := make([]string, len(org)) + //copy for using the student function + cp_stu := make([]string, len(org)) + + copy(cp_sol, org) + copy(cp_stu, org) + + solutions.AdvancedSortWordArr(cp_sol, solutions.CompArray) + student.AdvancedSortWordArr(cp_stu, solutions.CompArray) + + if !reflect.DeepEqual(cp_stu, cp_sol) { + t.Errorf("%s(%v) == %v instead of %v\n", + "AdvancedSortWordArr", + org, + cp_stu, + cp_sol, + ) + } + } + +} diff --git a/tests/go/alphacount_test.go b/tests/go/alphacount_test.go new file mode 100644 index 00000000..ed01237b --- /dev/null +++ b/tests/go/alphacount_test.go @@ -0,0 +1,30 @@ +package student_test + +import ( + "testing" + + solutions "./solutions" + + student "./student" + "github.com/01-edu/z01" +) + +func TestAlphaCount(t *testing.T) { + var arr []string + for l := 0; l < 7; l++ { + a := z01.RandIntBetween(5, 20) + b := z01.RandASCII() + str := z01.RandStr(a, b) + arr = append(arr, str) + } + + arr = append(arr, " ") + + // example from the subject + arr = append(arr, "Hello 78 World! 4455 /") + + 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 new file mode 100644 index 00000000..a5a0b6dd --- /dev/null +++ b/tests/go/any_test.go @@ -0,0 +1,73 @@ +package student_test + +import ( + solutions "./solutions" + student "./student" + "github.com/01-edu/z01" + "testing" +) + +func TestAny(t *testing.T) { + functionsArray := []func(string) bool{solutions.IsNumeric, solutions.IsLower, solutions.IsUpper} + + type node struct { + f func(string) bool + arr []string + } + + 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, + node{ + f: solutions.IsNumeric, + arr: []string{"Hello", "how", "are", "you"}, + }, + node{ + f: solutions.IsNumeric, + arr: []string{"This", "is", "4", "you"}, + }, + ) + + for _, arg := range table { + z01.Challenge(t, student.Any, solutions.Any, arg.f, arg.arr) + } +} diff --git a/tests/go/appendrange_test.go b/tests/go/appendrange_test.go new file mode 100644 index 00000000..a793b5b6 --- /dev/null +++ b/tests/go/appendrange_test.go @@ -0,0 +1,53 @@ +package student_test + +import ( + "github.com/01-edu/z01" + "testing" + + solutions "./solutions" + student "./student" +) + +func TestAppendRange(t *testing.T) { + + type node struct { + min int + max int + } + + table := []node{} + //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{ + min: minVal, + max: minVal + gap, + } + table = append(table, val) + } + //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{ + min: minVal, + max: minVal - gap, + } + table = append(table, val) + } + + table = append(table, + node{min: 0, max: 1}, + node{min: 0, max: 0}, + node{min: 5, max: 10}, + node{min: 10, max: 5}, + ) + + for _, arg := range table { + z01.Challenge(t, student.AppendRange, solutions.AppendRange, arg.min, arg.max) + } +} diff --git a/tests/go/atoi_test.go b/tests/go/atoi_test.go new file mode 100644 index 00000000..df39b211 --- /dev/null +++ b/tests/go/atoi_test.go @@ -0,0 +1,39 @@ +package student_test + +import ( + "strconv" + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestAtoi(t *testing.T) { + table := make([]string, 30) + for i := range table { + table[i] = strconv.Itoa(z01.RandInt()) + } + table = append(table, + strconv.Itoa(z01.MinInt), + strconv.Itoa(z01.MaxInt), + "", + "-", + "+", + "0", + "+0", + "-Invalid123", + "--123", + "-+123", + "++123", + "123-", + "123+", + "123.", + "123.0", + "123a45", + ) + for _, arg := range table { + z01.Challenge(t, student.Atoi, solutions.Atoi, arg) + } +} diff --git a/tests/go/atoibase_test.go b/tests/go/atoibase_test.go new file mode 100644 index 00000000..bc193fd8 --- /dev/null +++ b/tests/go/atoibase_test.go @@ -0,0 +1,49 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +// this is the function that creates the TESTS +func TestAtoiBase(t *testing.T) { + type node struct { + s string + base string + } + + table := []node{} + + // 15 random pairs of string numbers with valid bases + for i := 0; i < 15; i++ { + validBaseToInput := solutions.RandomValidBase() + val := node{ + s: solutions.RandomStringFromBase(validBaseToInput), + base: validBaseToInput, + } + table = append(table, val) + } + // 15 random pairs of string numbers with invalid bases + for i := 0; i < 15; i++ { + invalidBaseToInput := solutions.RandomInvalidBase() + val := node{ + s: "thisinputshouldnotmatter", + base: invalidBaseToInput, + } + table = append(table, val) + } + table = append(table, + node{s: "125", base: "0123456789"}, + node{s: "1111101", base: "01"}, + node{s: "7D", base: "0123456789ABCDEF"}, + node{s: "uoi", base: "choumi"}, + node{s: "bbbbbab", base: "-ab"}, + ) + for _, arg := range table { + z01.Challenge(t, student.AtoiBase, solutions.AtoiBase, arg.s, arg.base) + } +} diff --git a/tests/go/atoibaseprog_test.go b/tests/go/atoibaseprog_test.go new file mode 100644 index 00000000..17e03d17 --- /dev/null +++ b/tests/go/atoibaseprog_test.go @@ -0,0 +1,92 @@ +package student_test + +import ( + "math/rand" + "testing" + + "github.com/01-edu/z01" +) + +//randomValidBase function is used to create the tests (input VALID bases here) +func randomValidBase() string { + validBases := []string{ + "01", + "CHOUMIisDAcat!", + "choumi", + "0123456789", + "abc", "Zone01", + "0123456789ABCDEF", + "WhoAmI?", + } + index := rand.Intn(len(validBases)) + return validBases[index] +} + +//randomInvalidBase function is used to create the tests (input INVALID bases here) +func randomInvalidBase() string { + invalidBases := []string{ + "0", + "1", + "CHOUMIisdacat!", + "choumiChoumi", + "01234567890", + "abca", + "Zone01Zone01", + "0123456789ABCDEF0", + "WhoAmI?IamWhoIam", + } + index := z01.RandIntBetween(0, len(invalidBases)-1) + return invalidBases[index] +} + +//randomStringFromBase function is used to create the random STRING number from VALID BASES +func randomStringFromBase(base string) string { + letters := []rune(base) + size := z01.RandIntBetween(1, 10) + r := make([]rune, size) + for i := range r { + r[i] = letters[rand.Intn(len(letters))] + } + return string(r) +} + +// this is the function that creates the TESTS +func TestAtoiBaseProg(t *testing.T) { + type node struct { + s string + base string + } + + table := []node{} + + // 5 random pairs of string numbers with valid bases + for i := 0; i < 5; i++ { + validBaseToInput := randomValidBase() + val := node{ + s: randomStringFromBase(validBaseToInput), + base: validBaseToInput, + } + table = append(table, val) + } + // 5 random pairs of string numbers with invalid bases + for i := 0; i < 5; i++ { + invalidBaseToInput := randomInvalidBase() + val := node{ + s: "thisinputshouldnotmatter", + base: invalidBaseToInput, + } + table = append(table, val) + } + table = append(table, + node{s: "125", base: "0123456789"}, + node{s: "1111101", base: "01"}, + node{s: "7D", base: "0123456789ABCDEF"}, + node{s: "uoi", base: "choumi"}, + node{s: "bbbbbab", base: "-ab"}, + ) + for _, arg := range table { + z01.ChallengeMain(t, arg.s, arg.base) + } + z01.ChallengeMain(t) + z01.ChallengeMain(t, "125", "0123456789", "something") +} diff --git a/tests/go/basicatoi2_test.go b/tests/go/basicatoi2_test.go new file mode 100644 index 00000000..a7d8b1e7 --- /dev/null +++ b/tests/go/basicatoi2_test.go @@ -0,0 +1,33 @@ +package student_test + +import ( + "strconv" + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestBasicAtoi2(t *testing.T) { + table := make([]string, 30) + for i := range table { + table[i] = strconv.Itoa(z01.RandPosZ()) + } + table = append(table, + strconv.Itoa(z01.MaxInt), + "", + "0", + "Invalid123", + "123Invalid", + "Invalid", + "1Invalid23", + "123", + "123.", + "123.0", + ) + for _, arg := range table { + z01.Challenge(t, student.BasicAtoi2, solutions.BasicAtoi2, arg) + } +} diff --git a/tests/go/basicatoi_test.go b/tests/go/basicatoi_test.go new file mode 100644 index 00000000..89a043a0 --- /dev/null +++ b/tests/go/basicatoi_test.go @@ -0,0 +1,29 @@ +package student_test + +import ( + "strconv" + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestBasicAtoi(t *testing.T) { + table := make([]string, 30) + for i := range table { + table[i] = strconv.Itoa(z01.RandPosZ()) + } + table = append(table, + strconv.Itoa(z01.MaxInt), + "", + "0", + "12345", + "0000012345", + "000000", + ) + for _, arg := range table { + z01.Challenge(t, student.BasicAtoi, solutions.BasicAtoi, arg) + } +} diff --git a/tests/go/basicjoin_test.go b/tests/go/basicjoin_test.go new file mode 100644 index 00000000..d0884276 --- /dev/null +++ b/tests/go/basicjoin_test.go @@ -0,0 +1,25 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestBasicJoin(t *testing.T) { + table := [][]string{} + + // 30 valid pair of ramdom slice of strings to concatenate + for i := 0; i < 30; i++ { + table = append(table, z01.MultRandASCII()) + } + table = append(table, + []string{"Hello!", " How are you?", "well and yourself?"}, + ) + for _, arg := range table { + z01.Challenge(t, student.BasicJoin, solutions.BasicJoin, arg) + } +} diff --git a/tests/go/benchmark_tests.sh b/tests/go/benchmark_tests.sh new file mode 100755 index 00000000..99f21043 --- /dev/null +++ b/tests/go/benchmark_tests.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +set -euo pipefail +IFS=' +' + +cd -P "$(dirname "$BASH_SOURCE")" + +rm -rf student +cp -a solutions student +go test -v -json|jq -c 'select(.Action == "pass") | {Test, Elapsed}' | jq -sr 'sort_by(.Elapsed) | .[-30:] | .[] | [.Elapsed, .Test] | @tsv' diff --git a/tests/go/boolean_test.go b/tests/go/boolean_test.go new file mode 100644 index 00000000..c4907d32 --- /dev/null +++ b/tests/go/boolean_test.go @@ -0,0 +1,17 @@ +package student_test + +import ( + "strings" + "testing" + + "github.com/01-edu/z01" +) + +func TestBoolean(t *testing.T) { + + table := append(z01.MultRandWords(), "1 2 3 4 5") + + for _, s := range table { + z01.ChallengeMain(t, strings.Fields(s)...) + } +} diff --git a/tests/go/btreeapplybylevel_test.go b/tests/go/btreeapplybylevel_test.go new file mode 100644 index 00000000..20bd1a6a --- /dev/null +++ b/tests/go/btreeapplybylevel_test.go @@ -0,0 +1,23 @@ +package student_test + +import ( + "fmt" + "testing" + + solutions "./solutions" + student "./student" +) + +func TestBTreeApplyByLevel(t *testing.T) { + root := &solutions.TreeNode{Data: "04"} + rootS := &student.TreeNode{Data: "04"} + + ins := []string{"01", "07", "05", "12", "02", "03", "10"} + + for _, v := range ins { + root = solutions.BTreeInsertData(root, v) + rootS = student.BTreeInsertData(rootS, v) + } + + solutions.ChallengeTree(t, solutions.BTreeApplyByLevel, student.BTreeApplyByLevel, root, rootS, fmt.Print) +} diff --git a/tests/go/btreeapplyinorder_test.go b/tests/go/btreeapplyinorder_test.go new file mode 100644 index 00000000..2915bab8 --- /dev/null +++ b/tests/go/btreeapplyinorder_test.go @@ -0,0 +1,36 @@ +package student_test + +import ( + "fmt" + "testing" + + solutions "./solutions" + student "./student" +) + +func TestBTreeApplyInorder(t *testing.T) { + root := &solutions.TreeNode{Data: "08"} + rootS := &student.TreeNode{Data: "08"} + var pos []string + + pos = append(pos, + "x", + "z", + "y", + "t", + "r", + "q", + "01", + "b", + "c", + "a", + "d", + ) + + for _, arg := range pos { + root = solutions.BTreeInsertData(root, arg) + rootS = student.BTreeInsertData(rootS, arg) + } + + solutions.ChallengeTree(t, solutions.BTreeApplyInorder, student.BTreeApplyInorder, root, rootS, fmt.Println) +} diff --git a/tests/go/btreeapplypostorder_test.go b/tests/go/btreeapplypostorder_test.go new file mode 100644 index 00000000..cab0b345 --- /dev/null +++ b/tests/go/btreeapplypostorder_test.go @@ -0,0 +1,36 @@ +package student_test + +import ( + "fmt" + "testing" + + solutions "./solutions" + student "./student" +) + +func TestBTreeApplyPostorder(t *testing.T) { + root := &solutions.TreeNode{Data: "08"} + rootS := &student.TreeNode{Data: "08"} + var pos []string + + pos = append(pos, + "x", + "z", + "y", + "t", + "r", + "q", + "01", + "b", + "c", + "a", + "d", + ) + + for _, arg := range pos { + root = solutions.BTreeInsertData(root, arg) + rootS = student.BTreeInsertData(rootS, arg) + } + + solutions.ChallengeTree(t, solutions.BTreeApplyPostorder, student.BTreeApplyPostorder, root, rootS, fmt.Println) +} diff --git a/tests/go/btreeapplypreorder_test.go b/tests/go/btreeapplypreorder_test.go new file mode 100644 index 00000000..c0b32b62 --- /dev/null +++ b/tests/go/btreeapplypreorder_test.go @@ -0,0 +1,36 @@ +package student_test + +import ( + "fmt" + "testing" + + solutions "./solutions" + student "./student" +) + +func TestBTreeApplyPreorder(t *testing.T) { + root := &solutions.TreeNode{Data: "08"} + rootS := &student.TreeNode{Data: "08"} + var pos []string + + pos = append(pos, + "x", + "z", + "y", + "t", + "r", + "q", + "01", + "b", + "c", + "a", + "d", + ) + + for _, arg := range pos { + root = solutions.BTreeInsertData(root, arg) + rootS = student.BTreeInsertData(rootS, arg) + } + + solutions.ChallengeTree(t, solutions.BTreeApplyPreorder, student.BTreeApplyPreorder, root, rootS, fmt.Println) +} diff --git a/tests/go/btreedeletenode_test.go b/tests/go/btreedeletenode_test.go new file mode 100644 index 00000000..ba60fc7e --- /dev/null +++ b/tests/go/btreedeletenode_test.go @@ -0,0 +1,123 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func parentListDelete(root *student.TreeNode) string { + if root == nil { + return "" + } + + var parent string + + if root.Parent == nil { + parent = "nil" + } else { + parent = root.Parent.Data + } + + r := "Node: " + root.Data + " Parent: " + parent + "\n" + r += parentListDelete(root.Left) + parentListDelete(root.Right) + return r +} + +func FormatTree_delete(root *student.TreeNode) string { + if root == nil { + return "" + } + res := root.Data + "\n" + res += formatSubTree_delete(root, "") + return res +} + +func formatSubTree_delete(root *student.TreeNode, prefix string) string { + if root == nil { + return "" + } + + var res string + + hasLeft := root.Left != nil + hasRight := root.Right != nil + + if !hasLeft && !hasRight { + return res + } + + res += prefix + if hasLeft && hasRight { + res += "├── " + } + + if !hasLeft && hasRight { + res += "└── " + } + + if hasRight { + printStrand := (hasLeft && hasRight && (root.Right.Right != nil || root.Right.Left != nil)) + newPrefix := prefix + if printStrand { + newPrefix += "│ " + } else { + newPrefix += " " + } + res += root.Right.Data + "\n" + res += formatSubTree_delete(root.Right, newPrefix) + } + + if hasLeft { + if hasRight { + res += prefix + } + res += "└── " + root.Left.Data + "\n" + res += formatSubTree_delete(root.Left, prefix+" ") + } + return res +} + +func errorMessage_delete(t *testing.T, fn interface{}, deleted string, rootOr, root *solutions.TreeNode, rootS *student.TreeNode) { + t.Errorf("%s(\n%s, %s\n) ==\n%s instead of\n%s\n", + z01.NameOfFunc(fn), + solutions.FormatTree(rootOr), + deleted, + FormatTree_delete(rootS), + solutions.FormatTree(root), + ) +} + +func CompareTrees_delete(t *testing.T, fn interface{}, deleted string, rootOr, root *solutions.TreeNode, rootS *student.TreeNode) { + sel := student.BTreeSearchItem(rootS, deleted) + + if !student.BTreeIsBinary(rootS) || sel != nil { + errorMessage_delete(t, fn, deleted, rootOr, root, rootS) + } + +} + +func TestBTreeDeleteNode(t *testing.T) { + root := &solutions.TreeNode{Data: "04"} + rootS := &student.TreeNode{Data: "04"} + rootOr := &solutions.TreeNode{Data: "04"} + + ins := []string{"01", "07", "05", "12", "02", "03", "10"} + + for _, v := range ins { + root = solutions.BTreeInsertData(root, v) + rootS = student.BTreeInsertData(rootS, v) + rootOr = solutions.BTreeInsertData(rootOr, v) + } + + selected := solutions.BTreeSearchItem(root, "04") + selectedS := student.BTreeSearchItem(rootS, "04") + + root = solutions.BTreeDeleteNode(root, selected) + rootS = student.BTreeDeleteNode(rootS, selectedS) + fn := interface{}(solutions.BTreeDeleteNode) + CompareTrees_delete(t, fn, selected.Data, rootOr, root, rootS) +} diff --git a/tests/go/btreeinsertdata_test.go b/tests/go/btreeinsertdata_test.go new file mode 100644 index 00000000..f97f261d --- /dev/null +++ b/tests/go/btreeinsertdata_test.go @@ -0,0 +1,129 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func parentListInsert(root *student.TreeNode) string { + if root == nil { + return "" + } + + var parent string + + if root.Parent == nil { + parent = "nil" + } else { + parent = root.Parent.Data + } + + r := "Node: " + root.Data + " Parent: " + parent + "\n" + r += parentListInsert(root.Left) + parentListInsert(root.Right) + return r +} + +func FormatTree_insert(root *student.TreeNode) string { + if root == nil { + return "" + } + res := root.Data + "\n" + res += formatSubTree_insert(root, "") + return res +} + +func formatSubTree_insert(root *student.TreeNode, prefix string) string { + if root == nil { + return "" + } + + var res string + + hasLeft := root.Left != nil + hasRight := root.Right != nil + + if !hasLeft && !hasRight { + return res + } + + res += prefix + if hasLeft && hasRight { + res += "├── " + } + + if !hasLeft && hasRight { + res += "└── " + } + + if hasRight { + printStrand := (hasLeft && hasRight && (root.Right.Right != nil || root.Right.Left != nil)) + newPrefix := prefix + if printStrand { + newPrefix += "│ " + } else { + newPrefix += " " + } + res += root.Right.Data + "\n" + res += formatSubTree_insert(root.Right, newPrefix) + } + + if hasLeft { + if hasRight { + res += prefix + } + res += "└── " + root.Left.Data + "\n" + res += formatSubTree_insert(root.Left, prefix+" ") + } + return res +} + +func errorMessage_insert(t *testing.T, fn interface{}, inserted string, root *solutions.TreeNode, rootS *student.TreeNode) { + t.Errorf("%s(\n%s, %s\n) ==\n%s instead of\n%s\n", + z01.NameOfFunc(fn), + solutions.FormatTree(root), + inserted, + FormatTree_insert(rootS), + solutions.FormatTree(root), + ) +} + +func CompareTrees_insert(t *testing.T, fn interface{}, inserted string, root *solutions.TreeNode, rootS *student.TreeNode) { + solTree := solutions.FormatTree(root) + stuTree := FormatTree_insert(rootS) + + if solTree != stuTree { + errorMessage_insert(t, fn, inserted, root, rootS) + } +} + +func TestBTreeInsertData(t *testing.T) { + root := &solutions.TreeNode{Data: "08"} + rootS := &student.TreeNode{Data: "08"} + + var pos []string + + pos = append(pos, + "x", + "z", + "y", + "t", + "r", + "q", + "01", + "b", + "c", + "a", + "d", + ) + fn := interface{}(solutions.BTreeInsertData) + for _, arg := range pos { + root = solutions.BTreeInsertData(root, arg) + rootS = student.BTreeInsertData(rootS, arg) + CompareTrees_insert(t, fn, arg, root, rootS) + } + +} diff --git a/tests/go/btreeisbinary_test.go b/tests/go/btreeisbinary_test.go new file mode 100644 index 00000000..66cee7fe --- /dev/null +++ b/tests/go/btreeisbinary_test.go @@ -0,0 +1,120 @@ +package student_test + +import ( + "reflect" + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func BTreeMinStu(root *student.TreeNode) *student.TreeNode { + if root == nil || root.Left == nil { + return root + } + + return BTreeMinStu(root.Left) +} + +func errorMessage_isbin(t *testing.T, fn interface{}, root, a *solutions.TreeNode, b *student.TreeNode) { + t.Errorf("%s(\n%s\n) == %s instead of %s\n", + z01.NameOfFunc(fn), + solutions.FormatTree(root), + b.Data, + a.Data, + ) +} + +func CompareNode_isbin(t *testing.T, fn interface{}, arg1, a *solutions.TreeNode, b *student.TreeNode) { + if a == nil || b == nil { + t.Errorf("Expected %v instead of %v\n", a, b) + return + } + + if a.Data != b.Data { + errorMessage_isbin(t, fn, arg1, a, b) + } + + if a.Parent != nil && b.Parent != nil { + if a.Parent.Data != b.Parent.Data { + errorMessage_isbin(t, fn, arg1, a, b) + t.Errorf("Expected parent value %v instead of %v\n", a.Parent.Data, b.Parent.Data) + } + } else if (a.Parent == nil && b.Parent != nil) || (a.Parent != nil && b.Parent == nil) { + t.Errorf("Expected parent value %v instead of %v\n", a.Parent, b.Parent) + } + + if a.Right != nil && b.Right != nil { + if a.Right.Data != b.Right.Data { + errorMessage_isbin(t, fn, arg1, a, b) + t.Errorf("Expected right child value %v instead of %v\n", a.Right.Data, b.Right.Data) + } + } else if (a.Right == nil && b.Right != nil) || (a.Right != nil && b.Right == nil) { + t.Errorf("Expected right child value %v instead of %v\n", a.Right, b.Right) + } + + if a.Left != nil && b.Left != nil { + if a.Left.Data != b.Left.Data { + errorMessage_isbin(t, fn, arg1, a, b) + t.Errorf("Expected left child value %v instead of %v\n", a.Left, b.Left) + } + } else if (a.Left == nil && b.Left != nil) || (a.Left != nil && b.Left == nil) { + t.Errorf("Expected left child value %v instead of %v\n", a, b) + } +} + +func CompareReturn_isbin(t *testing.T, fn1, fn2 interface{}, arg1 *solutions.TreeNode, arg2 interface{}) { + arar1 := []interface{}{arg1} + arar2 := []interface{}{arg2} + + out1 := z01.Monitor(fn1, arar1) + out2 := z01.Monitor(fn2, arar2) + + for i, v := range out1.Results { + switch str := v.(type) { + case *solutions.TreeNode: + CompareNode_isbin(t, fn1, arg1, str, out2.Results[i].(*student.TreeNode)) + default: + if !reflect.DeepEqual(str, out2.Results[i]) { + t.Errorf("%s(\n%s) == %s instead of %s\n", + z01.NameOfFunc(fn1), + solutions.FormatTree(arg1), + z01.Format(out2.Results...), + z01.Format(out1.Results...), + ) + } + } + } +} + +func TestBTreeIsBinary(t *testing.T) { + root := &solutions.TreeNode{Data: "04"} + rootS := &student.TreeNode{Data: "04"} + + ins := []string{"01", "07", "05", "12", "02", "03", "10"} + + for _, v := range ins { + root = solutions.BTreeInsertData(root, v) + rootS = student.BTreeInsertData(rootS, v) + } + + CompareReturn_isbin(t, solutions.BTreeIsBinary, student.BTreeIsBinary, root, rootS) + + rootNB := &solutions.TreeNode{Data: "04"} + rootNB_stu := &student.TreeNode{Data: "04"} + //Test a non-binarysearch tree + for _, v := range ins { + rootNB = solutions.BTreeInsertData(rootNB, v) + rootNB_stu = student.BTreeInsertData(rootNB_stu, v) + } + + min := solutions.BTreeMin(rootNB) + minStu := BTreeMinStu(rootNB_stu) + + min.Left = &solutions.TreeNode{Data: "123"} + minStu.Left = &student.TreeNode{Data: "123"} + + CompareReturn_isbin(t, solutions.BTreeIsBinary, student.BTreeIsBinary, rootNB, rootNB_stu) +} diff --git a/tests/go/btreelevelcount_test.go b/tests/go/btreelevelcount_test.go new file mode 100644 index 00000000..82a3177a --- /dev/null +++ b/tests/go/btreelevelcount_test.go @@ -0,0 +1,95 @@ +package student_test + +import ( + "reflect" + "testing" + + solutions "./solutions" + student "./student" + + "github.com/01-edu/z01" +) + +func errorMessage_level(t *testing.T, fn interface{}, root, a *solutions.TreeNode, b *student.TreeNode) { + t.Errorf("%s(\n%s\n) == %s instead of %s\n", + z01.NameOfFunc(fn), + solutions.FormatTree(root), + b.Data, + a.Data, + ) +} + +func CompareNode_level(t *testing.T, fn interface{}, arg1, a *solutions.TreeNode, b *student.TreeNode) { + if a == nil || b == nil { + t.Errorf("Expected %v instead of %v\n", a, b) + return + } + + if a.Data != b.Data { + errorMessage_level(t, fn, arg1, a, b) + } + + if a.Parent != nil && b.Parent != nil { + if a.Parent.Data != b.Parent.Data { + errorMessage_level(t, fn, arg1, a, b) + t.Errorf("Expected parent value %v instead of %v\n", a.Parent.Data, b.Parent.Data) + } + } else if (a.Parent == nil && b.Parent != nil) || (a.Parent != nil && b.Parent == nil) { + t.Errorf("Expected parent value %v instead of %v\n", a.Parent, b.Parent) + } + + if a.Right != nil && b.Right != nil { + if a.Right.Data != b.Right.Data { + errorMessage_level(t, fn, arg1, a, b) + t.Errorf("Expected right child value %v instead of %v\n", a.Right.Data, b.Right.Data) + } + } else if (a.Right == nil && b.Right != nil) || (a.Right != nil && b.Right == nil) { + t.Errorf("Expected right child value %v instead of %v\n", a.Right, b.Right) + } + + if a.Left != nil && b.Left != nil { + if a.Left.Data != b.Left.Data { + errorMessage_level(t, fn, arg1, a, b) + t.Errorf("Expected left child value %v instead of %v\n", a.Left, b.Left) + } + } else if (a.Left == nil && b.Left != nil) || (a.Left != nil && b.Left == nil) { + t.Errorf("Expected left child value %v instead of %v\n", a, b) + } +} + +func CompareReturn_level(t *testing.T, fn1, fn2 interface{}, arg1 *solutions.TreeNode, arg2 interface{}) { + arar1 := []interface{}{arg1} + arar2 := []interface{}{arg2} + + out1 := z01.Monitor(fn1, arar1) + out2 := z01.Monitor(fn2, arar2) + + for i, v := range out1.Results { + switch str := v.(type) { + case *solutions.TreeNode: + CompareNode_level(t, fn1, arg1, str, out2.Results[i].(*student.TreeNode)) + default: + if !reflect.DeepEqual(str, out2.Results[i]) { + t.Errorf("%s(\n%s) == %s instead of %s\n", + z01.NameOfFunc(fn1), + solutions.FormatTree(arg1), + z01.Format(out2.Results...), + z01.Format(out1.Results...), + ) + } + } + } +} + +func TestBTreeLevelCount(t *testing.T) { + root := &solutions.TreeNode{Data: "04"} + rootS := &student.TreeNode{Data: "04"} + + ins := []string{"01", "07", "05", "12", "02", "03", "10"} + + for _, v := range ins { + root = solutions.BTreeInsertData(root, v) + rootS = student.BTreeInsertData(rootS, v) + CompareReturn_level(t, solutions.BTreeLevelCount, student.BTreeLevelCount, root, rootS) + } +} diff --git a/tests/go/btreemax_test.go b/tests/go/btreemax_test.go new file mode 100644 index 00000000..5382921d --- /dev/null +++ b/tests/go/btreemax_test.go @@ -0,0 +1,96 @@ +package student_test + +import ( + "reflect" + "testing" + + solutions "./solutions" + student "./student" + + "github.com/01-edu/z01" +) + +func errorMessage_max(t *testing.T, fn interface{}, root, a *solutions.TreeNode, b *student.TreeNode) { + t.Errorf("%s(\n%s) == %s instead of %s\n", + z01.NameOfFunc(fn), + solutions.FormatTree(root), + b.Data, + a.Data, + ) +} + +func CompareNode_max(t *testing.T, fn interface{}, arg1, a *solutions.TreeNode, b *student.TreeNode) { + if a == nil || b == nil { + t.Errorf("Expected %v instead of %v\n", a, b) + return + } + + if a.Data != b.Data { + errorMessage_max(t, fn, arg1, a, b) + } + + if a.Parent != nil && b.Parent != nil { + if a.Parent.Data != b.Parent.Data { + errorMessage_max(t, fn, arg1, a, b) + t.Errorf("Expected parent value %v instead of %v\n", a.Parent.Data, b.Parent.Data) + } + } else if (a.Parent == nil && b.Parent != nil) || (a.Parent != nil && b.Parent == nil) { + t.Errorf("Expected parent value %v instead of %v\n", a.Parent, b.Parent) + } + + if a.Right != nil && b.Right != nil { + if a.Right.Data != b.Right.Data { + errorMessage_max(t, fn, arg1, a, b) + t.Errorf("Expected right child value %v instead of %v\n", a.Right.Data, b.Right.Data) + } + } else if (a.Right == nil && b.Right != nil) || (a.Right != nil && b.Right == nil) { + t.Errorf("Expected right child value %v instead of %v\n", a.Right, b.Right) + } + + if a.Left != nil && b.Left != nil { + if a.Left.Data != b.Left.Data { + errorMessage_max(t, fn, arg1, a, b) + t.Errorf("Expected left child value %v instead of %v\n", a.Left, b.Left) + } + } else if (a.Left == nil && b.Left != nil) || (a.Left != nil && b.Left == nil) { + t.Errorf("Expected left child value %v instead of %v\n", a, b) + } +} + +func CompareReturn_max(t *testing.T, fn1, fn2 interface{}, arg1 *solutions.TreeNode, arg2 interface{}) { + arar1 := []interface{}{arg1} + arar2 := []interface{}{arg2} + + out1 := z01.Monitor(fn1, arar1) + out2 := z01.Monitor(fn2, arar2) + + for i, v := range out1.Results { + switch str := v.(type) { + case *solutions.TreeNode: + CompareNode_max(t, fn1, arg1, str, out2.Results[i].(*student.TreeNode)) + default: + if !reflect.DeepEqual(str, out2.Results[i]) { + t.Errorf("%s(\n%s) == %s instead of\n %s\n", + z01.NameOfFunc(fn1), + solutions.FormatTree(arg1), + z01.Format(out2.Results...), + z01.Format(out1.Results...), + ) + } + } + } +} + +func TestBTreeMax(t *testing.T) { + root := &solutions.TreeNode{Data: "04"} + rootS := &student.TreeNode{Data: "04"} + + ins := []string{"01", "07", "05", "12", "02", "03", "10"} + + for _, v := range ins { + root = solutions.BTreeInsertData(root, v) + rootS = student.BTreeInsertData(rootS, v) + } + + CompareReturn_max(t, solutions.BTreeMax, student.BTreeMax, root, rootS) +} diff --git a/tests/go/btreemin_test.go b/tests/go/btreemin_test.go new file mode 100644 index 00000000..e4f97c57 --- /dev/null +++ b/tests/go/btreemin_test.go @@ -0,0 +1,96 @@ +package student_test + +import ( + "reflect" + "testing" + + solutions "./solutions" + student "./student" + + "github.com/01-edu/z01" +) + +func errorMessage_min(t *testing.T, fn interface{}, root, a *solutions.TreeNode, b *student.TreeNode) { + t.Errorf("%s(\n%s) == %s instead of %s\n", + z01.NameOfFunc(fn), + solutions.FormatTree(root), + b.Data, + a.Data, + ) +} + +func CompareNode_min(t *testing.T, fn interface{}, arg1, a *solutions.TreeNode, b *student.TreeNode) { + if a == nil || b == nil { + t.Errorf("Expected %v instead of %v\n", a, b) + return + } + + if a.Data != b.Data { + errorMessage_min(t, fn, arg1, a, b) + } + + if a.Parent != nil && b.Parent != nil { + if a.Parent.Data != b.Parent.Data { + errorMessage_min(t, fn, arg1, a, b) + t.Errorf("Expected parent value %v instead of %v\n", a.Parent.Data, b.Parent.Data) + } + } else if (a.Parent == nil && b.Parent != nil) || (a.Parent != nil && b.Parent == nil) { + t.Errorf("Expected parent value %v instead of %v\n", a.Parent, b.Parent) + } + + if a.Right != nil && b.Right != nil { + if a.Right.Data != b.Right.Data { + errorMessage_min(t, fn, arg1, a, b) + t.Errorf("Expected right child value %v instead of %v\n", a.Right.Data, b.Right.Data) + } + } else if (a.Right == nil && b.Right != nil) || (a.Right != nil && b.Right == nil) { + t.Errorf("Expected right child value %v instead of %v\n", a.Right, b.Right) + } + + if a.Left != nil && b.Left != nil { + if a.Left.Data != b.Left.Data { + errorMessage_min(t, fn, arg1, a, b) + t.Errorf("Expected left child value %v instead of %v\n", a.Left, b.Left) + } + } else if (a.Left == nil && b.Left != nil) || (a.Left != nil && b.Left == nil) { + t.Errorf("Expected left child value %v instead of %v\n", a, b) + } +} + +func CompareReturn_min(t *testing.T, fn1, fn2, arg1, arg2 interface{}) { + arar1 := []interface{}{arg1} + arar2 := []interface{}{arg2} + + out1 := z01.Monitor(fn1, arar1) + out2 := z01.Monitor(fn2, arar2) + + for i, v := range out1.Results { + switch str := v.(type) { + case *solutions.TreeNode: + CompareNode_min(t, fn1, arg1.(*solutions.TreeNode), str, out2.Results[i].(*student.TreeNode)) + default: + if !reflect.DeepEqual(str, out2.Results[i]) { + t.Errorf("%s(%s) == %s instead of %s\n", + z01.NameOfFunc(fn1), + z01.Format(arg1), + z01.Format(out2.Results...), + z01.Format(out1.Results...), + ) + } + } + } +} + +func TestBTreeMin(t *testing.T) { + root := &solutions.TreeNode{Data: "04"} + rootS := &student.TreeNode{Data: "04"} + + ins := []string{"03", "02", "01", "07", "05", "12", "10"} + + for _, v := range ins { + root = solutions.BTreeInsertData(root, v) + rootS = student.BTreeInsertData(rootS, v) + } + + CompareReturn_min(t, solutions.BTreeMin, student.BTreeMin, root, rootS) +} diff --git a/tests/go/btreerotateleft_test.go b/tests/go/btreerotateleft_test.go new file mode 100644 index 00000000..ae145654 --- /dev/null +++ b/tests/go/btreerotateleft_test.go @@ -0,0 +1,152 @@ +package student_test + +import ( + "reflect" + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func parentListRotLeft(root *student.TreeNode) string { + if root == nil { + return "" + } + + var parent string + + if root.Parent == nil { + parent = "nil" + } else { + parent = root.Parent.Data + } + + r := "Node: " + root.Data + " Parent: " + parent + "\n" + r += parentListRotLeft(root.Left) + parentListRotLeft(root.Right) + return r +} + +func FormatTree_rotleft(root *student.TreeNode) string { + if root == nil { + return "" + } + res := root.Data + "\n" + res += formatSubTree_rotleft(root, "") + return res +} + +func formatSubTree_rotleft(root *student.TreeNode, prefix string) string { + if root == nil { + return "" + } + + var res string + + hasLeft := root.Left != nil + hasRight := root.Right != nil + + if !hasLeft && !hasRight { + return res + } + + res += prefix + if hasLeft && hasRight { + res += "├── " + } + + if !hasLeft && hasRight { + res += "└── " + } + + if hasRight { + printStrand := (hasLeft && hasRight && (root.Right.Right != nil || root.Right.Left != nil)) + newPrefix := prefix + if printStrand { + newPrefix += "│ " + } else { + newPrefix += " " + } + res += root.Right.Data + "\n" + res += formatSubTree_rotleft(root.Right, newPrefix) + } + + if hasLeft { + if hasRight { + res += prefix + } + res += "└── " + root.Left.Data + "\n" + res += formatSubTree_rotleft(root.Left, prefix+" ") + } + return res +} + +func errorMessage_rotleft(t *testing.T, fn interface{}, rootOr, root *solutions.TreeNode, rootS *student.TreeNode) { + t.Errorf("%s(\n%s\n)\n == \n%s instead of \n%s\n", + z01.NameOfFunc(fn), + solutions.FormatTree(rootOr), + FormatTree_rotleft(rootS), + solutions.FormatTree(root), + ) +} + +func CompareTreesRotLeft(t *testing.T, fn interface{}, root, rootA *solutions.TreeNode, rootAS *student.TreeNode) { + parentSol := solutions.ParentList(rootA) + parentStu := parentListRotLeft(rootAS) + solTree := solutions.FormatTree(root) + if parentSol != parentStu { + t.Errorf("Tree:\n%s\nExpected\n%s instead of\n%s\n", solTree, parentSol, parentStu) + } +} + +func CompareNode_rotleft(t *testing.T, fn interface{}, rootOr, root *solutions.TreeNode, rootS *student.TreeNode) { + solTree := solutions.FormatTree(root) + stuTree := FormatTree_rotleft(rootS) + + if solTree != stuTree { + errorMessage_rotleft(t, fn, rootOr, root, rootS) + } +} + +func CompareReturn_rotleft(t *testing.T, fn1, fn2, rootOr, arg1, arg2 interface{}) { + arar1 := []interface{}{arg1} + arar2 := []interface{}{arg2} + + out1 := z01.Monitor(fn1, arar1) + out2 := z01.Monitor(fn2, arar2) + + for i, v := range out1.Results { + switch str := v.(type) { + case *solutions.TreeNode: + CompareNode_rotleft(t, fn1, rootOr.(*solutions.TreeNode), str, out2.Results[i].(*student.TreeNode)) + default: + if !reflect.DeepEqual(str, out2.Results[i]) { + t.Errorf("%s(%s) == %s instead of %s\n", + z01.NameOfFunc(fn1), + z01.Format(arg1), + z01.Format(out2.Results...), + z01.Format(out1.Results...), + ) + } + } + } +} + +func TestBTreeRotateLeft(t *testing.T) { + root := &solutions.TreeNode{Data: "04"} + rootOr := &solutions.TreeNode{Data: "04"} + rootS := &student.TreeNode{Data: "04"} + + ins := []string{"01", "07", "05", "12", "02", "03", "10"} + + for _, v := range ins { + root = solutions.BTreeInsertData(root, v) + rootS = student.BTreeInsertData(rootS, v) + rootOr = solutions.BTreeInsertData(rootOr, v) + } + + fn := interface{}(solutions.BTreeRotateLeft) + CompareReturn_rotleft(t, fn, student.BTreeRotateLeft, rootOr, root, rootS) + CompareTreesRotLeft(t, fn, rootOr, root, rootS) +} diff --git a/tests/go/btreerotateright_test.go b/tests/go/btreerotateright_test.go new file mode 100644 index 00000000..f611bbe6 --- /dev/null +++ b/tests/go/btreerotateright_test.go @@ -0,0 +1,151 @@ +package student_test + +import ( + "reflect" + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func parentListRotRight(root *student.TreeNode) string { + if root == nil { + return "" + } + + var parent string + + if root.Parent == nil { + parent = "nil" + } else { + parent = root.Parent.Data + } + + r := "Node: " + root.Data + " Parent: " + parent + "\n" + r += parentListRotRight(root.Left) + parentListRotRight(root.Right) + return r +} + +func CompareTreesRotRight(t *testing.T, fn interface{}, root, rootA *solutions.TreeNode, rootAS *student.TreeNode) { + parentSol := solutions.ParentList(rootA) + parentStu := parentListRotRight(rootAS) + solTree := solutions.FormatTree(root) + if parentSol != parentStu { + t.Errorf("Tree:\n%s\nExpected\n%s instead of\n%s\n", solTree, parentSol, parentStu) + } +} + +func FormatTree_rotright(root *student.TreeNode) string { + if root == nil { + return "" + } + res := root.Data + "\n" + res += formatSubTree_rotright(root, "") + return res +} + +func formatSubTree_rotright(root *student.TreeNode, prefix string) string { + if root == nil { + return "" + } + + var res string + + hasLeft := root.Left != nil + hasRight := root.Right != nil + + if !hasLeft && !hasRight { + return res + } + + res += prefix + if hasLeft && hasRight { + res += "├── " + } + + if !hasLeft && hasRight { + res += "└── " + } + + if hasRight { + printStrand := (hasLeft && hasRight && (root.Right.Right != nil || root.Right.Left != nil)) + newPrefix := prefix + if printStrand { + newPrefix += "│ " + } else { + newPrefix += " " + } + res += root.Right.Data + "\n" + res += formatSubTree_rotright(root.Right, newPrefix) + } + + if hasLeft { + if hasRight { + res += prefix + } + res += "└── " + root.Left.Data + "\n" + res += formatSubTree_rotright(root.Left, prefix+" ") + } + return res +} + +func errorMessage_rotright(t *testing.T, fn interface{}, rootOr, root *solutions.TreeNode, rootS *student.TreeNode) { + t.Errorf("%s(\n%s\n)\n == \n%s instead of \n%s\n", + z01.NameOfFunc(fn), + solutions.FormatTree(rootOr), + FormatTree_rotright(rootS), + solutions.FormatTree(root), + ) +} + +func CompareNode_rotright(t *testing.T, fn interface{}, rootOr, root *solutions.TreeNode, rootS *student.TreeNode) { + solTree := solutions.FormatTree(root) + stuTree := FormatTree_rotright(rootS) + + if solTree != stuTree { + errorMessage_rotright(t, fn, rootOr, root, rootS) + } +} + +func CompareReturn_rotright(t *testing.T, fn1, fn2, rootOr, arg1, arg2 interface{}) { + arar1 := []interface{}{arg1} + arar2 := []interface{}{arg2} + + out1 := z01.Monitor(fn1, arar1) + out2 := z01.Monitor(fn2, arar2) + + for i, v := range out1.Results { + switch str := v.(type) { + case *solutions.TreeNode: + CompareNode_rotright(t, fn1, rootOr.(*solutions.TreeNode), str, out2.Results[i].(*student.TreeNode)) + default: + if !reflect.DeepEqual(str, out2.Results[i]) { + t.Errorf("%s(%s) == %s instead of %s\n", + z01.NameOfFunc(fn1), + z01.Format(arg1), + z01.Format(out2.Results...), + z01.Format(out1.Results...), + ) + } + } + } +} + +func TestBTreeRotateRight(t *testing.T) { + root := &solutions.TreeNode{Data: "04"} + rootOr := &solutions.TreeNode{Data: "04"} + rootS := &student.TreeNode{Data: "04"} + + ins := []string{"01", "07", "05", "12", "02", "03", "10"} + + for _, v := range ins { + root = solutions.BTreeInsertData(root, v) + rootS = student.BTreeInsertData(rootS, v) + rootOr = solutions.BTreeInsertData(rootOr, v) + } + fn := interface{}(solutions.BTreeRotateRight) + CompareReturn_rotright(t, fn, student.BTreeRotateRight, rootOr, root, rootS) + CompareTreesRotRight(t, fn, rootOr, root, rootS) +} diff --git a/tests/go/btreesearchitem_test.go b/tests/go/btreesearchitem_test.go new file mode 100644 index 00000000..ff7a0ff8 --- /dev/null +++ b/tests/go/btreesearchitem_test.go @@ -0,0 +1,90 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" + "fmt" +) + +func errorMessage_search(t *testing.T, fn interface{}, root, a *solutions.TreeNode, b *student.TreeNode, + seaVal string) { + t.Errorf("%s(\n%s\n, %s) == %s instead of %s\n", + z01.NameOfFunc(fn), + solutions.FormatTree(root), + seaVal, + b.Data, + a.Data, + ) +} + +func CompareNode_search(t *testing.T, fn interface{}, arg1, a *solutions.TreeNode, b *student.TreeNode, + seaVal string) { + + if a == nil && b == nil { + return + } + + if (a == nil && b != nil) || (b == nil && a != nil) { + t.Errorf("Expected %v instead of %v\n", a, b) + return + } + + if a.Data != b.Data { + errorMessage_search(t, fn, arg1, a, b, seaVal) + } + + if a.Parent != nil && b.Parent != nil { + if a.Parent.Data != b.Parent.Data { + errorMessage_search(t, fn, arg1, a, b, seaVal) + t.Errorf("Expected parent value %v instead of %v\n", a.Parent.Data, b.Parent.Data) + fmt.Println("Parent.Data", a.Parent.Data, b.Parent.Data) + } + } else if (a.Parent == nil && b.Parent != nil) || (a.Parent != nil && b.Parent == nil) { + t.Errorf("Expected parent value %v instead of %v\n", a.Parent, b.Parent) + } + + if a.Right != nil && b.Right != nil { + if a.Right.Data != b.Right.Data { + errorMessage_search(t, fn, arg1, a, b, seaVal) + t.Errorf("Expected right child value %v instead of %v\n", a.Right.Data, b.Right.Data) + fmt.Println("Right.Data", a.Right.Data, b.Right.Data) + } + } else if (a.Right == nil && b.Right != nil) || (a.Right != nil && b.Right == nil) { + t.Errorf("Expected right child value %v instead of %v\n", a.Right, b.Right) + } + + if a.Left != nil && b.Left != nil { + if a.Left.Data != b.Left.Data { + errorMessage_search(t, fn, arg1, a, b, seaVal) + t.Errorf("Expected left child value %v instead of %v\n", a.Left, b.Left) + fmt.Println("Left.Data", a.Left.Data, b.Left.Data) + } + } else if (a.Left == nil && b.Left != nil) || (a.Left != nil && b.Left == nil) { + t.Errorf("Expected left child value %v instead of %v\n", a, b) + } +} + +func TestBTreeSearchItem(t *testing.T) { + root := &solutions.TreeNode{Data: "04"} + rootS := &student.TreeNode{Data: "04"} + + ins := []string{"01", "07", "05", "12", "02", "03", "10"} + + for _, v := range ins { + root = solutions.BTreeInsertData(root, v) + rootS = student.BTreeInsertData(rootS, v) + } + fn := interface{}(solutions.BTreeSearchItem) + + ins = append(ins, "322") + for _, v := range ins { + selectedSol := solutions.BTreeSearchItem(root, v) + selectedStu := student.BTreeSearchItem(rootS, v) + CompareNode_search(t, fn, root, selectedSol, selectedStu, v) + } + +} diff --git a/tests/go/btreetransplant_test.go b/tests/go/btreetransplant_test.go new file mode 100644 index 00000000..42cef51f --- /dev/null +++ b/tests/go/btreetransplant_test.go @@ -0,0 +1,142 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" + "fmt" +) + +func parentListTransp(root *student.TreeNode) string { + if root == nil { + return "" + } + + var parent string + + if root.Parent == nil { + parent = "nil" + } else { + parent = root.Parent.Data + } + + r := "Node: " + root.Data + " Parent: " + parent + "\n" + r += parentListTransp(root.Left) + parentListTransp(root.Right) + return r +} + +func FormatTree_transp(root *student.TreeNode) string { + if root == nil { + return "" + } + res := root.Data + "\n" + res += formatSubTree_transp(root, "") + return res +} + +func formatSubTree_transp(root *student.TreeNode, prefix string) string { + if root == nil { + return "" + } + + var res string + + hasLeft := root.Left != nil + hasRight := root.Right != nil + + if !hasLeft && !hasRight { + return res + } + + res += prefix + if hasLeft && hasRight { + res += "├── " + } + + if !hasLeft && hasRight { + res += "└── " + } + + if hasRight { + printStrand := (hasLeft && hasRight && (root.Right.Right != nil || root.Right.Left != nil)) + newPrefix := prefix + if printStrand { + newPrefix += "│ " + } else { + newPrefix += " " + } + res += root.Right.Data + "\n" + res += formatSubTree_transp(root.Right, newPrefix) + } + + if hasLeft { + if hasRight { + res += prefix + } + res += "└── " + root.Left.Data + "\n" + res += formatSubTree_transp(root.Left, prefix+" ") + } + return res +} + +func errorMessage_transp(t *testing.T, fn interface{}, root, sel, repl *solutions.TreeNode, rootA *solutions.TreeNode, rootAS *student.TreeNode) { + t.Errorf("%s(\nRoot:\n %s, Selected:\n%s, Replacement:\n%s\n) ==\n%s instead of\n%s\n", + z01.NameOfFunc(fn), + solutions.FormatTree(root), + solutions.FormatTree(sel), + solutions.FormatTree(repl), + FormatTree_transp(rootAS), + solutions.FormatTree(rootA), + ) +} + +func CompareTrees_transp(t *testing.T, fn interface{}, root, sel, repl *solutions.TreeNode, rootA *solutions.TreeNode, rootAS *student.TreeNode) { + solTree := solutions.FormatTree(rootA) + stuTree := FormatTree_transp(rootAS) + + if solTree != stuTree { + errorMessage_transp(t, fn, root, sel, repl, rootA, rootAS) + } + parentSol := solutions.ParentList(rootA) + parentStu := parentListTransp(rootAS) + + if parentSol != parentStu { + fmt.Println("Tree:\n", solTree) + t.Errorf("Expected\n%s instead of\n%s\n", parentSol, parentStu) + } +} + +func TestBTreeTransplant(t *testing.T) { + root := &solutions.TreeNode{Data: "04"} + rootS := &student.TreeNode{Data: "04"} + rootOr := &solutions.TreeNode{Data: "04"} + + replacement := &solutions.TreeNode{Data: "55"} + replacementS := &student.TreeNode{Data: "55"} + + ins := []string{"01", "07", "05", "12", "02", "03", "10"} + + rep := []string{"33", "12", "15", "60"} + + for _, v := range ins { + root = solutions.BTreeInsertData(root, v) + rootS = student.BTreeInsertData(rootS, v) + rootOr = solutions.BTreeInsertData(rootOr, v) + } + + for _, v := range rep { + replacement = solutions.BTreeInsertData(replacement, v) + replacementS = student.BTreeInsertData(replacementS, v) + } + + selected := solutions.BTreeSearchItem(root, "07") + selectedS := student.BTreeSearchItem(rootS, "07") + root = solutions.BTreeTransplant(root, selected, replacement) + rootS = student.BTreeTransplant(rootS, selectedS, replacementS) + fn := interface{}(solutions.BTreeTransplant) + + CompareTrees_transp(t, fn, rootOr, selected, replacement, root, rootS) +} diff --git a/tests/go/capitalize_test.go b/tests/go/capitalize_test.go new file mode 100644 index 00000000..b70f3884 --- /dev/null +++ b/tests/go/capitalize_test.go @@ -0,0 +1,26 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestCapitalize(t *testing.T) { + table := append( + z01.MultRandASCII(), + "Hello! How are you? How+are+things+4you?", + "Hello! How are you?", + "a", + "z", + "!", + "9a", + "9a LALALA!", + ) + for _, arg := range table { + z01.Challenge(t, student.Capitalize, solutions.Capitalize, arg) + } +} diff --git a/tests/go/cat_test.go b/tests/go/cat_test.go new file mode 100644 index 00000000..b2292123 --- /dev/null +++ b/tests/go/cat_test.go @@ -0,0 +1,93 @@ +package student_test + +import ( + "errors" + "io/ioutil" + "log" + "os" + "os/exec" + "strings" + "testing" + + solutions "./solutions" + + "github.com/01-edu/z01" +) + +//executes commands +func execC(name string, args ...string) (string, error) { + out, err := exec.Command(name, args...).Output() + + output := string(out) + if err == nil { + return output, nil + } + if output == "" { + return "", z01.Wrap(err, "Command failed") + } + return "", errors.New(output) +} + +func TestCat(t *testing.T) { + + var table []string + pathFileName := "./student/cat/quest8.txt" + pathFileName2 := "./student/cat/quest8T.txt" + + solutions.CheckFile(t, pathFileName) + solutions.CheckFile(t, pathFileName2) + + table = append(table, pathFileName, pathFileName+" "+pathFileName2, "asd") + + for _, s := range table { + z01.ChallengeMain(t, strings.Fields(s)...) + } + _, err := execC("go", "build", "-o", "cat_student", "./student/cat/main.go") + _, err = execC("go", "build", "-o", "cat_solution", "./solutions/cat/main.go") + if err != nil { + log.Fatal(err.Error()) + } + pwd, err := os.Getwd() + + if err != nil { + t.Errorf(err.Error()) + } + + for i := 0; i < 2; i++ { + randStdin := z01.RandAlnum() + cmd := exec.Command("sh", "-c", pwd+"/cat_solution") + solutionResult := execStdin(cmd, randStdin) + cmdS := exec.Command(pwd + "/cat_student") + studentResult := execStdin(cmdS, randStdin) + + if solutionResult != studentResult { + t.Errorf("./cat prints %s instead of %s\n", studentResult, solutionResult) + } + } + execC("rm", "cat_student", "cat_solution") +} + +func execStdin(cmd *exec.Cmd, randomStdin string) string { + stdin, err := cmd.StdinPipe() + if err != nil { + log.Fatal(err) + } + stdout, err := cmd.StdoutPipe() + if err != nil { + log.Fatal(err) + } + if err := cmd.Start(); err != nil { + log.Fatal(err) + } + _, err = stdin.Write([]byte(randomStdin)) + if err != nil { + log.Fatal(err) + } + stdin.Close() + + out, _ := ioutil.ReadAll(stdout) + if err := cmd.Wait(); err != nil { + log.Fatal(err) + } + return string(out) +} diff --git a/tests/go/collatzcountdown_test.go b/tests/go/collatzcountdown_test.go new file mode 100644 index 00000000..b1fb8e38 --- /dev/null +++ b/tests/go/collatzcountdown_test.go @@ -0,0 +1,21 @@ +package student_test + +import ( + "testing" + + solutions "./solutions" + student "./student" + "github.com/01-edu/z01" +) + +func TestCollatzCountdown(t *testing.T) { + args := []int{z01.RandIntBetween(-6, 20)} + args = append(args, -5, 0) + for i := 0; i < 20; i++ { + args = append(args, z01.RandIntBetween(2, 20)) + } + + for _, v := range args { + z01.Challenge(t, student.CollatzCountdown, solutions.CollatzCountdown, v) + } +} diff --git a/tests/go/comcheck_test.go b/tests/go/comcheck_test.go new file mode 100644 index 00000000..989c1e73 --- /dev/null +++ b/tests/go/comcheck_test.go @@ -0,0 +1,23 @@ +package student_test + +import ( + "strings" + "testing" + + "github.com/01-edu/z01" +) + +func TestComCheck(t *testing.T) { + table := append(z01.MultRandWords(), + "01", + "galaxy", + "galaxy01", + " 01", + "as das d 01 asd", + "as galaxy d 12", + "as ds galaxy 01 asd") + + for _, s := range table { + z01.ChallengeMain(t, strings.Fields(s)...) + } +} diff --git a/tests/go/compact_test.go b/tests/go/compact_test.go new file mode 100644 index 00000000..39092573 --- /dev/null +++ b/tests/go/compact_test.go @@ -0,0 +1,59 @@ +package student_test + +import ( + "reflect" + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestCompact(t *testing.T) { + var arg [][]string + + for i := 0; i < 20; i++ { + n := z01.RandIntBetween(5, 20) // random size of the slice + + orig := make([]string, n) //slice with the original value + + num_pos := z01.RandIntBetween(1, n-1) // random number of positions to be written + + for i := 0; i < num_pos; i++ { + word := z01.RandWords() // random string value + rand_pos := z01.RandIntBetween(0, n-1) // random position in the slice + orig[rand_pos] = word + } + arg = append(arg, orig) + } + + arg = append(arg, []string{"hello", "", "hi", "", "salut", "", ""}) + + for _, v := range arg { + sli_sol := make([]string, len(arg)) // slice to apply the solution function + sli_stu := make([]string, len(arg)) // slice to apply the student function + + copy(sli_sol, v) + copy(sli_stu, v) + + sol_size := solutions.Compact(&sli_sol) + stu_size := student.Compact(&sli_stu) + + if !reflect.DeepEqual(sli_stu, sli_sol) { + t.Errorf("Produced slice: %v, instead of %v\n", + sli_stu, + sli_sol, + ) + } + + if sol_size != stu_size { + t.Errorf("%s(%v) == %v instead of %v\n", + "Compact", + v, + sli_stu, + sli_sol, + ) + } + } +} diff --git a/tests/go/compare_test.go b/tests/go/compare_test.go new file mode 100644 index 00000000..c97c77be --- /dev/null +++ b/tests/go/compare_test.go @@ -0,0 +1,53 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestCompare(t *testing.T) { + type node struct { + s string + toCompare string + } + + table := []node{} + + // the first 15 values are returning 0 for this test + for i := 0; i < 15; i++ { + wordToTest := z01.RandASCII() + + val := node{ + s: wordToTest, + toCompare: wordToTest, + } + table = append(table, val) + } + + // the next 15 values are supposed to return 1 or -1 for this test + for i := 0; i < 15; i++ { + wordToTest := z01.RandASCII() + wrongMatch := z01.RandASCII() + + val := node{ + s: wordToTest, + toCompare: wrongMatch, + } + table = append(table, val) + + } + // those are the test values from the README examples + table = append(table, + node{s: "Hello!", toCompare: "Hello!"}, + node{s: "Salut!", toCompare: "lut!"}, + node{s: "Ola!", toCompare: "Ol"}, + ) + + for _, arg := range table { + z01.Challenge(t, student.Compare, solutions.Compare, arg.s, arg.toCompare) + } +} diff --git a/tests/go/concat_test.go b/tests/go/concat_test.go new file mode 100644 index 00000000..9fd715d5 --- /dev/null +++ b/tests/go/concat_test.go @@ -0,0 +1,26 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestConcat(t *testing.T) { + table := [][]string{} + + // 30 valid pair of ramdom strings to concatenate + for i := 0; i < 30; i++ { + value := []string{z01.RandASCII(), z01.RandASCII()} + table = append(table, value) + } + table = append(table, + []string{"Hello!", " How are you?"}, + ) + for _, arg := range table { + z01.Challenge(t, student.Concat, solutions.Concat, arg[0], arg[1]) + } +} diff --git a/tests/go/concatparams_test.go b/tests/go/concatparams_test.go new file mode 100644 index 00000000..cbf354a2 --- /dev/null +++ b/tests/go/concatparams_test.go @@ -0,0 +1,29 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestConcatParams(t *testing.T) { + + table := [][]string{} + //30 random slice of strings + + for i := 0; i < 30; i++ { + val := z01.MultRandASCII() + table = append(table, val) + } + + table = append(table, + []string{"Hello", "how", "are", "you?"}, + ) + + for _, arg := range table { + z01.Challenge(t, student.ConcatParams, solutions.ConcatParams, arg) + } +} diff --git a/tests/go/convertbase_test.go b/tests/go/convertbase_test.go new file mode 100644 index 00000000..bfbe8f19 --- /dev/null +++ b/tests/go/convertbase_test.go @@ -0,0 +1,42 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestConvertBase(t *testing.T) { + + type node struct { + nbr string + baseFrom string + baseTo string + } + table := []node{} + + for i := 0; i < 30; i++ { + validBaseToInput1 := solutions.RandomValidBase() + validBaseToInput2 := solutions.RandomValidBase() + str := solutions.ConvertNbrBase(z01.RandIntBetween(0, 1000000), validBaseToInput1) + val := node{ + nbr: str, + baseFrom: validBaseToInput1, + baseTo: validBaseToInput2, + } + table = append(table, val) + } + + table = append(table, node{ + nbr: "101011", + baseFrom: "01", + baseTo: "0123456789"}, + ) + + for _, arg := range table { + z01.Challenge(t, student.ConvertBase, solutions.ConvertBase, arg.nbr, arg.baseFrom, arg.baseTo) + } +} diff --git a/tests/go/countif_test.go b/tests/go/countif_test.go new file mode 100644 index 00000000..557b4443 --- /dev/null +++ b/tests/go/countif_test.go @@ -0,0 +1,75 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestCountIf(t *testing.T) { + functionsArray := []func(string) bool{solutions.IsNumeric, solutions.IsLower, solutions.IsUpper} + + type node struct { + f func(string) bool + arr []string + } + + 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, + node{ + f: solutions.IsNumeric, + arr: []string{"Hello", "how", "are", "you"}, + }, + node{ + f: solutions.IsNumeric, + arr: []string{"This", "is", "4", "you"}, + }, + ) + + for _, arg := range table { + z01.Challenge(t, student.CountIf, solutions.CountIf, arg.f, arg.arr) + } +} diff --git a/tests/go/createelem_test.go b/tests/go/createelem_test.go new file mode 100644 index 00000000..7e6fb656 --- /dev/null +++ b/tests/go/createelem_test.go @@ -0,0 +1,50 @@ +package student_test + +import ( + "testing" + + solution "./solutions" + student "./student" + "github.com/01-edu/z01" +) + +//the structs from the other packages +//struct just for the first exercise +type NodeF = student.Node +type NodeFS = solution.Node + +//exercise 1 +//simple struct, just insert a element in the struct +func TestCreateElem(t *testing.T) { + n := &NodeFS{} + n1 := &NodeF{} + + type nodeTest struct { + data []int + } + + table := []nodeTest{} + + for i := 0; i < 5; i++ { + val := nodeTest{ + data: z01.MultRandIntBetween(-1000000, 10000000), + } + table = append(table, val) + } + + table = append(table, + nodeTest{ + data: []int{132423}, + }, + ) + for _, arg := range table { + for i := 0; i < len(arg.data); i++ { + solution.CreateElem(n, arg.data[i]) + student.CreateElem(n1, arg.data[i]) + } + + if n.Data != n1.Data { + t.Errorf("CreateElem == %d instead of %d\n", n, n1) + } + } +} diff --git a/tests/go/displayfile_test.go b/tests/go/displayfile_test.go new file mode 100644 index 00000000..53f18de5 --- /dev/null +++ b/tests/go/displayfile_test.go @@ -0,0 +1,23 @@ +package student_test + +import ( + "strings" + "testing" + + solutions "./solutions" + "github.com/01-edu/z01" +) + +func TestDisplayfile(t *testing.T) { + + var table []string + pathFileName := "./student/displayfile/quest8.txt" + + solutions.CheckFile(t, pathFileName) + + table = append(table, "", pathFileName, "quest8.txt asdsada") + + for _, s := range table { + z01.ChallengeMain(t, strings.Fields(s)...) + } +} diff --git a/tests/go/divmod_test.go b/tests/go/divmod_test.go new file mode 100644 index 00000000..dbc1bf8f --- /dev/null +++ b/tests/go/divmod_test.go @@ -0,0 +1,27 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + student "./student" +) + +func TestDivMod(t *testing.T) { + i := 0 + for i < z01.SliceLen { + a := z01.RandInt() + b := z01.RandInt() + var div int + var mod int + student.DivMod(a, b, &div, &mod) + if div != a/b { + t.Errorf("DivMod(%d, %d, &div, &mod), div == %d instead of %d", a, b, div, a/b) + } + if mod != a%b { + t.Errorf("DivMod(%d, %d, &div, &mod), mod == %d instead of %d", a, b, mod, a%b) + } + i++ + } +} diff --git a/tests/go/doop_test.go b/tests/go/doop_test.go new file mode 100644 index 00000000..33f28a31 --- /dev/null +++ b/tests/go/doop_test.go @@ -0,0 +1,44 @@ +package student_test + +import ( + "strings" + "testing" + + "strconv" + + "github.com/01-edu/z01" +) + +func TestDoop(t *testing.T) { + + operatorsTable := []string{"+", "-", "*", "/", "%"} + + table := []string{} + + for i := 0; i < 4; i++ { + firstArg := strconv.Itoa(z01.RandIntBetween(-1000, 1000)) + secondArg := strconv.Itoa(z01.RandIntBetween(0, 1000)) + + for _, operator := range operatorsTable { + table = append(table, firstArg+" "+operator+" "+secondArg) + + } + } + + table = append(table, "1 + 1") + table = append(table, "hello + 1") + table = append(table, "1 p 1") + table = append(table, "1 / 0") + table = append(table, "1 # 1") + table = append(table, "1 % 0") + table = append(table, "1 * 1") + table = append(table, "1argument") + table = append(table, "2 arguments") + table = append(table, "4 arguments so invalid") + table = append(table, "9223372036854775807 + 1") + table = append(table, "9223372036854775809 - 3") + table = append(table, "9223372036854775807 * 3") + for _, s := range table { + z01.ChallengeMain(t, strings.Fields(s)...) + } +} diff --git a/tests/go/eightqueens_test.go b/tests/go/eightqueens_test.go new file mode 100644 index 00000000..affcfa7e --- /dev/null +++ b/tests/go/eightqueens_test.go @@ -0,0 +1,14 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestEightQueens(t *testing.T) { + z01.Challenge(t, student.EightQueens, solutions.EightQueens) +} diff --git a/tests/go/enigma_test.go b/tests/go/enigma_test.go new file mode 100644 index 00000000..72f4d198 --- /dev/null +++ b/tests/go/enigma_test.go @@ -0,0 +1,70 @@ +package student_test + +import ( + solutions "./solutions" + student "./student" + "github.com/01-edu/z01" + "testing" +) + +func TestEnigma(t *testing.T) { + args := []int{z01.RandIntBetween(2, 20)} + for i := 0; i < 3; i++ { + args = append(args, z01.RandIntBetween(2, 20)) + } + + aval := args[0] + x := args[0] + y := &x + z := &y + a := &z + + bval := args[1] + w := args[1] + b := &w + + cval := args[2] + u := args[2] + e := &u + f := &e + g := &f + h := &g + i := &h + j := &i + c := &j + + dval := args[3] + k := args[3] + l := &k + m := &l + n := &m + d := &n + + student.Enigma(a, b, c, d) + solutions.Decript(a, b, c, d) + + if aval != ***a { + t.Errorf("Expected ***a = %d instead of %d\n", + aval, + ***a, + ) + } + if bval != *b { + t.Errorf("Expected *b = %d instead of %d\n", + bval, + *b, + ) + } + if cval != *******c { + t.Errorf("Expected *******c = %d instead of %d\n", + cval, + *******c, + ) + } + if dval != ****d { + t.Errorf("Expected ****d = %d instead of %d\n", + dval, + ****d, + ) + } +} diff --git a/tests/go/entrypoint.sh b/tests/go/entrypoint.sh new file mode 100644 index 00000000..df6388e9 --- /dev/null +++ b/tests/go/entrypoint.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +# Unofficial Bash Strict Mode +set -euo pipefail +IFS=' +' + +cp -rT /app /jail + +if test -v EXPECTED_FILES; then + echo -n "Formatting... " + cd /jail/student + s=$(goimports -d $(echo $EXPECTED_FILES | fmt -w1 | grep '\.go$')) + if test "$s"; then + echo + echo "$s" + exit 1 + fi + echo OK + if test -v ALLOWED_FUNCTIONS; then + rc "$EXPECTED_FILES" $ALLOWED_FUNCTIONS + fi +fi + +cd /jail + +if ! test -f ${EXERCISE}_test.go; then + echo No test file found for the exercise : "$EXERCISE" + exit 1 +fi + +# TODO: maybe change btree exercises so that they work without student code and then delete this line +find . -name '*_test.go' ! -name ${EXERCISE}_test.go -delete + +go test -failfast -run=\(?i\)test${EXERCISE} diff --git a/tests/go/fibonacci_test.go b/tests/go/fibonacci_test.go new file mode 100644 index 00000000..28ba9b15 --- /dev/null +++ b/tests/go/fibonacci_test.go @@ -0,0 +1,22 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestFibonacci(t *testing.T) { + table := append( + z01.MultRandIntBetween(0, 25), + 4, + 5, + -5, + ) + for _, arg := range table { + z01.Challenge(t, student.Fibonacci, solutions.Fibonacci, arg) + } +} diff --git a/tests/go/findnextprime_test.go b/tests/go/findnextprime_test.go new file mode 100644 index 00000000..a72140ec --- /dev/null +++ b/tests/go/findnextprime_test.go @@ -0,0 +1,36 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestFindNextPrime(t *testing.T) { + table := append( + z01.MultRandIntBetween(-1000000, 1000000), + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 100, + 1000000086, + 1000000087, + 1000000088, + ) + for _, arg := range table { + z01.Challenge(t, student.FindNextPrime, solutions.FindNextPrime, arg) + } +} diff --git a/tests/go/firstrune_test.go b/tests/go/firstrune_test.go new file mode 100644 index 00000000..a3ba8fa1 --- /dev/null +++ b/tests/go/firstrune_test.go @@ -0,0 +1,23 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestFirstRune(t *testing.T) { + table := append( + z01.MultRandASCII(), + "Hello!", + "Salut!", + "Ola!", + "♥01", + ) + for _, arg := range table { + z01.Challenge(t, student.FirstRune, solutions.FirstRune, arg) + } +} diff --git a/tests/go/fixthemain_test.go b/tests/go/fixthemain_test.go new file mode 100644 index 00000000..e50bfaa2 --- /dev/null +++ b/tests/go/fixthemain_test.go @@ -0,0 +1,12 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestFixthemain(t *testing.T) { + + z01.ChallengeMain(t) +} diff --git a/tests/go/flags_test.go b/tests/go/flags_test.go new file mode 100644 index 00000000..528887b8 --- /dev/null +++ b/tests/go/flags_test.go @@ -0,0 +1,51 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" +) + +type node struct { + flags []string + flagsShorthand []string + randArgFlag []string + randArg []string +} + +func TestFlags(t *testing.T) { + str := []string{"--insert=", "--order"} + strShorthand := []string{"-i=", "-o"} + var randflag []string + var randflagarg []string + for i := 0; i < 2; i++ { + randflagarg = append(randflagarg, z01.RandWords()) + randflag = append(randflag, z01.RandWords()) + } + + node := &node{ + flags: str, + flagsShorthand: strShorthand, + randArgFlag: randflagarg, + randArg: randflag, + } + + 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) + + for _, v2 := range node.randArgFlag { + for _, v1 := range node.randArg { + z01.ChallengeMain(t, 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) + } + } +} diff --git a/tests/go/foreach_test.go b/tests/go/foreach_test.go new file mode 100644 index 00000000..82583fcb --- /dev/null +++ b/tests/go/foreach_test.go @@ -0,0 +1,44 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestForEach(t *testing.T) { + + functionsArray := []func(int){solutions.Add0, solutions.Add1, solutions.Add2, solutions.Add3} + + type node struct { + f func(int) + arr []int + } + + table := []node{} + + //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{ + f: solutions.Add0, + arr: []int{1, 2, 3, 4, 5, 6}, + }) + + for _, arg := range table { + z01.Challenge(t, student.ForEach, solutions.ForEach, arg.f, arg.arr) + } +} diff --git a/tests/go/index_test.go b/tests/go/index_test.go new file mode 100644 index 00000000..b424cce1 --- /dev/null +++ b/tests/go/index_test.go @@ -0,0 +1,55 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestIndex(t *testing.T) { + type node struct { + s string + toFind string + } + + table := []node{} + + // the first 15 values are valid for this test + for i := 0; i < 15; i++ { + wordToTest := z01.RandASCII() + firstLetterIndex := z01.RandIntBetween(0, (len(wordToTest)-1)/2) + lastLetterIndex := z01.RandIntBetween(firstLetterIndex, len(wordToTest)-1) + + val := node{ + s: wordToTest, + toFind: wordToTest[firstLetterIndex:lastLetterIndex], + } + table = append(table, val) + } + + // the next 15 values are supposed to be invalid for this test + for i := 0; i < 15; i++ { + wordToTest := z01.RandASCII() + wrongMatch := z01.RandASCII() + + val := node{ + s: wordToTest, + toFind: wrongMatch, + } + table = append(table, val) + + } + // those are the test values from the README examples + table = append(table, + node{s: "Hello!", toFind: "l"}, + node{s: "Salut!", toFind: "alu"}, + node{s: "Ola!", toFind: "hOl"}, + ) + + for _, arg := range table { + z01.Challenge(t, student.Index, solutions.Index, arg.s, arg.toFind) + } +} diff --git a/tests/go/isalpha_test.go b/tests/go/isalpha_test.go new file mode 100644 index 00000000..b15032f1 --- /dev/null +++ b/tests/go/isalpha_test.go @@ -0,0 +1,28 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestIsAlpha(t *testing.T) { + table := append( + z01.MultRandASCII(), + "Hello! €How are you?", + "a", + "z", + "!", + "HelloHowareyou", + "What's this 4?", + "Whatsthis4", + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!", + ) + for _, arg := range table { + z01.Challenge(t, student.IsAlpha, solutions.IsAlpha, arg) + } +} diff --git a/tests/go/islower_test.go b/tests/go/islower_test.go new file mode 100644 index 00000000..b3a88a8b --- /dev/null +++ b/tests/go/islower_test.go @@ -0,0 +1,47 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestIsLower(t *testing.T) { + // 15 unvalid strings in the table + table := z01.MultRandASCII() + + // 15 valid lowercase strings of random size between 1 and 20 letters in the table + for i := 0; i < 15; i++ { + size := z01.RandIntBetween(1, 20) + randLow := z01.RandLower() + if len(randLow) <= size { + table = append(table, randLow) + } else { + table = append(table, randLow[:size]) + } + } + + // Special cases added to table + table = append(table, + "Hello! How are you?", + "a", + "z", + "!", + "HelloHowareyou", + "What's this 4?", + "Whatsthis4", + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!", + "0123456789", + "01,02,03", + "abcdefghijklmnopqrstuvwxyz", + "hello", + "hello!", + ) + for _, arg := range table { + z01.Challenge(t, student.IsLower, solutions.IsLower, arg) + } +} diff --git a/tests/go/isnegative_test.go b/tests/go/isnegative_test.go new file mode 100644 index 00000000..22fb5101 --- /dev/null +++ b/tests/go/isnegative_test.go @@ -0,0 +1,22 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestIsNegative(t *testing.T) { + table := append( + z01.MultRandInt(), + z01.MinInt, + z01.MaxInt, + 0, + ) + for _, arg := range table { + z01.Challenge(t, student.IsNegative, solutions.IsNegative, arg) + } +} diff --git a/tests/go/isnumeric_test.go b/tests/go/isnumeric_test.go new file mode 100644 index 00000000..6995bda5 --- /dev/null +++ b/tests/go/isnumeric_test.go @@ -0,0 +1,40 @@ +package student_test + +import ( + "strconv" + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestIsNumeric(t *testing.T) { + // 15 unvalid strings in the table + table := z01.MultRandASCII() + + // 15 valid strings in the table + for i := 0; i < 15; i++ { + table = append(table, strconv.Itoa(z01.RandIntBetween(0, 1000000))) + } + + // Special cases added to table + table = append(table, + "Hello! How are you?", + "a", + "z", + "!", + "HelloHowareyou", + "What's this 4?", + "Whatsthis4", + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!", + "0123456789", + "010203", + "01,02,03", + ) + for _, arg := range table { + z01.Challenge(t, student.IsNumeric, solutions.IsNumeric, arg) + } +} diff --git a/tests/go/isprime_test.go b/tests/go/isprime_test.go new file mode 100644 index 00000000..b6efce22 --- /dev/null +++ b/tests/go/isprime_test.go @@ -0,0 +1,35 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestIsPrime(t *testing.T) { + table := append( + z01.MultRandIntBetween(-1000000, 1000000), + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 100, + 1000000086, + 1000000087, + ) + for _, arg := range table { + z01.Challenge(t, student.IsPrime, solutions.IsPrime, arg) + } +} diff --git a/tests/go/isprintable_test.go b/tests/go/isprintable_test.go new file mode 100644 index 00000000..184780a9 --- /dev/null +++ b/tests/go/isprintable_test.go @@ -0,0 +1,51 @@ +package student_test + +import ( + "math/rand" + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestIsPrintable(t *testing.T) { + // 15 unvalid strings in the table + table := z01.MultRandASCII() + + // 15 valid lowercase strings of random size between 1 and 20 letters in the table + for i := 0; i < 15; i++ { + letters := []rune("\a\b\f\r\n\v\t") + size := z01.RandIntBetween(1, 20) + r := make([]rune, size) + for i := range r { + r[i] = letters[rand.Intn(len(letters))] + } + table = append(table, string(r)) + + } + + // Special cases added to table + table = append(table, + "Hello! How are you?", + "a", + "z", + "!", + "HelloHowareyou", + "What's this 4?", + "Whatsthis4", + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!", + "0123456789", + "01,02,03", + "abcdefghijklmnopqrstuvwxyz", + "hello", + "hello!", + "hello\n", + "\n", + ) + for _, arg := range table { + z01.Challenge(t, student.IsPrintable, solutions.IsPrintable, arg) + } +} diff --git a/tests/go/issorted_test.go b/tests/go/issorted_test.go new file mode 100644 index 00000000..c87e4824 --- /dev/null +++ b/tests/go/issorted_test.go @@ -0,0 +1,87 @@ +package student_test + +import ( + "sort" + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestIsSorted(t *testing.T) { + functionsArray := []func(int, int) int{solutions.IsSortedByDiff, solutions.IsSortedBy1, solutions.IsSortedBy10} + + type node struct { + f func(int, int) int + arr []int + } + + table := []node{} + + //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) + + val := node{ + f: functionSelected, + 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))) + val := node{ + f: functionSelected, + arr: reverseArr, + } + table = append(table, val) + + } + + table = append(table, node{ + f: solutions.IsSortedByDiff, + arr: []int{1, 2, 3, 4, 5, 6}, + }) + + table = append(table, node{ + f: solutions.IsSortedByDiff, + arr: []int{6, 5, 4, 3, 2, 1}, + }) + + table = append(table, node{ + f: solutions.IsSortedByDiff, + arr: []int{0, 0, 0, 0, 0, 0, 0}, + }) + + table = append(table, node{ + f: solutions.IsSortedByDiff, + arr: []int{0}, + }) + + for _, arg := range table { + z01.Challenge(t, student.IsSorted, solutions.IsSorted, arg.f, arg.arr) + } +} diff --git a/tests/go/isupper_test.go b/tests/go/isupper_test.go new file mode 100644 index 00000000..831ab960 --- /dev/null +++ b/tests/go/isupper_test.go @@ -0,0 +1,49 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestIsUpper(t *testing.T) { + // 15 unvalid strings in the table + table := z01.MultRandASCII() + + // 15 valid lowercase strings of random size between 1 and 20 letters in the table + for i := 0; i < 15; i++ { + size := z01.RandIntBetween(1, 20) + randLow := z01.RandLower() + if len(randLow) <= size { + table = append(table, randLow) + } else { + table = append(table, randLow[:size]) + } + } + + // Special cases added to table + table = append(table, + "Hello! How are you?", + "a", + "z", + "!", + "HelloHowareyou", + "What's this 4?", + "Whatsthis4", + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!", + "0123456789", + "01,02,03", + "abcdefghijklmnopqrstuvwxyz", + "hello", + "hello!", + "HELLO", + "HELLO!", + ) + for _, arg := range table { + z01.Challenge(t, student.IsUpper, solutions.IsUpper, arg) + } +} diff --git a/tests/go/iterativefactorial_test.go b/tests/go/iterativefactorial_test.go new file mode 100644 index 00000000..51529119 --- /dev/null +++ b/tests/go/iterativefactorial_test.go @@ -0,0 +1,24 @@ +package student_test + +import ( + "math/bits" + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestIterativeFactorial(t *testing.T) { + table := append( + z01.MultRandInt(), + z01.IntRange(0, 12)..., + ) + if bits.UintSize == 64 { + table = append(table, z01.IntRange(13, 20)...) + } + for _, arg := range table { + z01.Challenge(t, student.IterativeFactorial, solutions.IterativeFactorial, arg) + } +} diff --git a/tests/go/iterativepower_test.go b/tests/go/iterativepower_test.go new file mode 100644 index 00000000..ad5b4714 --- /dev/null +++ b/tests/go/iterativepower_test.go @@ -0,0 +1,22 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestIterativePower(t *testing.T) { + i := 0 + for i < 30 { + nb := z01.RandIntBetween(-8, 8) + power := z01.RandIntBetween(-10, 10) + z01.Challenge(t, student.IterativePower, solutions.IterativePower, nb, power) + i++ + } + z01.Challenge(t, student.IterativePower, solutions.IterativePower, 0, 0) + z01.Challenge(t, student.IterativePower, solutions.IterativePower, 0, 1) +} diff --git a/tests/go/itoa_test.go b/tests/go/itoa_test.go new file mode 100644 index 00000000..d1dae47e --- /dev/null +++ b/tests/go/itoa_test.go @@ -0,0 +1,16 @@ +package student_test + +import ( + "testing" + + solutions "./solutions" + student "./student" + "github.com/01-edu/z01" +) + +func TestItoa(t *testing.T) { + for i := 0; i < 50; i++ { + arg := z01.RandIntBetween(-2000000000, 2000000000) + z01.Challenge(t, student.Itoa, solutions.Itoa, arg) + } +} diff --git a/tests/go/itoabase_test.go b/tests/go/itoabase_test.go new file mode 100644 index 00000000..66e03bfe --- /dev/null +++ b/tests/go/itoabase_test.go @@ -0,0 +1,23 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestItoaBase(t *testing.T) { + for i := 0; i < 30; i++ { + value := z01.RandIntBetween(-1000000, 1000000) + base := z01.RandIntBetween(2, 16) + z01.Challenge(t, student.ItoaBase, solutions.ItoaBase, value, base) + } + for i := 0; i < 5; i++ { + base := z01.RandIntBetween(2, 16) + z01.Challenge(t, student.ItoaBase, solutions.ItoaBase, z01.MaxInt, base) + z01.Challenge(t, student.ItoaBase, solutions.ItoaBase, z01.MinInt, base) + } +} diff --git a/tests/go/join_test.go b/tests/go/join_test.go new file mode 100644 index 00000000..4c6ea47b --- /dev/null +++ b/tests/go/join_test.go @@ -0,0 +1,26 @@ +package student_test + +import ( + solutions "./solutions" + student "./student" + "github.com/01-edu/z01" + "testing" +) + +func TestJoin(t *testing.T) { + arg1 := []string{"hello", "how", "are", "you", "doing"} + arg2 := []string{"fine", "and", "you"} + arg3 := []string{"I'm", "O.K."} + seps := []string{" ", "-", " ,", "_", "SPC", " . "} + + args := [][]string{arg1, arg2, arg3} + + for i := 0; i < 5; i++ { + //random position for the array of arguments + posA := z01.RandIntBetween(0, len(args)-1) + //random position for the array of separators + posS := z01.RandIntBetween(0, len(seps)-1) + + z01.Challenge(t, student.Join, solutions.Join, args[posA], seps[posS]) + } +} diff --git a/tests/go/lastrune_test.go b/tests/go/lastrune_test.go new file mode 100644 index 00000000..52ab5d35 --- /dev/null +++ b/tests/go/lastrune_test.go @@ -0,0 +1,23 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestLastRune(t *testing.T) { + table := z01.MultRandASCII() + table = append(table, + "Hello!", + "Salut!", + "Ola!", + z01.RandStr(z01.RandIntBetween(1, 15), z01.RandAlnum()), + ) + for _, arg := range table { + z01.Challenge(t, student.LastRune, solutions.LastRune, arg) + } +} diff --git a/tests/go/listat_test.go b/tests/go/listat_test.go new file mode 100644 index 00000000..71deab3a --- /dev/null +++ b/tests/go/listat_test.go @@ -0,0 +1,101 @@ +package student_test + +import ( + "testing" + + solution "./solutions" + student "./student" + "github.com/01-edu/z01" +) + +type Node5 = student.NodeL +type NodeS5 = solution.NodeL + +func nodePushBackList5(l *Node5, l1 *NodeS5, data interface{}) (*Node5, *NodeS5) { + n := &Node5{Data: data} + n1 := &NodeS5{Data: data} + it := l + itS := l1 + + if it == nil { + it = n + } else { + iterator := it + for iterator.Next != nil { + iterator = iterator.Next + } + iterator.Next = n + } + if itS == nil { + itS = n1 + } else { + iterator1 := itS + for iterator1.Next != nil { + iterator1 = iterator1.Next + } + iterator1.Next = n1 + } + return it, itS +} + +// compare functions that consist on inserting using the structure node +func comparFuncNode5(solutionList *NodeS5, l *Node5, l1 *NodeS5, t *testing.T, arg int) { + if l == nil && l1 == nil { + } else if l != nil && l1 == nil { + t.Errorf("\nListAt(%s, %d) == %v instead of %v\n\n", + solution.ListToString(solutionList), arg, l, l1) + } else if l.Data != l1.Data { + t.Errorf("\nListAt(%s, %d) == %v instead of %v\n\n", + solution.ListToString(solutionList), arg, l.Data, l1.Data) + } +} + +// exercise 7 +// finds an element of a solution.ListS using a given position +func TestListAt(t *testing.T) { + var link *Node5 + var link2 *NodeS5 + + type nodeTest struct { + data []interface{} + pos int + } + + var table []nodeTest + + for i := 0; i < 4; i++ { + val := nodeTest{ + data: solution.ConvertIntToInterface(z01.MultRandInt()), + pos: z01.RandIntBetween(1, 12), + } + table = append(table, val) + } + + for i := 0; i < 4; i++ { + val := nodeTest{ + data: solution.ConvertIntToStringface(z01.MultRandWords()), + pos: z01.RandIntBetween(1, 12), + } + table = append(table, val) + } + + table = append(table, + nodeTest{ + data: []interface{}{"I", 1, "something", 2}, + pos: z01.RandIntBetween(1, 4), + }, + ) + + for _, arg := range table { + for i := 0; i < len(arg.data); i++ { + link, link2 = nodePushBackList5(link, link2, arg.data[i]) + } + + result := student.ListAt(link, arg.pos) + result2 := solution.ListAt(link2, arg.pos) + + comparFuncNode5(link2, result, result2, t, arg.pos) + link = nil + link2 = nil + } +} diff --git a/tests/go/listclear_test.go b/tests/go/listclear_test.go new file mode 100644 index 00000000..b0171cd3 --- /dev/null +++ b/tests/go/listclear_test.go @@ -0,0 +1,84 @@ +package student_test + +import ( + "strconv" + "testing" + + solution "./solutions" + student "./student" +) + +type Node4 = student.NodeL +type List4 = solution.List +type NodeS4 = solution.NodeL +type ListS4 = student.List + +func listToStringStu5(l *ListS4) string { + var res string + it := l.Head + for it != nil { + switch it.Data.(type) { + case int: + res += strconv.Itoa(it.Data.(int)) + "-> " + case string: + res += it.Data.(string) + "-> " + } + it = it.Next + } + res += "" + return res +} + +func listPushBackTest4(l *ListS4, l1 *List4, data interface{}) { + n := &Node4{Data: data} + n1 := &NodeS4{Data: data} + if l.Head == nil { + l.Head = n + } else { + iterator := l.Head + for iterator.Next != nil { + iterator = iterator.Next + } + iterator.Next = n + } + if l1.Head == nil { + l1.Head = n1 + } else { + iterator1 := l1.Head + for iterator1.Next != nil { + iterator1 = iterator1.Next + } + iterator1.Next = n1 + } +} + +//exercise 6 +//simply cleans the linked solution.ListS +func TestListClear(t *testing.T) { + link := &List4{} + link2 := &ListS4{} + + table := []solution.NodeTest{} + + table = solution.ElementsToTest(table) + + table = append(table, + solution.NodeTest{ + Data: []interface{}{"I", 1, "something", 2}, + }, + ) + + for _, arg := range table { + + for i := 0; i < len(arg.Data); i++ { + listPushBackTest4(link2, link, arg.Data[i]) + } + solution.ListClear(link) + student.ListClear(link2) + + if link2.Head != nil { + t.Errorf("\nstudent list:%s\nlist:%s\n\nListClear() == %v instead of %v\n\n", + listToStringStu5(link2), solution.ListToString(link.Head), link2.Head, link.Head) + } + } +} diff --git a/tests/go/listfind_test.go b/tests/go/listfind_test.go new file mode 100644 index 00000000..a3459621 --- /dev/null +++ b/tests/go/listfind_test.go @@ -0,0 +1,81 @@ +package student_test + +import ( + "testing" + + solution "./solutions" + student "./student" +) + +type Node9 = student.NodeL +type List9 = solution.List +type NodeS9 = solution.NodeL +type ListS9 = student.List + +func listPushBackTest9(l *ListS9, l1 *List9, data interface{}) { + n := &Node9{Data: data} + n1 := &NodeS9{Data: data} + if l.Head == nil { + l.Head = n + } else { + iterator := l.Head + for iterator.Next != nil { + iterator = iterator.Next + } + iterator.Next = n + } + if l1.Head == nil { + l1.Head = n1 + } else { + iterator1 := l1.Head + for iterator1.Next != nil { + iterator1 = iterator1.Next + } + iterator1.Next = n1 + } +} + +// exercise 11 +func TestListFind(t *testing.T) { + link := &List9{} + link2 := &ListS9{} + + table := []solution.NodeTest{} + table = solution.ElementsToTest(table) + table = append(table, + solution.NodeTest{ + Data: []interface{}{"hello", "hello1", "hello2", "hello3"}, + }, + ) + + for _, arg := range table { + for i := 0; i < len(arg.Data); i++ { + listPushBackTest9(link2, link, arg.Data[i]) + } + if len(arg.Data) != 0 { + aux := student.ListFind(link2, arg.Data[(len(arg.Data)-1)/2], student.CompStr) + aux1 := solution.ListFind(link, arg.Data[(len(arg.Data)-1)/2], solution.CompStr) + + if aux != nil || aux1 != nil { + if *aux != *aux1 { + t.Errorf("ListFind(ref: %s) == %s instead of %s\n", arg.Data[(len(arg.Data)-1)/2], *aux, *aux1) + } + } + } + link = &List9{} + link2 = &ListS9{} + } + + for i := 0; i < len(table[0].Data); i++ { + listPushBackTest9(link2, link, table[0].Data[i]) + } + + aux := student.ListFind(link2, "lksdf", student.CompStr) + aux1 := solution.ListFind(link, "lksdf", solution.CompStr) + if aux != nil && aux1 != nil { + if *aux != *aux1 { + t.Errorf("ListFind(ref: lksdf) == %s instead of %s\n", *aux, *aux1) + } + } + +} diff --git a/tests/go/listforeach_test.go b/tests/go/listforeach_test.go new file mode 100644 index 00000000..1cd46017 --- /dev/null +++ b/tests/go/listforeach_test.go @@ -0,0 +1,102 @@ +package student_test + +import ( + "strconv" + "testing" + + solution "./solutions" + student "./student" +) + +type Node7 = student.NodeL +type List7 = solution.List +type NodeS7 = solution.NodeL +type ListS7 = student.List + +func listToStringStu8(l *ListS7) string { + var res string + it := l.Head + for it != nil { + switch it.Data.(type) { + case int: + res += strconv.Itoa(it.Data.(int)) + "-> " + case string: + res += it.Data.(string) + "-> " + } + it = it.Next + } + res += "" + return res +} + +func listPushBackTest7(l *ListS7, l1 *List7, data interface{}) { + n := &Node7{Data: data} + n1 := &NodeS7{Data: data} + if l.Head == nil { + l.Head = n + } else { + iterator := l.Head + for iterator.Next != nil { + iterator = iterator.Next + } + iterator.Next = n + } + if l1.Head == nil { + l1.Head = n1 + } else { + iterator1 := l1.Head + for iterator1.Next != nil { + iterator1 = iterator1.Next + } + iterator1.Next = n1 + } +} + +func comparFuncList7(l *List7, l1 *ListS7, t *testing.T, f func(*Node7)) { + funcName := solution.GetName(f) + for l.Head != nil || l1.Head != nil { + if (l.Head == nil && l1.Head != nil) || (l.Head != nil && l1.Head == nil) { + t.Errorf("\nstudent list: %s\nlist: %s\nfunction used: %s\n\nListForEach() == %v instead of %v\n\n", + listToStringStu8(l1), solution.ListToString(l.Head), funcName, l1.Head, l.Head) + return + } else if l.Head.Data != l1.Head.Data { + t.Errorf("\nstudent list: %s\nlist: %s\nfunction used: %s\n\nListForEach() == %v instead of %v\n\n", + listToStringStu8(l1), solution.ListToString(l.Head), funcName, l1.Head.Data, l.Head.Data) + return + } + l.Head = l.Head.Next + l1.Head = l1.Head.Next + } +} + +//exercise 9 +//applies a function to the solution.ListS +func TestListForEach(t *testing.T) { + link := &List7{} + link2 := &ListS7{} + table := []solution.NodeTest{} + table = solution.ElementsToTest(table) + table = append(table, + solution.NodeTest{ + Data: []interface{}{"I", 1, "something", 2}, + }, + ) + for _, arg := range table { + + for i := 0; i < len(arg.Data); i++ { + listPushBackTest7(link2, link, arg.Data[i]) + } + student.ListForEach(link2, student.Add2_node) + solution.ListForEach(link, solution.Add2_node) + + comparFuncList7(link, link2, t, student.Add2_node) + + student.ListForEach(link2, student.Subtract3_node) + solution.ListForEach(link, solution.Subtract3_node) + + comparFuncList7(link, link2, t, student.Subtract3_node) + + link = &List7{} + link2 = &ListS7{} + } +} diff --git a/tests/go/listforeachif_test.go b/tests/go/listforeachif_test.go new file mode 100644 index 00000000..8e884205 --- /dev/null +++ b/tests/go/listforeachif_test.go @@ -0,0 +1,151 @@ +package student_test + +import ( + "strconv" + "testing" + + solution "./solutions" + student "./student" + "github.com/01-edu/z01" +) + +type Node8 = student.NodeL +type List8 = solution.List +type NodeS8 = solution.NodeL +type ListS8 = student.List + +// function to apply, in listforeachif +func addOneS(node *NodeS8) { + data := node.Data.(int) + data++ + node.Data = interface{}(data) +} + +// function to apply, in listforeachif +func addOne(node *Node8) { + data := node.Data.(int) + data++ + node.Data = interface{}(data) +} + +func subtract1_sol(node *NodeS8) { + data := node.Data.(int) + data-- + node.Data = interface{}(data) +} + +func subtractOne(node *Node8) { + data := node.Data.(int) + data-- + node.Data = interface{}(data) +} + +func listToStringStu7(l *ListS8) string { + var res string + it := l.Head + for it != nil { + switch it.Data.(type) { + case int: + res += strconv.Itoa(it.Data.(int)) + "-> " + case string: + res += it.Data.(string) + "-> " + } + it = it.Next + } + res += "" + return res +} + +func listPushBackTest8(l *ListS8, l1 *List8, data interface{}) { + + n := &Node8{Data: data} + n1 := &NodeS8{Data: data} + + if l.Head == nil { + l.Head = n + } else { + iterator := l.Head + for iterator.Next != nil { + iterator = iterator.Next + } + iterator.Next = n + } + + if l1.Head == nil { + l1.Head = n1 + } else { + iterator1 := l1.Head + for iterator1.Next != nil { + iterator1 = iterator1.Next + } + iterator1.Next = n1 + } +} + +func comparFuncList8(l *List8, l1 *ListS8, t *testing.T, f func(*Node8) bool, comp func(*Node8)) { + funcFName := solution.GetName(f) + funcComp := solution.GetName(comp) + for l.Head != nil || l1.Head != nil { + if (l.Head == nil && l1.Head != nil) || (l.Head != nil && l1.Head == nil) { + t.Errorf("\nstudent list:%s\nlist:%s\nfunction f used: %s\nfunction comp: %s\n\nListForEachIf() == %v instead of %v\n\n", + listToStringStu7(l1), solution.ListToString(l.Head), funcComp, funcFName, l1.Head, l.Head) + return + } else if l.Head.Data != l1.Head.Data { + t.Errorf("\nstudent list:%s\nlist:%s\nfunction f used: %s\nfunction comp: %s\n\nListForEachIf() == %v instead of %v\n\n", + listToStringStu7(l1), solution.ListToString(l.Head), funcComp, funcFName, l1.Head.Data, l.Head.Data) + return + } + l.Head = l.Head.Next + l1.Head = l1.Head.Next + } +} + +// exercise 10 +// applies a function to an element of the linked solution.ListS +func TestListForEachIf(t *testing.T) { + link := &ListS8{} + link2 := &List8{} + + table := []solution.NodeTest{} + table = append(table, + solution.NodeTest{ + Data: []interface{}{}, + }, + ) + + // just numbers/ints + for i := 0; i < 3; i++ { + val := solution.NodeTest{ + Data: solution.ConvertIntToInterface(z01.MultRandInt()), + } + table = append(table, val) + + } + // just strings + for i := 0; i < 3; i++ { + val := solution.NodeTest{ + Data: solution.ConvertIntToStringface(z01.MultRandWords()), + } + table = append(table, val) + } + table = append(table, + solution.NodeTest{ + Data: []interface{}{"I", 1, "something", 2}, + }, + ) + for _, arg := range table { + for i := 0; i < len(arg.Data); i++ { + listPushBackTest8(link, link2, arg.Data[i]) + } + solution.ListForEachIf(link2, addOneS, solution.IsPositive_node) + student.ListForEachIf(link, addOne, student.IsPositive_node) + comparFuncList8(link2, link, t, student.IsPositive_node, addOne) + + solution.ListForEachIf(link2, subtract1_sol, solution.IsPositive_node) + student.ListForEachIf(link, subtractOne, student.IsPositive_node) + comparFuncList8(link2, link, t, student.IsPositive_node, subtractOne) + + link = &ListS8{} + link2 = &List8{} + } +} diff --git a/tests/go/listlast_test.go b/tests/go/listlast_test.go new file mode 100644 index 00000000..83d87eb0 --- /dev/null +++ b/tests/go/listlast_test.go @@ -0,0 +1,79 @@ +package student_test + +import ( + "strconv" + "testing" + + solution "./solutions" + student "./student" +) + +type Node3 = student.NodeL +type List3 = solution.List +type NodeS3 = solution.NodeL +type ListS3 = student.List + +func listToStringStu9(l *ListS3) string { + var res string + it := l.Head + for it != nil { + switch it.Data.(type) { + case int: + res += strconv.Itoa(it.Data.(int)) + "-> " + case string: + res += it.Data.(string) + "-> " + } + it = it.Next + } + res += "" + return res +} + +//inserts node on two lists +func listPushBackTest3(l *ListS3, l1 *List3, data interface{}) { + n := &Node3{Data: data} + n1 := &NodeS3{Data: data} + if l.Head == nil { + l.Head = n + l.Tail = n + } else { + l.Tail.Next = n + l.Tail = n + } + if l1.Head == nil { + l1.Head = n1 + l1.Tail = n1 + } else { + l1.Tail.Next = n1 + l1.Tail = n1 + } +} + +//exercise 5 +//last element of the solution.ListS +func TestListLast(t *testing.T) { + link := &List3{} + link2 := &ListS3{} + table := []solution.NodeTest{} + + table = solution.ElementsToTest(table) + table = append(table, + solution.NodeTest{ + Data: []interface{}{3, 2, 1}, + }, + ) + for _, arg := range table { + for i := 0; i < len(arg.Data); i++ { + listPushBackTest3(link2, link, arg.Data[i]) + } + aux := solution.ListLast(link) + aux1 := student.ListLast(link2) + + if aux != aux1 { + t.Errorf("\nlist:%s\n\nListLast() == %v instead of %v\n\n", + listToStringStu9(link2), aux1, aux) + } + link = &List3{} + link2 = &ListS3{} + } +} diff --git a/tests/go/listmerge_test.go b/tests/go/listmerge_test.go new file mode 100644 index 00000000..e00d4ed6 --- /dev/null +++ b/tests/go/listmerge_test.go @@ -0,0 +1,141 @@ +package student_test + +import ( + "strconv" + "testing" + + "github.com/01-edu/z01" + + solution "./solutions" + student "./student" +) + +type Node11 = student.NodeL +type List11 = solution.List +type NodeS11 = solution.NodeL +type ListS11 = student.List + +func listToStringStu(l *ListS11) string { + var res string + it := l.Head + for it != nil { + switch it.Data.(type) { + case int: + res += strconv.Itoa(it.Data.(int)) + "->" + case string: + res += it.Data.(string) + "->" + } + it = it.Next + } + res += "" + return res +} + +func listPushBackTest11(l *ListS11, l1 *List11, data interface{}) { + n := &Node11{Data: data} + n1 := &NodeS11{Data: data} + + if l.Head == nil { + l.Head = n + } else { + iterator := l.Head + for iterator.Next != nil { + iterator = iterator.Next + } + iterator.Next = n + } + l.Tail = n + + if l1.Head == nil { + l1.Head = n1 + } else { + iterator1 := l1.Head + for iterator1.Next != nil { + iterator1 = iterator1.Next + } + iterator1.Next = n1 + } + l1.Tail = n1 +} + +func comparFuncList11(l *List11, l1 *ListS11, t *testing.T) { + for l.Head != nil || l1.Head != nil { + if (l.Head == nil && l1.Head != nil) || (l.Head != nil && l1.Head == nil) { + t.Errorf("\nstudent list:%s\nlist:%s\n\nListMerge() == %v instead of %v\n\n", + listToStringStu(l1), solution.ListToString(l.Head), l1.Head, l.Head) + return + } else if l.Head.Data != l1.Head.Data { + t.Errorf("\nstudent list:%s\nlist:%s\n\nListMerge() == %v instead of %v\n\n", + listToStringStu(l1), solution.ListToString(l.Head), l1.Head.Data, l.Head.Data) + return + } + l.Head = l.Head.Next + l1.Head = l1.Head.Next + } +} + +//exercise 14 +func TestListMerge(t *testing.T) { + link := &List11{} + linkTest := &List11{} + link2 := &ListS11{} + link2Test := &ListS11{} + + type nodeTest struct { + data []interface{} + data2 []interface{} + } + table := []nodeTest{} + // empty list + table = append(table, + nodeTest{ + data: []interface{}{}, + data2: []interface{}{}, + }) + table = append(table, + nodeTest{ + data: solution.ConvertIntToInterface(z01.MultRandInt()), + data2: []interface{}{}, + }) + // jut ints + for i := 0; i < 3; i++ { + val := nodeTest{ + data: solution.ConvertIntToInterface(z01.MultRandInt()), + data2: solution.ConvertIntToInterface(z01.MultRandInt()), + } + table = append(table, val) + } + // just strings + for i := 0; i < 2; i++ { + val := nodeTest{ + data: solution.ConvertIntToStringface(z01.MultRandWords()), + data2: solution.ConvertIntToStringface(z01.MultRandWords()), + } + table = append(table, val) + } + table = append(table, + nodeTest{ + data: []interface{}{}, + data2: []interface{}{"a", 1}, + }, + ) + for _, arg := range table { + for i := 0; i < len(arg.data); i++ { + listPushBackTest11(link2, link, arg.data[i]) + } + for i := 0; i < len(arg.data2); i++ { + listPushBackTest11(link2Test, linkTest, arg.data2[i]) + } + + solution.ListMerge(link, linkTest) + + student.ListMerge(link2, link2Test) + + comparFuncList11(link, link2, t) + + link = &List11{} + linkTest = &List11{} + link2 = &ListS11{} + link2Test = &ListS11{} + } +} diff --git a/tests/go/listpushback_test.go b/tests/go/listpushback_test.go new file mode 100644 index 00000000..0da0da4c --- /dev/null +++ b/tests/go/listpushback_test.go @@ -0,0 +1,66 @@ +package student_test + +import ( + "strconv" + "testing" + + solution "./solutions" + student "./student" +) + +type ListS = solution.List +type List = student.List + +func listToStringStu10(l *List) string { + var res string + it := l.Head + for it != nil { + switch it.Data.(type) { + case int: + res += strconv.Itoa(it.Data.(int)) + "-> " + case string: + res += it.Data.(string) + "-> " + } + it = it.Next + } + res += "" + return res +} + +// makes the test, compares 2 lists one from the solutions and the other from the student +func comparFuncList(l *ListS, l1 *List, t *testing.T, data []interface{}) { + for l.Head != nil || l1.Head != nil { + if (l.Head == nil && l1.Head != nil) || (l.Head != nil && l1.Head == nil) { + t.Errorf("\ndata used: %v\nstudent list:%s\nlist:%s\n\nListPushBack()== %v instead of %v\n\n", + data, listToStringStu10(l1), solution.ListToString(l.Head), l1.Head, l.Head) + return + } else if l.Head.Data != l1.Head.Data { + t.Errorf("\ndata used: %v\nstudent list:%s\nlist:%s\n\nListPushBack()== %v instead of %v\n\n", + data, listToStringStu10(l1), solution.ListToString(l.Head), l1.Head.Data, l.Head.Data) + return + } + l.Head = l.Head.Next + l1.Head = l1.Head.Next + } +} + +// exercise 2 +func TestListPushBack(t *testing.T) { + link := &ListS{} + link2 := &List{} + + table := []solution.NodeTest{} + table = solution.ElementsToTest(table) + table = append(table, + solution.NodeTest{ + Data: []interface{}{"Hello", "man", "how are you"}, + }, + ) + for _, arg := range table { + for i := 0; i < len(arg.Data); i++ { + student.ListPushBack(link2, arg.Data[i]) + solution.ListPushBack(link, arg.Data[i]) + } + comparFuncList(link, link2, t, arg.Data) + } +} diff --git a/tests/go/listpushfront_test.go b/tests/go/listpushfront_test.go new file mode 100644 index 00000000..f8d8665c --- /dev/null +++ b/tests/go/listpushfront_test.go @@ -0,0 +1,68 @@ +package student_test + +import ( + "strconv" + "testing" + + solution "./solutions" + student "./student" +) + +type ListSa = solution.List +type Lista = student.List + +func listToStringStu11(l *Lista) string { + var res string + it := l.Head + for it != nil { + switch it.Data.(type) { + case int: + res += strconv.Itoa(it.Data.(int)) + "-> " + case string: + res += it.Data.(string) + "-> " + } + it = it.Next + } + res += "" + return res +} + +//makes the test, compares 2 lists one from the solutions and the other from the student +func comparFuncList1(l *Lista, l1 *ListSa, t *testing.T, data []interface{}) { + for l.Head != nil || l1.Head != nil { + if (l.Head == nil && l1.Head != nil) || (l.Head != nil && l1.Head == nil) { + t.Errorf("\ndata used: %v\nstudent list:%s\nlist:%s\n\nListPushFront()== %v instead of %v\n\n", + data, listToStringStu11(l), solution.ListToString(l1.Head), l.Head, l1.Head) + return + } else if l.Head.Data != l1.Head.Data { + t.Errorf("\ndata used: %v\nstudent list:%s\nlist:%s\n\nListPushFront()== %v instead of %v\n\n", + data, listToStringStu11(l), solution.ListToString(l1.Head), l.Head, l1.Head) + return + } + l1.Head = l1.Head.Next + l.Head = l.Head.Next + } +} + +//exercise 3 +//to insert a value in the first position of the list +func TestListPushFront(t *testing.T) { + link := &Lista{} + link2 := &ListSa{} + table := []solution.NodeTest{} + table = solution.ElementsToTest(table) + table = append(table, + solution.NodeTest{ + Data: []interface{}{"Hello", "man", "how are you"}, + }, + ) + for _, arg := range table { + for i := 0; i < len(arg.Data); i++ { + student.ListPushFront(link, arg.Data[i]) + solution.ListPushFront(link2, arg.Data[i]) + } + comparFuncList1(link, link2, t, arg.Data) + link = &Lista{} + link2 = &ListSa{} + } +} diff --git a/tests/go/listremoveif_test.go b/tests/go/listremoveif_test.go new file mode 100644 index 00000000..47aa7366 --- /dev/null +++ b/tests/go/listremoveif_test.go @@ -0,0 +1,109 @@ +package student_test + +import ( + "strconv" + "testing" + + solution "./solutions" + student "./student" + "github.com/01-edu/z01" +) + +type Node10 = student.NodeL +type List10 = solution.List +type NodeS10 = solution.NodeL +type ListS10 = student.List + +func listToStringStu12(l *ListS10) string { + var res string + it := l.Head + for it != nil { + switch it.Data.(type) { + case int: + res += strconv.Itoa(it.Data.(int)) + "-> " + case string: + res += it.Data.(string) + "-> " + } + it = it.Next + } + res += "" + return res +} + +func listPushBackTest10(l *ListS10, l1 *List10, data interface{}) { + n := &Node10{Data: data} + n1 := &NodeS10{Data: data} + if l.Head == nil { + l.Head = n + } else { + iterator := l.Head + for iterator.Next != nil { + iterator = iterator.Next + } + iterator.Next = n + } + if l1.Head == nil { + l1.Head = n1 + } else { + iterator1 := l1.Head + for iterator1.Next != nil { + iterator1 = iterator1.Next + } + iterator1.Next = n1 + } +} + +func comparFuncList10(l *List10, l1 *ListS10, t *testing.T, data interface{}) { + for l.Head != nil || l1.Head != nil { + if (l.Head == nil && l1.Head != nil) || (l.Head != nil && l1.Head == nil) { + t.Errorf("\ndata used: %v\nstudent list:%s\nlist:%s\n\nListRemoveIf() == %v instead of %v\n\n", + data, listToStringStu12(l1), solution.ListToString(l.Head), l1.Head, l.Head) + return + } else if l.Head.Data != l1.Head.Data { + t.Errorf("\ndata used: %v\nstudent list:%s\nlist:%s\n\nListRemoveIf() == %v instead of %v\n\n", + data, listToStringStu12(l1), solution.ListToString(l.Head), l1.Head.Data, l.Head.Data) + return + } + l.Head = l.Head.Next + l1.Head = l1.Head.Next + } +} + +//exercise 13 +//removes all the elements that are equal to a value +func TestListRemoveIf(t *testing.T) { + link := &List10{} + link2 := &ListS10{} + var index int + table := []solution.NodeTest{} + + table = solution.ElementsToTest(table) + + table = append(table, + solution.NodeTest{ + Data: []interface{}{"hello", "hello1", "hello2", "hello3"}, + }, + ) + + for _, arg := range table { + for i := 0; i < len(arg.Data); i++ { + listPushBackTest10(link2, link, arg.Data[i]) + } + aux := len(arg.Data) - 1 + + index = z01.RandIntBetween(0, aux) + if link.Head != nil && link2.Head != nil { + cho := arg.Data[index] + student.ListRemoveIf(link2, cho) + solution.ListRemoveIf(link, cho) + comparFuncList10(link, link2, t, cho) + } else { + student.ListRemoveIf(link2, 1) + solution.ListRemoveIf(link, 1) + comparFuncList10(link, link2, t, 1) + } + + link = &List10{} + link2 = &ListS10{} + } +} diff --git a/tests/go/listreverse_test.go b/tests/go/listreverse_test.go new file mode 100644 index 00000000..16967ae1 --- /dev/null +++ b/tests/go/listreverse_test.go @@ -0,0 +1,91 @@ +package student_test + +import ( + "strconv" + "testing" + + solution "./solutions" + student "./student" +) + +type Node6 = student.NodeL +type List6 = solution.List +type NodeS6 = solution.NodeL +type ListS6 = student.List + +func listToStringStu13(l *ListS6) string { + var res string + it := l.Head + for it != nil { + switch it.Data.(type) { + case int: + res += strconv.Itoa(it.Data.(int)) + "-> " + case string: + res += it.Data.(string) + "-> " + } + it = it.Next + } + res += "" + return res +} + +func comparFuncList6(l *List6, l1 *ListS6, t *testing.T) { + for l.Head != nil || l1.Head != nil { + if (l.Head == nil && l1.Head != nil) || (l.Head != nil && l1.Head == nil) { + t.Errorf("\nstudent list:%s\nlist:%s\n\nListReverse() == %v instead of %v\n\n", + listToStringStu13(l1), solution.ListToString(l.Head), l1.Head, l.Head) + return + } else if l.Head.Data != l1.Head.Data { + t.Errorf("\nstudent list:%s\nlist:%s\n\nListReverse() == %v instead of %v\n\n", + listToStringStu13(l1), solution.ListToString(l.Head), l1.Head.Data, l.Head.Data) + return + } + l.Head = l.Head.Next + l1.Head = l1.Head.Next + } +} +func listPushBackTest6(l *ListS6, l1 *List6, data interface{}) { + n := &Node6{Data: data} + n1 := &NodeS6{Data: data} + if l.Head == nil { + l.Head = n + } else { + iterator := l.Head + for iterator.Next != nil { + iterator = iterator.Next + } + iterator.Next = n + } + if l1.Head == nil { + l1.Head = n1 + } else { + iterator1 := l1.Head + for iterator1.Next != nil { + iterator1 = iterator1.Next + } + iterator1.Next = n1 + } +} + +// exercise 8 +func TestListReverse(t *testing.T) { + link := &List6{} + link2 := &ListS6{} + table := []solution.NodeTest{} + table = solution.ElementsToTest(table) + table = append(table, + solution.NodeTest{ + Data: []interface{}{"I", 1, "something", 2}, + }, + ) + for _, arg := range table { + for i := 0; i < len(arg.Data); i++ { + listPushBackTest6(link2, link, arg.Data[i]) + } + student.ListReverse(link2) + solution.ListReverse(link) + comparFuncList6(link, link2, t) + link = &List6{} + link2 = &ListS6{} + } +} diff --git a/tests/go/listsize_test.go b/tests/go/listsize_test.go new file mode 100644 index 00000000..1550edda --- /dev/null +++ b/tests/go/listsize_test.go @@ -0,0 +1,62 @@ +package student_test + +import ( + "testing" + + solution "./solutions" + student "./student" +) + +type Node2 = student.NodeL +type List2 = solution.List +type NodeS2 = solution.NodeL +type ListS2 = student.List + +func listPushBackTest2(l *ListS2, l1 *List2, data interface{}) { + n := &Node2{Data: data} + n1 := &NodeS2{Data: data} + if l.Head == nil { + l.Head = n + } else { + iterator := l.Head + for iterator.Next != nil { + iterator = iterator.Next + } + iterator.Next = n + } + + if l1.Head == nil { + l1.Head = n1 + } else { + iterator1 := l1.Head + for iterator1.Next != nil { + iterator1 = iterator1.Next + } + iterator1.Next = n1 + } +} + +//exercise 4 +func TestListSize(t *testing.T) { + link := &List2{} + link2 := &ListS2{} + table := []solution.NodeTest{} + table = solution.ElementsToTest(table) + table = append(table, + solution.NodeTest{ + Data: []interface{}{"Hello", "man", "how are you"}, + }, + ) + for _, arg := range table { + for i := 0; i < len(arg.Data); i++ { + listPushBackTest2(link2, link, arg.Data[i]) + } + aux := solution.ListSize(link) + aux2 := student.ListSize(link2) + if aux != aux2 { + t.Errorf("ListSize(%v) == %d instead of %d\n", solution.ListToString(link.Head), aux2, aux) + } + link = &List2{} + link2 = &ListS2{} + } +} diff --git a/tests/go/listsort_test.go b/tests/go/listsort_test.go new file mode 100644 index 00000000..c309e45f --- /dev/null +++ b/tests/go/listsort_test.go @@ -0,0 +1,106 @@ +package student_test + +import ( + "strconv" + "testing" + + solution "./solutions" + student "./student" + "github.com/01-edu/z01" +) + +type NodeI12 = student.NodeI +type NodeIS12 = solution.NodeI + +func printListStudent(n *NodeI12) string { + var res string + it := n + for it != nil { + res += strconv.Itoa(it.Data) + "-> " + it = it.Next + } + res += "" + return res +} + +func nodePushBackListInt12(l *NodeI12, l1 *NodeIS12, data int) { + n := &NodeI12{Data: data} + n1 := &NodeIS12{Data: data} + + if l == nil { + l = n + } else { + iterator := l + for iterator.Next != nil { + iterator = iterator.Next + } + iterator.Next = n + } + + if l1 == nil { + l1 = n1 + } else { + iterator1 := l1 + for iterator1.Next != nil { + iterator1 = iterator1.Next + } + iterator1.Next = n1 + } +} + +func comparFuncNodeInt12(l *NodeI12, l1 *NodeIS12, t *testing.T) { + for l != nil || l1 != nil { + if (l == nil && l1 != nil) || (l != nil && l1 == nil) { + t.Errorf("\nstudent list:%s\nlist:%s\n\nListSort() == %v instead of %v\n\n", + printListStudent(l), solution.PrintList(l1), l, l1) + return + } else if l.Data != l1.Data { + t.Errorf("\nstudent list:%s\nlist:%s\n\nListSort() == %v instead of %v\n\n", + printListStudent(l), solution.PrintList(l1), l.Data, l1.Data) + return + } + l = l.Next + l1 = l1.Next + } +} + +//exercise 15 +func TestListSort(t *testing.T) { + var link *NodeI12 + var link2 *NodeIS12 + + type nodeTest struct { + data []int + } + table := []nodeTest{} + + table = append(table, + nodeTest{ + data: []int{}, + }) + //just numbers/ints + for i := 0; i < 2; i++ { + val := nodeTest{ + data: z01.MultRandInt(), + } + table = append(table, val) + } + + table = append(table, + nodeTest{ + data: []int{5, 4, 3, 2, 1}, + }, + ) + for _, arg := range table { + for i := 0; i < len(arg.data); i++ { + nodePushBackListInt12(link, link2, arg.data[i]) + } + aux := solution.ListSort(link2) + aux2 := student.ListSort(link) + + comparFuncNodeInt12(aux2, aux, t) + + link = &NodeI12{} + link2 = &NodeIS12{} + } +} diff --git a/tests/go/makerange_test.go b/tests/go/makerange_test.go new file mode 100644 index 00000000..c9790085 --- /dev/null +++ b/tests/go/makerange_test.go @@ -0,0 +1,50 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestMakeRange(t *testing.T) { + type node struct { + min int + max int + } + + table := []node{} + + // 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{ + min: minVal, + max: minVal + gap, + } + table = append(table, val) + } + // 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{ + min: minVal, + max: minVal - gap, + } + table = append(table, val) + } + + table = append(table, + node{min: 0, max: 1}, + node{min: 0, max: 0}, + node{min: 5, max: 10}, + node{min: 10, max: 5}, + ) + for _, arg := range table { + z01.Challenge(t, student.MakeRange, solutions.MakeRange, arg.min, arg.max) + } +} diff --git a/tests/go/map_test.go b/tests/go/map_test.go new file mode 100644 index 00000000..7adb5963 --- /dev/null +++ b/tests/go/map_test.go @@ -0,0 +1,41 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestMap(t *testing.T) { + functionsArray := []func(int) bool{solutions.IsPositive, solutions.IsNegative0, solutions.IsPrime} + + type node struct { + f func(int) bool + arr []int + } + + 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{ + f: solutions.IsPrime, + arr: []int{1, 2, 3, 4, 5, 6}, + }) + + for _, arg := range table { + z01.Challenge(t, student.Map, solutions.Map, arg.f, arg.arr) + } +} diff --git a/tests/go/max_test.go b/tests/go/max_test.go new file mode 100644 index 00000000..61070a03 --- /dev/null +++ b/tests/go/max_test.go @@ -0,0 +1,18 @@ +package student_test + +import ( + solutions "./solutions" + student "./student" + "github.com/01-edu/z01" + "testing" +) + +func TestMax(t *testing.T) { + args := []int{z01.RandInt()} + limit := z01.RandIntBetween(20, 50) + for i := 0; i < limit; i++ { + args = append(args, z01.RandInt()) + } + + z01.Challenge(t, student.Max, solutions.Max, args) +} diff --git a/tests/go/nbrconvertalpha_test.go b/tests/go/nbrconvertalpha_test.go new file mode 100644 index 00000000..3b6f4192 --- /dev/null +++ b/tests/go/nbrconvertalpha_test.go @@ -0,0 +1,47 @@ +package student_test + +import ( + "strconv" + "strings" + "testing" + + "github.com/01-edu/z01" +) + +func TestNbrConvertAlpha(t *testing.T) { + + type node struct { + array []string + } + + table := []node{} + for i := 0; i < 5; i++ { + m := z01.MultRandIntBetween(1, 46) + s := "" + str := []string{} + for _, j := range m { + s += strconv.Itoa(j) + " " + } + str = append(str, s) + v := node{ + array: str, + } + table = append(table, v) + } + + table = append(table, node{ + array: []string{ + "--upper 8 5 25", + "8 5 12 12 15", + "12 5 7 5 14 56 4 1 18 25", + "12 5 7 5 14 56 4 1 18 25 32 86 h", + "32 86 h", + ""}, + }) + + for _, i := range table { + for _, a := range i.array { + z01.ChallengeMain(t, strings.Fields((a))...) + } + } +} diff --git a/tests/go/nrune_test.go b/tests/go/nrune_test.go new file mode 100644 index 00000000..caa4d87e --- /dev/null +++ b/tests/go/nrune_test.go @@ -0,0 +1,45 @@ +package student_test + +import ( + "math/rand" + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestNRune(t *testing.T) { + type node struct { + word string + n int + } + + table := []node{} + + for i := 0; i < 30; i++ { + wordToInput := z01.RandASCII() + val := node{ + word: wordToInput, + n: rand.Intn(len(wordToInput)) + 1, + } + table = append(table, val) + } + + table = append(table, + node{word: "Hello!", n: 3}, + node{word: "Salut!", n: 2}, + node{word: "Ola!", n: 4}, + node{word: "♥01!", n: 1}, + node{word: "Not", n: 6}, + node{word: "Also not", n: 9}, + node{word: "Tree house", n: 5}, + node{word: "Whatever", n: 0}, + node{word: "Whatshisname", n: -2}, + ) + + for _, arg := range table { + z01.Challenge(t, student.NRune, solutions.NRune, arg.word, arg.n) + } +} diff --git a/tests/go/paramcount_test.go b/tests/go/paramcount_test.go new file mode 100644 index 00000000..4a5a8d2e --- /dev/null +++ b/tests/go/paramcount_test.go @@ -0,0 +1,36 @@ +package student_test + +import ( + "strconv" + "testing" + + "github.com/01-edu/z01" +) + +func TestParamCount(t *testing.T) { + arg1 := []string{"2", "5", "u", "19"} + arg2 := []string{"2"} + arg3 := []string{"1", "2", "3", "5", "7", "24"} + arg4 := []string{"6", "12", "24"} + + args := [][]string{arg1, arg2, arg3, arg4} + + for i := 0; i < 10; i++ { + var arg []string + init := z01.RandIntBetween(0, 10) + for i := init; i < init+z01.RandIntBetween(5, 10); i++ { + arg = append(arg, strconv.Itoa(i)) + } + args = append(args, arg) + } + + for i := 0; i < 1; i++ { + args = append(args, z01.MultRandWords()) + } + + for _, v := range args { + z01.ChallengeMain(t, v...) + } + + z01.ChallengeMain(t) +} diff --git a/tests/go/pilot_test.go b/tests/go/pilot_test.go new file mode 100644 index 00000000..9afd696f --- /dev/null +++ b/tests/go/pilot_test.go @@ -0,0 +1,10 @@ +package student_test + +import ( + "github.com/01-edu/z01" + "testing" +) + +func TestPilot(t *testing.T) { + z01.ChallengeMain(t) +} diff --git a/tests/go/point_test.go b/tests/go/point_test.go new file mode 100644 index 00000000..27b8bc75 --- /dev/null +++ b/tests/go/point_test.go @@ -0,0 +1,11 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestPoint(t *testing.T) { + z01.ChallengeMain(t, "") +} diff --git a/tests/go/pointone_test.go b/tests/go/pointone_test.go new file mode 100644 index 00000000..25f6800a --- /dev/null +++ b/tests/go/pointone_test.go @@ -0,0 +1,15 @@ +package student_test + +import ( + "testing" + + student "./student" +) + +func TestPointOne(t *testing.T) { + n := 0 + student.PointOne(&n) + if n != 1 { + t.Errorf("PointOne(&n), n == %d instead of 1", n) + } +} diff --git a/tests/go/printalphabet_test.go b/tests/go/printalphabet_test.go new file mode 100644 index 00000000..6e5dab69 --- /dev/null +++ b/tests/go/printalphabet_test.go @@ -0,0 +1,10 @@ +package student_test + +import ( + "github.com/01-edu/z01" + "testing" +) + +func TestPrintAlphabet(t *testing.T) { + z01.ChallengeMain(t) +} diff --git a/tests/go/printcomb2_test.go b/tests/go/printcomb2_test.go new file mode 100644 index 00000000..e14cf427 --- /dev/null +++ b/tests/go/printcomb2_test.go @@ -0,0 +1,14 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestPrintComb2(t *testing.T) { + z01.Challenge(t, student.PrintComb2, solutions.PrintComb2) +} diff --git a/tests/go/printcomb_test.go b/tests/go/printcomb_test.go new file mode 100644 index 00000000..0d0c5c6a --- /dev/null +++ b/tests/go/printcomb_test.go @@ -0,0 +1,14 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestPrintComb(t *testing.T) { + z01.Challenge(t, student.PrintComb, solutions.PrintComb) +} diff --git a/tests/go/printcombn_test.go b/tests/go/printcombn_test.go new file mode 100644 index 00000000..1cea9add --- /dev/null +++ b/tests/go/printcombn_test.go @@ -0,0 +1,17 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestPrintCombN(t *testing.T) { + table := []int{1, 2, 3, 4, 5, 6, 7, 8, 9} + for _, arg := range table { + z01.Challenge(t, student.PrintCombN, solutions.PrintCombN, arg) + } +} diff --git a/tests/go/printdigits_test.go b/tests/go/printdigits_test.go new file mode 100644 index 00000000..dcca6acd --- /dev/null +++ b/tests/go/printdigits_test.go @@ -0,0 +1,10 @@ +package student_test + +import ( + "github.com/01-edu/z01" + "testing" +) + +func TestPrintDigits(t *testing.T) { + z01.ChallengeMain(t) +} diff --git a/tests/go/printnbr_test.go b/tests/go/printnbr_test.go new file mode 100644 index 00000000..4d97e897 --- /dev/null +++ b/tests/go/printnbr_test.go @@ -0,0 +1,22 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestPrintNbr(t *testing.T) { + table := append( + z01.MultRandInt(), + z01.MinInt, + z01.MaxInt, + 0, + ) + for _, arg := range table { + z01.Challenge(t, student.PrintNbr, solutions.PrintNbr, arg) + } +} diff --git a/tests/go/printnbrbase_test.go b/tests/go/printnbrbase_test.go new file mode 100644 index 00000000..32715d34 --- /dev/null +++ b/tests/go/printnbrbase_test.go @@ -0,0 +1,51 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestPrintNbrBase(t *testing.T) { + type node struct { + n int + base string + } + + table := []node{} + + // 15 random pairs of ints with valid bases + for i := 0; i < 15; i++ { + validBaseToInput := solutions.RandomValidBase() + val := node{ + n: z01.RandIntBetween(-1000000, 1000000), + base: validBaseToInput, + } + table = append(table, val) + } + + // 15 random pairs of ints with invalid bases + for i := 0; i < 15; i++ { + invalidBaseToInput := solutions.RandomInvalidBase() + val := node{ + n: z01.RandIntBetween(-1000000, 1000000), + base: invalidBaseToInput, + } + table = append(table, val) + } + + table = append(table, + node{n: 125, base: "0123456789"}, + node{n: -125, base: "01"}, + node{n: 125, base: "0123456789ABCDEF"}, + node{n: -125, base: "choumi"}, + node{n: 125, base: "-ab"}, + node{n: z01.MinInt, base: "0123456789"}, + ) + for _, arg := range table { + z01.Challenge(t, student.PrintNbrBase, solutions.PrintNbrBase, arg.n, arg.base) + } +} diff --git a/tests/go/printnbrinorder_test.go b/tests/go/printnbrinorder_test.go new file mode 100644 index 00000000..e05fdfbc --- /dev/null +++ b/tests/go/printnbrinorder_test.go @@ -0,0 +1,23 @@ +package student_test + +import ( + "testing" + + solutions "./solutions" + student "./student" + "github.com/01-edu/z01" +) + +func TestPrintNbrInOrder(t *testing.T) { + table := append( + z01.MultRandIntBetween(0, z01.MaxInt), + z01.MaxInt, + 321, + 321321, + 0, + ) + for _, arg := range table { + z01.Challenge(t, student.PrintNbrInOrder, solutions.PrintNbrInOrder, arg) + } + +} diff --git a/tests/go/printparams_test.go b/tests/go/printparams_test.go new file mode 100644 index 00000000..4f1e8492 --- /dev/null +++ b/tests/go/printparams_test.go @@ -0,0 +1,15 @@ +package student_test + +import ( + "strings" + "testing" + + "github.com/01-edu/z01" +) + +func TestPrintParams(t *testing.T) { + table := append(z01.MultRandWords(), "choumi is the best cat") + for _, s := range table { + z01.ChallengeMain(t, strings.Fields(s)...) + } +} diff --git a/tests/go/printprogramname_test.go b/tests/go/printprogramname_test.go new file mode 100644 index 00000000..7e10bd5c --- /dev/null +++ b/tests/go/printprogramname_test.go @@ -0,0 +1,29 @@ +package student_test + +import ( + "github.com/01-edu/z01" + "strings" + "testing" +) + +func TestPrintProgramName(t *testing.T) { + exercise := strings.ToLower( + strings.TrimPrefix(t.Name(), "Test")) + out, err1 := z01.MainOut("./student/printprogramname") + if err1 != nil { + t.Errorf(err1.Error()) + } + + correct, err2 := z01.MainOut("./solutions/printprogramname") + + if err2 != nil { + t.Errorf(err2.Error()) + } + + arrOut := strings.Split(out, "/") + ArrCor := strings.Split(correct, "/") + if ArrCor[len(ArrCor)-1] != arrOut[len(arrOut)-1] { + t.Errorf("./%s prints %q instead of %q\n", + exercise, arrOut[len(arrOut)-1], ArrCor[len(ArrCor)-1]) + } +} diff --git a/tests/go/printreversealphabet_test.go b/tests/go/printreversealphabet_test.go new file mode 100644 index 00000000..1c085ddc --- /dev/null +++ b/tests/go/printreversealphabet_test.go @@ -0,0 +1,10 @@ +package student_test + +import ( + "github.com/01-edu/z01" + "testing" +) + +func TestPrintReverseAlphabet(t *testing.T) { + z01.ChallengeMain(t) +} diff --git a/tests/go/printstr_test.go b/tests/go/printstr_test.go new file mode 100644 index 00000000..f4e253cd --- /dev/null +++ b/tests/go/printstr_test.go @@ -0,0 +1,18 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestPrintStr(t *testing.T) { + table := z01.MultRandASCII() + table = append(table, "Hello World!") + for _, arg := range table { + z01.Challenge(t, student.PrintStr, solutions.PrintStr, arg) + } +} diff --git a/tests/go/printwordstables_test.go b/tests/go/printwordstables_test.go new file mode 100644 index 00000000..9dc6ce7b --- /dev/null +++ b/tests/go/printwordstables_test.go @@ -0,0 +1,30 @@ +package student_test + +import ( + "strings" + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +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) + } + + table = append(table, + []string{"Hello", "how", "are", "you?"}) + + for _, arg := range table { + z01.Challenge(t, student.PrintWordsTables, solutions.PrintWordsTables, arg) + } +} diff --git a/tests/go/raid1a_test.go b/tests/go/raid1a_test.go new file mode 100644 index 00000000..65c3dfd5 --- /dev/null +++ b/tests/go/raid1a_test.go @@ -0,0 +1,35 @@ +package student_test + +import ( + "testing" + + solutions "./solutions" + student "./student" + "github.com/01-edu/z01" +) + +func TestRaid1a(t *testing.T) { + + // testing examples of subjects + table := []int{ + 5, 3, + 5, 1, + 1, 1, + 1, 5, + } + + // testing special cases and one valid random case. + table = append(table, + 0, 0, + -1, 6, + 6, -1, + z01.RandIntBetween(1, 20), z01.RandIntBetween(1, 20), + ) + + //Tests all possibilities including 0 0, -x y, x -y + for i := 0; i < len(table); i = i + 2 { + if i != len(table)-1 { + z01.Challenge(t, solutions.Raid1a, student.Raid1a, table[i], table[i+1]) + } + } +} diff --git a/tests/go/raid1b_test.go b/tests/go/raid1b_test.go new file mode 100644 index 00000000..17915075 --- /dev/null +++ b/tests/go/raid1b_test.go @@ -0,0 +1,34 @@ +package student_test + +import ( + "testing" + + solutions "./solutions" + student "./student" + "github.com/01-edu/z01" +) + +func TestRaid1b(t *testing.T) { + // testing examples of subjects + table := []int{ + 5, 3, + 5, 1, + 1, 1, + 1, 5, + } + + // testing special cases and one valid random case. + table = append(table, + 0, 0, + -1, 6, + 6, -1, + z01.RandIntBetween(1, 20), z01.RandIntBetween(1, 20), + ) + + //Tests all possibilities including 0 0, -x y, x -y + for i := 0; i < len(table); i = i + 2 { + if i != len(table)-1 { + z01.Challenge(t, solutions.Raid1b, student.Raid1b, table[i], table[i+1]) + } + } +} diff --git a/tests/go/raid1c_test.go b/tests/go/raid1c_test.go new file mode 100644 index 00000000..c55fcd98 --- /dev/null +++ b/tests/go/raid1c_test.go @@ -0,0 +1,34 @@ +package student_test + +import ( + "testing" + + solutions "./solutions" + student "./student" + "github.com/01-edu/z01" +) + +func TestRaid1c(t *testing.T) { + // testing examples of subjects + table := []int{ + 5, 3, + 5, 1, + 1, 1, + 1, 5, + } + + // testing special cases and one valid random case. + table = append(table, + 0, 0, + -1, 6, + 6, -1, + z01.RandIntBetween(1, 20), z01.RandIntBetween(1, 20), + ) + + //Tests all possibilities including 0 0, -x y, x -y + for i := 0; i < len(table); i = i + 2 { + if i != len(table)-1 { + z01.Challenge(t, solutions.Raid1c, student.Raid1c, table[i], table[i+1]) + } + } +} diff --git a/tests/go/raid1d_test.go b/tests/go/raid1d_test.go new file mode 100644 index 00000000..4b3d60fd --- /dev/null +++ b/tests/go/raid1d_test.go @@ -0,0 +1,34 @@ +package student_test + +import ( + "testing" + + solutions "./solutions" + student "./student" + "github.com/01-edu/z01" +) + +func TestRaid1d(t *testing.T) { + // testing examples of subjects + table := []int{ + 5, 3, + 5, 1, + 1, 1, + 1, 5, + } + + // testing special cases and one valid random case. + table = append(table, + 0, 0, + -1, 6, + 6, -1, + z01.RandIntBetween(1, 20), z01.RandIntBetween(1, 20), + ) + + //Tests all possibilities including 0 0, -x y, x -y + for i := 0; i < len(table); i = i + 2 { + if i != len(table)-1 { + z01.Challenge(t, solutions.Raid1d, student.Raid1d, table[i], table[i+1]) + } + } +} diff --git a/tests/go/raid1e_test.go b/tests/go/raid1e_test.go new file mode 100644 index 00000000..4cc6ae3a --- /dev/null +++ b/tests/go/raid1e_test.go @@ -0,0 +1,34 @@ +package student_test + +import ( + "testing" + + solutions "./solutions" + student "./student" + "github.com/01-edu/z01" +) + +func TestRaid1e(t *testing.T) { + // testing examples of subjects + table := []int{ + 5, 3, + 5, 1, + 1, 1, + 1, 5, + } + + // testing special cases and one valid random case. + table = append(table, + 0, 0, + -1, 6, + 6, -1, + z01.RandIntBetween(1, 20), z01.RandIntBetween(1, 20), + ) + + //Tests all possibilities including 0 0, -x y, x -y + for i := 0; i < len(table); i = i + 2 { + if i != len(table)-1 { + z01.Challenge(t, solutions.Raid1e, student.Raid1e, table[i], table[i+1]) + } + } +} diff --git a/tests/go/raid2_test.go b/tests/go/raid2_test.go new file mode 100644 index 00000000..575639bf --- /dev/null +++ b/tests/go/raid2_test.go @@ -0,0 +1,212 @@ +package student_test + +import ( + "github.com/01-edu/z01" + "testing" +) + +func TestRaid2(t *testing.T) { + // Valid sudokus + arg1 := []string{".96.4...1", "1...6...4", "5.481.39.", + "..795..43", ".3..8....", "4.5.23.18", + ".1.63..59", ".59.7.83.", "..359...7", + } + /* + "3 9 6 2 4 5 7 8 1", + "1 7 8 3 6 9 5 2 4", + "5 2 4 8 1 7 3 9 6", + "2 8 7 9 5 1 6 4 3", + "9 3 1 4 8 6 2 7 5", + "4 6 5 7 2 3 9 1 8", + "7 1 2 6 3 8 4 5 9", + "6 5 9 1 7 4 8 3 2", + "8 4 3 5 9 2 1 6 7" + */ + arg2 := []string{"1.58.2...", ".9..764.5", "2..4..819", + ".19..73.6", "762.83.9.", "....61.5.", + "..76...3.", "43..2.5.1", "6..3.89..", + } + /* + 1 4 5 8 9 2 6 7 3 + 8 9 3 1 7 6 4 2 5 + 2 7 6 4 3 5 8 1 9 + 5 1 9 2 4 7 3 8 6 + 7 6 2 5 8 3 1 9 4 + 3 8 4 9 6 1 7 5 2 + 9 5 7 6 1 4 2 3 8 + 4 3 8 7 2 9 5 6 1 + 6 2 1 3 5 8 9 4 7 + */ + arg3 := []string{"..5.3..81", "9.285..6.", "6....4.5.", + "..74.283.", "34976...5", "..83..49.", + "15..87..2", ".9....6..", ".26.495.3", + } + /* + 4 7 5 9 3 6 2 8 1 + 9 3 2 8 5 1 7 6 4 + 6 8 1 2 7 4 3 5 9 + 5 1 7 4 9 2 8 3 6 + 3 4 9 7 6 8 1 2 5 + 2 6 8 3 1 5 4 9 7 + 1 5 3 6 8 7 9 4 2 + 7 9 4 5 2 3 6 1 8 + 8 2 6 1 4 9 5 7 3 + */ + arg4 := []string{"34.91..2.", ".96.8..41", "..8.2..7.", + ".6..57.39", "1.2.6.7..", "97..3..64", + "45.2.8..6", ".8..9..5.", "6.3..189.", + } + /* + 3 4 7 9 1 5 6 2 8 + 2 9 6 7 8 3 5 4 1 + 5 1 8 6 2 4 9 7 3 + 8 6 4 1 5 7 2 3 9 + 1 3 2 4 6 9 7 8 5 + 9 7 5 8 3 2 1 6 4 + 4 5 9 2 7 8 3 1 6 + 7 8 1 3 9 6 4 5 2 + 6 2 3 5 4 1 8 9 7 + */ + arg5 := []string{"..73..4.5", "....2.9..", "253.6487.", + ".9.74.36.", "....3..8.", "8362.9.47", + "1..8.26.3", "6......18", ".8261...4", + } + /*"..73..4.5","....2.9..","253.6487.",".9.74.36.","....3..8.","8362.9.47","1..8.26.3","6......18",".8261...4", + 9 6 7 3 8 1 4 2 5 + 4 1 8 5 2 7 9 3 6 + 2 5 3 9 6 4 8 7 1 + 5 9 1 7 4 8 3 6 2 + 7 2 4 1 3 6 5 8 9 + 8 3 6 2 5 9 1 4 7 + 1 4 9 8 7 2 6 5 3 + 6 7 5 4 9 3 2 1 8 + 3 8 2 6 1 5 7 9 4 + + */ + arg6 := []string{"935..7..8", "...3.8.7.", "6..5..49.", + ".73..4...", "4..175.8.", ".618..247", + ".187.....", "..6.8.75.", "75.4.3862", + } + /* + 9 3 5 6 4 7 1 2 8 + 1 2 4 3 9 8 6 7 5 + 6 8 7 5 2 1 4 9 3 + 8 7 3 2 6 4 5 1 9 + 4 9 2 1 7 5 3 8 6 + 5 6 1 8 3 9 2 4 7 + 2 1 8 7 5 6 9 3 4 + 3 4 6 9 8 2 7 5 1 + 7 5 9 4 1 3 8 6 2 + */ + arg7 := []string{"..5.2...1", ".8735..46", "4...6.5..", + ".5.9.....", ".7..3541.", "69314.857", + "7415..6.8", "...284..5", "5.....3.4", + } + /* + 3 6 5 4 2 9 7 8 1 + 2 8 7 3 5 1 9 4 6 + 4 1 9 8 6 7 5 3 2 + 1 5 4 9 7 8 2 6 3 + 8 7 2 6 3 5 4 1 9 + 6 9 3 1 4 2 8 5 7 + 7 4 1 5 9 3 6 2 8 + 9 3 6 2 8 4 1 7 5 + 5 2 8 7 1 6 3 9 4 + */ + arg8 := []string{"..75...3.", "8..23...9", ".3479.86.", + "..3..4198", ".4815...3", "..6.23..7", + "351.6.78.", "4..31...6", ".7...5..2", + } + /* + 9 6 7 5 4 8 2 3 1 + 8 1 5 2 3 6 4 7 9 + 2 3 4 7 9 1 8 6 5 + 5 2 3 6 7 4 1 9 8 + 7 4 8 1 5 9 6 2 3 + 1 9 6 8 2 3 5 4 7 + 3 5 1 9 6 2 7 8 4 + 4 8 2 3 1 7 9 5 6 + 6 7 9 4 8 5 3 1 2 + */ + arg9 := []string{".58..4.21", ".6.853..7", ".39.2...5", + "8....1..6", "..37..21.", "1.6.825..", + "67.2..18.", "9..4...5.", ".8.9167.2", + } + + /* + 7 5 8 6 9 4 3 2 1 + 2 6 1 8 5 3 4 9 7 + 4 3 9 1 2 7 8 6 5 + 8 2 7 5 4 1 9 3 6 + 5 4 3 7 6 9 2 1 8 + 1 9 6 3 8 2 5 7 4 + 6 7 4 2 3 5 1 8 9 + 9 1 2 4 7 8 6 5 3 + 3 8 5 9 1 6 7 4 2 + */ + arg10 := []string{".2.1....6", "53..8294.", "8..34...5", + "3542761..", "..6.3...4", "9....162.", + ".9...3.78", "7438.9...", "..5..43.1", + } + /* + 4 2 7 1 9 5 8 3 6 + 5 3 1 6 8 2 9 4 7 + 8 6 9 3 4 7 2 1 5 + 3 5 4 2 7 6 1 8 9 + 2 1 6 9 3 8 7 5 4 + 9 7 8 4 5 1 6 2 3 + 1 9 2 5 6 3 4 7 8 + 7 4 3 8 1 9 5 6 2 + 6 8 5 7 2 4 3 9 1 + */ + valid := [][]string{arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10} + + // Invalid sudokus + + argin1 := []string{".932..8.", "27.3.85..", ".8.73.254", + "9758...31", "....74.6.", "6.45.38.7", + "7....2.48", "32.4...7.", "..8.579..", + } + argin2 := []string{".867.2..4", ".2.5..8..", "154.9.237", + ".7.9.5..1", ".29..4.18", "51.6...42", + "2.5.7..83", "...153...", "39...8.75", + } + + /* + . . 7 3 . . 4 . 5 + . . . . 2 . 9 . . + 2 5 3 . 6 4 8 7 . + . 9 . 7 4 . 3 6 . + . . . . 3 . . 8 . + 8 3 6 2 . 9 . 4 7 + 1 . . 8 . 2 6 . 3 + 6 . . . . . . 1 8 + . 8 2 6 1 . . . 4 + */ + argin3 := []string{".7....28.", ".2...6.57", "8654729..", + "..925..64", ".4..19.7.", "7.8..4..9", + "3..7..698", "..79.1...", "59..28.39", + } + argin4 := []string{"..213.748", "8.4.....2", ".178.26..", + ".68.9.27.", ".932....4", "5..46.3..", + "..9.24.23", "..63..19.", "385..1.2.", + } + argin5 := []string{"9.46.3..1", "37.1..2.6", "..6..93.4", + "..13..9.5", "56..91...", "82...461.", + "..79...4.", "425.167..", "1.2..75.8", + } + invalid := [][]string{argin1, argin2, argin3, argin4, argin5} + + for _, v := range valid { + z01.ChallengeMain(t, v...) + } + + for _, i := range invalid { + z01.ChallengeMain(t, i...) + } + + // No arguments + z01.ChallengeMain(t) + // Wrong number of arguments + z01.ChallengeMain(t, "not", "a", "sudoku") +} diff --git a/tests/go/raid3_test.go b/tests/go/raid3_test.go new file mode 100644 index 00000000..d54d1b7f --- /dev/null +++ b/tests/go/raid3_test.go @@ -0,0 +1,101 @@ +package student_test + +import ( + "os" + "path" + "strconv" + "strings" + "testing" + + "github.com/01-edu/z01" +) + +// builds all the files for testing, student, solution and relevant files +func mainOut(name string) (out string, err error) { + names := []string{"main.go", "/raid1aProg/raid1a.go", "/raid1bProg/raid1b.go", "/raid1cProg/raid1c.go", "/raid1dProg/raid1d.go", "/raid1eProg/raid1e.go"} + var pathRaid1 string + + for i := 0; i < len(names); i++ { + pathRaid1 = path.Join(name, names[i]) + if strings.Contains(pathRaid1, "main.go") { + _, err = z01.ExecOut("go", "build", "-o", "raid3", pathRaid1) + if err != nil { + return "", err + } + } else { + _, err = z01.ExecOut("go", "build", pathRaid1) + } + } + if err != nil { + return "", err + } + return +} + +func chall(t *testing.T) { + _, err := mainOut("./solutions/raid3") + if err != nil { + t.Error(err) + } + _, err = z01.ExecOut("go", "build", "-o", "raid3_student", "./student/raid3/main.go") +} + +// executes the test and compares student with solutions +func executeTest(t *testing.T, args string, x, y int) { + var output, correct string + var err error + + if x == 0 && y == 0 { + output, err = z01.ExecOut("sh", "-c", args+" | ./raid3_student") + if err != nil { + t.Error(err) + } + correct, err = z01.ExecOut("sh", "-c", args+" | ./raid3") + if err != nil { + t.Error(err) + } + } else { + output, err = z01.ExecOut("sh", "-c", "./"+args+" "+strconv.Itoa(x)+" "+strconv.Itoa(y)+" | ./raid3_student") + if err != nil { + t.Error(err) + } + correct, err = z01.ExecOut("sh", "-c", "./"+args+" "+strconv.Itoa(x)+" "+strconv.Itoa(y)+" | ./raid3") + if err != nil { + t.Error(err) + } + } + if output != correct { + t.Errorf("./%s %d %d | ./raid3 prints %q instead of %q\n", + args, x, y, output, correct) + } +} + +func TestRaid3(t *testing.T) { + table := []string{"raid1a", "raid1b", "raid1c", "raid1d", "raid1e"} + chall(t) + // testing all raids1 + for _, s := range table { + x := z01.RandIntBetween(1, 50) + y := z01.RandIntBetween(1, 50) + executeTest(t, s, x, y) + } + + // testing special case AA, AC, A, A + // A C + executeTest(t, "raid1e", 2, 1) + executeTest(t, "raid1c", 2, 1) + executeTest(t, "raid1d", 1, 2) + executeTest(t, "raid1e", 1, 2) + executeTest(t, "raid1e", 1, 1) + executeTest(t, "echo", 0, 0) + + // removing all binary files after finishing the tests + table = append(table, "raid3_student") + table = append(table, "raid3") + for _, v := range table { + err := os.Remove(v) + if err != nil { + t.Error(err) + } + } +} diff --git a/tests/go/rectangle_test.go b/tests/go/rectangle_test.go new file mode 100644 index 00000000..d574ab13 --- /dev/null +++ b/tests/go/rectangle_test.go @@ -0,0 +1,12 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestRectangle(t *testing.T) { + + z01.ChallengeMain(t, "") +} diff --git a/tests/go/recursivefactorial_test.go b/tests/go/recursivefactorial_test.go new file mode 100644 index 00000000..d3cfbc0b --- /dev/null +++ b/tests/go/recursivefactorial_test.go @@ -0,0 +1,24 @@ +package student_test + +import ( + "math/bits" + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestRecursiveFactorial(t *testing.T) { + table := append( + z01.MultRandInt(), + z01.IntRange(0, 12)..., + ) + if bits.UintSize == 64 { + table = append(table, z01.IntRange(13, 20)...) + } + for _, arg := range table { + z01.Challenge(t, student.RecursiveFactorial, solutions.RecursiveFactorial, arg) + } +} diff --git a/tests/go/recursivepower_test.go b/tests/go/recursivepower_test.go new file mode 100644 index 00000000..151e47b3 --- /dev/null +++ b/tests/go/recursivepower_test.go @@ -0,0 +1,22 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestRecursivePower(t *testing.T) { + i := 0 + for i < 30 { + nb := z01.RandIntBetween(-8, 8) + power := z01.RandIntBetween(-10, 10) + z01.Challenge(t, student.RecursivePower, solutions.RecursivePower, nb, power) + i++ + } + z01.Challenge(t, student.RecursivePower, solutions.RecursivePower, 0, 0) + z01.Challenge(t, student.RecursivePower, solutions.RecursivePower, 0, 1) +} diff --git a/tests/go/revparams_test.go b/tests/go/revparams_test.go new file mode 100644 index 00000000..5c7a3b08 --- /dev/null +++ b/tests/go/revparams_test.go @@ -0,0 +1,11 @@ +package student_test + +import ( + "github.com/01-edu/z01" + "testing" +) + +func TestRevParams(t *testing.T) { + args := []string{"choumi", "is", "the", "best", "cat"} + z01.ChallengeMain(t, args...) +} diff --git a/tests/go/rot14_test.go b/tests/go/rot14_test.go new file mode 100644 index 00000000..00409937 --- /dev/null +++ b/tests/go/rot14_test.go @@ -0,0 +1,30 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solution "./solutions" + student "./student" +) + +func TestRot14(t *testing.T) { + type nodeTest struct { + data []string + } + + table := []nodeTest{} + for i := 0; i < 5; i++ { + val := nodeTest{ + data: z01.MultRandWords(), + } + table = append(table, val) + } + + for _, arg := range table { + for _, s := range arg.data { + z01.Challenge(t, solution.Rot14, student.Rot14, s) + } + } +} diff --git a/tests/go/rotatevowels_test.go b/tests/go/rotatevowels_test.go new file mode 100644 index 00000000..a97dea5b --- /dev/null +++ b/tests/go/rotatevowels_test.go @@ -0,0 +1,32 @@ +package student_test + +import ( + "strings" + "testing" + + "github.com/01-edu/z01" +) + +func TestRotateVowels(t *testing.T) { + + Lower := z01.RuneRange('a', 'z') + Upper := z01.RuneRange('A', 'Z') + letters := Lower + Upper + " " + var arr []string + for i := 0; i < 10; i++ { + str := z01.RandStr(z01.RandIntBetween(2, 20), letters) + arr = append(arr, str) + } + arr = append(arr, "") + + for _, v := range arr { + z01.ChallengeMain(t, 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") + +} diff --git a/tests/go/solutions/abort.go b/tests/go/solutions/abort.go new file mode 100644 index 00000000..70bbeac8 --- /dev/null +++ b/tests/go/solutions/abort.go @@ -0,0 +1,12 @@ +package solutions + +import ( + "sort" +) + +//Receives 5 ints and returns the number in the middle +func Abort(a, b, c, d, e int) int { + arg := []int{a, b, c, d, e} + sort.Sort(sort.IntSlice(arg)) + return arg[2] +} diff --git a/tests/go/solutions/activebits.go b/tests/go/solutions/activebits.go new file mode 100644 index 00000000..bc1afa67 --- /dev/null +++ b/tests/go/solutions/activebits.go @@ -0,0 +1,12 @@ +package solutions + +//Function that return the number of active bits in the number passed as the argument +func ActiveBits(n int) uint { + total := 0 + for ; n > 1; n = n / 2 { + total += n % 2 + } + total += n + + return uint(total) +} diff --git a/tests/go/solutions/addlinkednumbers.go b/tests/go/solutions/addlinkednumbers.go new file mode 100644 index 00000000..22a8c3d5 --- /dev/null +++ b/tests/go/solutions/addlinkednumbers.go @@ -0,0 +1,36 @@ +package solutions + +type NodeAddL struct { + Next *NodeAddL + Num int +} + +func pushFront(node *NodeAddL, num int) *NodeAddL { + tmp := &NodeAddL{Num: num} + if node == nil { + return tmp + } + tmp.Next = node + return tmp +} + +func AddLinkedNumbers(num1, num2 *NodeAddL) *NodeAddL { + var n1, n2, r int + var result *NodeAddL + + for tmp := num1; tmp != nil; tmp = tmp.Next { + n1 = n1*10 + tmp.Num + } + + for tmp := num2; tmp != nil; tmp = tmp.Next { + n2 = n2*10 + tmp.Num + } + + r = n1 + n2 + for r > 0 { + mod := r % 10 + r /= 10 + result = pushFront(result, mod) + } + return result +} diff --git a/tests/go/solutions/addlinkednumbers/addlinkednumbers_test.go b/tests/go/solutions/addlinkednumbers/addlinkednumbers_test.go new file mode 100644 index 00000000..f7c6e643 --- /dev/null +++ b/tests/go/solutions/addlinkednumbers/addlinkednumbers_test.go @@ -0,0 +1,133 @@ +package main + +import ( + "strconv" + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" +) + +type stuNode = NodeAddL +type solNode = solutions.NodeAddL + +func stuPushFront(node *stuNode, num int) *stuNode { + tmp := &stuNode{Num: num} + tmp.Next = node + return tmp +} + +func stuNumToList(num int) *stuNode { + var res *stuNode + for num > 0 { + res = stuPushFront(res, num%10) + num /= 10 + } + return res +} + +func stuListToNum(node *stuNode) int { + var n int + + for tmp := node; tmp != nil; tmp = tmp.Next { + n = n*10 + tmp.Num + } + return n +} + +func solPushFront(node *solNode, num int) *solNode { + tmp := &solNode{Num: num} + tmp.Next = node + return tmp +} + +func solNumToList(num int) *solNode { + var res *solNode + for num > 0 { + res = solPushFront(res, num%10) + num /= 10 + } + return res +} + +func solListToNum(node *solNode) int { + var n int + + for tmp := node; tmp != nil; tmp = tmp.Next { + n = n*10 + tmp.Num + } + return n +} + +func stuNodeString(node *stuNode) string { + var result string + for tmp := node; tmp != nil; tmp = tmp.Next { + result += strconv.Itoa(tmp.Num) + if tmp.Next != nil { + result += "->" + } + } + return result +} + +func solNodeString(node *solNode) string { + var result string + for tmp := node; tmp != nil; tmp = tmp.Next { + result += strconv.Itoa(tmp.Num) + if tmp.Next != nil { + result += "->" + } + } + return result +} + +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.Errorf("\nAddLinkedNumbers(%v, %v) == %v instead of %v\n\n", + num1, num2, stuNum, "") + } else if stuResult == nil && solResult != nil { + solNum := solNodeString(solResult) + t.Errorf("\nAddLinkedNumbers(%v, %v) == %v instead of %v\n\n", + num1, num2, "", solNum) + } else { + stuNum := stuNodeString(stuResult) + solNum := solNodeString(solResult) + if stuNum != solNum { + t.Errorf("\nAddLinkedNumbers(%v, %v) == %v instead of %v\n\n", + num1, num2, stuNum, solNum) + } + } +} + +func TestAddLinkedNumbers(t *testing.T) { + type node struct { + num1 int + num2 int + } + + table := []node{} + + table = append(table, + node{315, 592}, + ) + + for i := 0; i < 15; i++ { + value := node{ + num1: z01.RandIntBetween(0, 1000000000), + num2: z01.RandIntBetween(0, 1000000000), + } + + table = append(table, value) + } + + for _, arg := range table { + stuResult := AddLinkedNumbers(stuNumToList(arg.num1), stuNumToList(arg.num2)) + solResult := solutions.AddLinkedNumbers(solNumToList(arg.num1), solNumToList(arg.num2)) + + compareNodes(t, stuResult, solResult, arg.num1, arg.num2) + } +} diff --git a/tests/go/solutions/addlinkednumbers/main.go b/tests/go/solutions/addlinkednumbers/main.go new file mode 100644 index 00000000..dae283a9 --- /dev/null +++ b/tests/go/solutions/addlinkednumbers/main.go @@ -0,0 +1,40 @@ +package main + +type NodeAddL struct { + Next *NodeAddL + Num int +} + +func pushFront(node *NodeAddL, num int) *NodeAddL { + tmp := &NodeAddL{Num: num} + if node == nil { + return tmp + } + tmp.Next = node + return tmp +} + +func AddLinkedNumbers(num1, num2 *NodeAddL) *NodeAddL { + var n1, n2, r int + var result *NodeAddL + + for tmp := num1; tmp != nil; tmp = tmp.Next { + n1 = n1*10 + tmp.Num + } + + for tmp := num2; tmp != nil; tmp = tmp.Next { + n2 = n2*10 + tmp.Num + } + + r = n1 + n2 + for r > 0 { + mod := r % 10 + r /= 10 + result = pushFront(result, mod) + } + return result +} + +func main() { + +} diff --git a/tests/go/solutions/addprimesum/addprimesum_test.go b/tests/go/solutions/addprimesum/addprimesum_test.go new file mode 100644 index 00000000..6dec6497 --- /dev/null +++ b/tests/go/solutions/addprimesum/addprimesum_test.go @@ -0,0 +1,57 @@ +package main + +import ( + "strconv" + "strings" + "testing" + + "github.com/01-edu/z01" +) + +func isAPrime(nb int) bool { + if nb <= 0 || nb == 1 { + return false + } + if nb <= 3 { + return true + + } else if nb%2 == 0 || nb%3 == 0 { + return false + } + + i := 5 + for i*i <= nb { + if nb%i == 0 || nb%(i+2) == 0 { + return false + } + i = i + 6 + } + return true +} + +func TestAddPrimeSum(t *testing.T) { + + var table []string + + // fill with all rpime numbers between 0 and 100 + + for i := 0; i < 100; i++ { + if isAPrime(i) { + str := strconv.Itoa(i) + table = append(table, str) + } + } + + // adds 15 random numbers + for i := 0; i < 15; i++ { + table = append(table, strconv.Itoa(z01.RandIntBetween(1, 10000))) + } + + // special cases + table = append(table, "\"\"") + table = append(table, "1 2") + + for _, s := range table { + z01.ChallengeMainExam(t, strings.Fields(s)...) + } +} diff --git a/tests/go/solutions/addprimesum/main.go b/tests/go/solutions/addprimesum/main.go new file mode 100644 index 00000000..e61d0c50 --- /dev/null +++ b/tests/go/solutions/addprimesum/main.go @@ -0,0 +1,53 @@ +package main + +import ( + "fmt" + "os" + "strconv" + + "github.com/01-edu/z01" +) + +func isPrime(nb int) bool { + if nb <= 0 || nb == 1 { + return false + } + if nb <= 3 { + return true + + } else if nb%2 == 0 || nb%3 == 0 { + return false + } + + i := 5 + for i*i <= nb { + if nb%i == 0 || nb%(i+2) == 0 { + return false + } + i = i + 6 + } + return true +} + +func main() { + if len(os.Args) != 2 { + z01.PrintRune('0') + z01.PrintRune('\n') + } else { + argument, _ := strconv.Atoi(os.Args[1]) + + if argument < 0 { + z01.PrintRune('0') + z01.PrintRune('\n') + } else { + result := 0 + for ; argument >= 0; argument-- { + if isPrime(argument) == true { + result = result + argument + } + + } + fmt.Println(result) + } + } +} diff --git a/tests/go/solutions/advancedsortwordarr.go b/tests/go/solutions/advancedsortwordarr.go new file mode 100644 index 00000000..c35462e9 --- /dev/null +++ b/tests/go/solutions/advancedsortwordarr.go @@ -0,0 +1,23 @@ +package solutions + +func CompArray(a, b string) int { + if a < b { + return -1 + } + if a == b { + return 0 + } else { + return 1 + } +} + +func AdvancedSortWordArr(array []string, f func(a, b string) int) { + for i := 1; i < len(array); i++ { + if f(array[i], array[i-1]) < 0 { + array[i], array[i-1] = array[i-1], array[i] + i = 0 + } + + } + +} diff --git a/tests/go/solutions/alphacount.go b/tests/go/solutions/alphacount.go new file mode 100644 index 00000000..7ef77951 --- /dev/null +++ b/tests/go/solutions/alphacount.go @@ -0,0 +1,11 @@ +package solutions + +import ( + "regexp" +) + +func AlphaCount(str string) int { + re := regexp.MustCompile(`[a-zA-Z]`) + found := re.FindAll([]byte(str), -1) + return len(found) +} diff --git a/tests/go/solutions/alphamirror/alphamirror_test.go b/tests/go/solutions/alphamirror/alphamirror_test.go new file mode 100644 index 00000000..c3cd4425 --- /dev/null +++ b/tests/go/solutions/alphamirror/alphamirror_test.go @@ -0,0 +1,21 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestAlphaMirror(t *testing.T) { + arg1 := []string{""} + arg2 := []string{"One", "ring!"} + arg3 := []string{"testing spaces and #!*"} + arg4 := []string{"more", "than", "three", "arguments"} + arg5 := []string{"Upper anD LoWer cAsE"} + arg6 := []string{z01.RandWords()} + args := [][]string{arg1, arg2, arg3, arg4, arg5, arg6} + + for _, v := range args { + z01.ChallengeMainExam(t, v...) + } +} diff --git a/tests/go/solutions/alphamirror/main.go b/tests/go/solutions/alphamirror/main.go new file mode 100644 index 00000000..8f8a2580 --- /dev/null +++ b/tests/go/solutions/alphamirror/main.go @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "os" +) + +func main() { + + if len(os.Args) == 2 { + arg := []rune(os.Args[1]) + for i, ch := range arg { + if ch >= 'a' && ch <= 'z' { + arg[i] = 'z' - ch + 'a' + } else if ch >= 'A' && ch <= 'Z' { + arg[i] = 'Z' - ch + 'A' + } + + } + fmt.Print(string(arg)) + } + + fmt.Println() +} diff --git a/tests/go/solutions/anagram.go b/tests/go/solutions/anagram.go new file mode 100644 index 00000000..8585cb55 --- /dev/null +++ b/tests/go/solutions/anagram.go @@ -0,0 +1,23 @@ +package solutions + +func IsAnagram(s, t string) bool { + alph := make([]int, 26) + for i := 0; i < len(s); i++ { + if s[i] < 'a' || s[i] > 'z' { + continue + } + alph[s[i]-'a']++ + } + for i := 0; i < len(t); i++ { + if t[i] < 'a' || t[i] > 'z' { + continue + } + alph[t[i]-'a']-- + } + for i := 0; i < 26; i++ { + if alph[i] != 0 { + return false + } + } + return true +} diff --git a/tests/go/solutions/anagram/anagram_test.go b/tests/go/solutions/anagram/anagram_test.go new file mode 100644 index 00000000..ec3c8e1b --- /dev/null +++ b/tests/go/solutions/anagram/anagram_test.go @@ -0,0 +1,50 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" // This line is not necessary when testing an exercise with a program +) + +func TestIsAnagram(t *testing.T) { + type node struct { + s string + t string + } + + table := []node{} + + table = append(table, + node{"listen", "silent"}, + node{"alem", "school"}, + node{"neat", "a net"}, + node{"anna madrigal", "a man and a girl"}, + node{"abcc", "abcd"}, + node{"aaaac", "caaaa"}, + node{"", ""}, + node{" ", ""}, + node{"lyam", "meow"}, + node{"golang", "lang go"}, + node{"verylongword", "v e r y l o n g w o r d"}, + node{"chess", "ches"}, + node{"anagram", "nnagram"}, + node{"chess", "board"}, + node{"mmm", "m"}, + node{"pulp", "fiction"}, + ) + + for i := 0; i < 15; i++ { + value := node { + s: z01.RandStr(z01.RandIntBetween(15, 20), "qwertyuiopasdfghjklzxcvbnm "), + t: z01.RandStr(z01.RandIntBetween(15, 20), "qwertyuiopasdfghjklzxcvbnm "), + } + + table = append(table, value) + } + + for _, arg := range(table) { + z01.Challenge(t, IsAnagram, solutions.IsAnagram, arg.s, arg.t) + } +} \ No newline at end of file diff --git a/tests/go/solutions/anagram/main.go b/tests/go/solutions/anagram/main.go new file mode 100644 index 00000000..dd7df09b --- /dev/null +++ b/tests/go/solutions/anagram/main.go @@ -0,0 +1,23 @@ +package main + +func IsAnagram(s, t string) bool { + alph := make([]int, 26) + for i := 0; i < len(s); i++ { + if s[i] < 'a' || s[i] > 'z' { + continue + } + alph[s[i]-'a']++ + } + for i := 0; i < len(t); i++ { + if t[i] < 'a' || t[i] > 'z' { + continue + } + alph[t[i]-'a']-- + } + for i := 0; i < 26; i++ { + if alph[i] != 0 { + return false + } + } + return true +} diff --git a/tests/go/solutions/any.go b/tests/go/solutions/any.go new file mode 100644 index 00000000..a2384b21 --- /dev/null +++ b/tests/go/solutions/any.go @@ -0,0 +1,11 @@ +package solutions + +func Any(f func(string) bool, arr []string) bool { + for _, el := range arr { + if f(el) { + return true + } + } + + return false +} diff --git a/tests/go/solutions/appendrange.go b/tests/go/solutions/appendrange.go new file mode 100644 index 00000000..07cd3f14 --- /dev/null +++ b/tests/go/solutions/appendrange.go @@ -0,0 +1,16 @@ +package solutions + +func AppendRange(min, max int) []int { + size := max - min + answer := []int{} + + if size <= 0 { + return nil + } + + for i := min; i < max; i++ { + answer = append(answer, i) + } + + return answer +} diff --git a/tests/go/solutions/atoi.go b/tests/go/solutions/atoi.go new file mode 100644 index 00000000..da024810 --- /dev/null +++ b/tests/go/solutions/atoi.go @@ -0,0 +1,10 @@ +package solutions + +import ( + "strconv" +) + +func Atoi(s string) int { + n, _ := strconv.Atoi(s) + return n +} diff --git a/tests/go/solutions/atoibase.go b/tests/go/solutions/atoibase.go new file mode 100644 index 00000000..2bbc9aa2 --- /dev/null +++ b/tests/go/solutions/atoibase.go @@ -0,0 +1,120 @@ +package solutions + +import ( + "math/rand" + + "github.com/01-edu/z01" +) + +func ContainsPlusMinus(s string) bool { + for _, c := range s { + if c == '+' || c == '-' { + return true + } + } + return false +} + +func UniqueChar(s string) bool { + r := []rune(s) + n := len(r) + for i := 0; i < n-1; i++ { + if InStr(r[i], s[i+1:n]) { + return false + } + + } + return true +} + +func InStr(c rune, s string) bool { + for _, r := range s { + if c == r { + return true + } + } + return false +} + +func ValidBase(base string) bool { + return len(base) >= 2 && !ContainsPlusMinus(base) && UniqueChar(base) +} + +func Power(nbr int, pwr int) int { + if pwr == 0 { + return 1 + } + if pwr == 1 { + return nbr + } + return nbr * Power(nbr, pwr-1) + +} + +func AtoiBase(s string, base string) int { + var result int + var i int + sign := 1 + lengthBase := len(base) + lengths := len(s) + + if !ValidBase(base) { + return 0 + } + if s[i] == '-' { + sign = -1 + } + if s[i] == '-' || s[i] == '+' { + i++ + } + for i < len(s) { + result = result + (Index(base, string(s[i])) * Power(lengthBase, lengths-1)) + i++ + lengths-- + } + return result * sign +} + +// this function is used to create the tests (input VALID bases here) + +func RandomValidBase() string { + validBases := []string{ + "01", + "CHOUMIisDAcat!", + "choumi", + "0123456789", + "abc", "Zone01", + "0123456789ABCDEF", + "WhoAmI?", + } + index := rand.Intn(len(validBases)) + return validBases[index] +} + +// this function is used to create the tests (input INVALID bases here) +func RandomInvalidBase() string { + invalidBases := []string{ + "0", + "1", + "CHOUMIisdacat!", + "choumiChoumi", + "01234567890", + "abca", + "Zone01Zone01", + "0123456789ABCDEF0", + "WhoAmI?IamWhoIam", + } + index := z01.RandIntBetween(0, len(invalidBases)-1) + return invalidBases[index] +} + +// this function is used to create the random STRING number from VALID BASES +func RandomStringFromBase(base string) string { + letters := []rune(base) + size := z01.RandIntBetween(1, 10) + r := make([]rune, size) + for i := range r { + r[i] = letters[rand.Intn(len(letters))] + } + return string(r) +} diff --git a/tests/go/solutions/atoibaseprog/atoibaseprog_test.go b/tests/go/solutions/atoibaseprog/atoibaseprog_test.go new file mode 100644 index 00000000..d728da31 --- /dev/null +++ b/tests/go/solutions/atoibaseprog/atoibaseprog_test.go @@ -0,0 +1,48 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" +) + +// this is the function that creates the TESTS +func TestAtoiBaseProg(t *testing.T) { + type node struct { + s string + base string + } + + table := []node{} + + // 15 random pairs of string numbers with valid bases + for i := 0; i < 15; i++ { + validBaseToInput := solutions.RandomValidBase() + val := node{ + s: solutions.RandomStringFromBase(validBaseToInput), + base: validBaseToInput, + } + table = append(table, val) + } + // 15 random pairs of string numbers with invalid bases + for i := 0; i < 15; i++ { + invalidBaseToInput := solutions.RandomInvalidBase() + val := node{ + s: "thisinputshouldnotmatter", + base: invalidBaseToInput, + } + table = append(table, val) + } + table = append(table, + node{s: "125", base: "0123456789"}, + node{s: "1111101", base: "01"}, + node{s: "7D", base: "0123456789ABCDEF"}, + node{s: "uoi", base: "choumi"}, + node{s: "bbbbbab", base: "-ab"}, + ) + for _, arg := range table { + z01.Challenge(t, AtoiBase, solutions.AtoiBase, arg.s, arg.base) + } +} diff --git a/tests/go/solutions/atoibaseprog/main.go b/tests/go/solutions/atoibaseprog/main.go new file mode 100644 index 00000000..af6af66d --- /dev/null +++ b/tests/go/solutions/atoibaseprog/main.go @@ -0,0 +1,83 @@ +package main + +import ( + "strings" +) + +func ContainsPlusMinus(s string) bool { + for _, c := range s { + if c == '+' || c == '-' { + return true + } + } + return false +} + +func UniqueChar(s string) bool { + r := []rune(s) + n := len(r) + for i := 0; i < n-1; i++ { + if InStr(r[i], s[i+1:n]) { + return false + } + + } + return true +} + +func InStr(c rune, s string) bool { + for _, r := range s { + if c == r { + return true + } + } + return false +} + +func ValidBase(base string) bool { + return len(base) >= 2 && !ContainsPlusMinus(base) && UniqueChar(base) +} + +func Power(nbr int, pwr int) int { + if pwr == 0 { + return 1 + } + if pwr == 1 { + return nbr + } + return nbr * Power(nbr, pwr-1) + +} + +func Index(s string, toFind string) int { + result := strings.Index(s, toFind) + return result +} + +func AtoiBase(s string, base string) int { + var result int + var i int + sign := 1 + lengthBase := len(base) + lengths := len(s) + + if !ValidBase(base) { + return 0 + } + if s[i] == '-' { + sign = -1 + } + if s[i] == '-' || s[i] == '+' { + i++ + } + for i < len(s) { + result = result + (Index(base, string(s[i])) * Power(lengthBase, lengths-1)) + i++ + lengths-- + } + return result * sign +} + +func main() { + +} diff --git a/tests/go/solutions/atoiprog/atoiprog_test.go b/tests/go/solutions/atoiprog/atoiprog_test.go new file mode 100644 index 00000000..2cb7d3f1 --- /dev/null +++ b/tests/go/solutions/atoiprog/atoiprog_test.go @@ -0,0 +1,38 @@ +package main + +import ( + "strconv" + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" +) + +func TestAtoiProg(t *testing.T) { + table := make([]string, 30) + for i := range table { + table[i] = strconv.Itoa(z01.RandInt()) + } + table = append(table, + strconv.Itoa(z01.MinInt), + strconv.Itoa(z01.MaxInt), + "", + "-", + "+", + "0", + "+0", + "-Invalid123", + "--123", + "-+123", + "++123", + "123-", + "123+", + "123.", + "123.0", + "123a45", + ) + for _, arg := range table { + z01.Challenge(t, Atoi, solutions.Atoi, arg) + } +} diff --git a/tests/go/solutions/atoiprog/main.go b/tests/go/solutions/atoiprog/main.go new file mode 100644 index 00000000..21dc185f --- /dev/null +++ b/tests/go/solutions/atoiprog/main.go @@ -0,0 +1,14 @@ +package main + +import ( + "strconv" +) + +func Atoi(s string) int { + n, _ := strconv.Atoi(s) + return n +} + +func main() { + +} diff --git a/tests/go/solutions/balancedstring/balancedstring_test.go b/tests/go/solutions/balancedstring/balancedstring_test.go new file mode 100644 index 00000000..5dad2b52 --- /dev/null +++ b/tests/go/solutions/balancedstring/balancedstring_test.go @@ -0,0 +1,68 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestBalancedString(t *testing.T) { + + // Declaration of an empty array of type string + table := []string{} + + // Filing of this array with the tests array provided. + table = append(table, + "CDCCDDCDCD", + "CDDDDCCCDC", + "DDDDCCCC", + "CDCCCDDCDD", + "CDCDCDCDCDCDCDCD", + "CCCDDDCDCCCCDC", + "DDDDDDDDDDDDDDDDDDDDDDDDCCCCCCCCCCCCCCCCCCCCCCCC", + "DDDDCDDDDCDDDCCC", + ) + + for i := 0; i < 15; i++ { + value := "" + chunks := z01.RandIntBetween(5, 10) + for j := 0; j < chunks; j++ { + countC := z01.RandIntBetween(1, 5) + countD := z01.RandIntBetween(1, 5) + tmpC := countC + tmpD := countD + for tmpC > 0 || tmpD > 0 { + letter := z01.RandStr(1, "CD") + if tmpC > 0 && letter == "C" { + tmpC-- + value += letter + } else if tmpD > 0 && letter == "D" { + tmpD-- + value += letter + } + } + + tmpC = countC + tmpD = countD + for tmpC > 0 || tmpD > 0 { + letter := z01.RandStr(1, "CD") + if tmpC > 0 && letter == "D" { + tmpC-- + value += letter + } else if tmpD > 0 && letter == "C" { + tmpD-- + value += letter + } + } + } + table = append(table, value) + } + + //The table with 8 specific exercises and 15 randoms is now ready to be "challenged" + //This time, contrary to the nauuo exercise, + //We can use the ChallengeMainExam function. + + for _, arg := range table { + z01.ChallengeMainExam(t, arg) + } +} diff --git a/tests/go/solutions/balancedstring/main.go b/tests/go/solutions/balancedstring/main.go new file mode 100644 index 00000000..21583a2e --- /dev/null +++ b/tests/go/solutions/balancedstring/main.go @@ -0,0 +1,34 @@ +package main + +import ( + "fmt" + "os" +) + +func solve(str string) int { + var count int = 0 + var countC, countD int + for i := 0; i < len(str); i++ { + if str[i] == 'C' { + countC++ + } else if str[i] == 'D' { + countD++ + } + if countC == countD { + count++ + countC = 0 + countD = 0 + } + } + return count +} + +func main() { + args := os.Args[1:] + if len(args) != 1 { + fmt.Println() + return + } + result := solve(args[0]) + fmt.Println(result) +} diff --git a/tests/go/solutions/basicatoi.go b/tests/go/solutions/basicatoi.go new file mode 100644 index 00000000..6fdccdc7 --- /dev/null +++ b/tests/go/solutions/basicatoi.go @@ -0,0 +1,10 @@ +package solutions + +import ( + "strconv" +) + +func BasicAtoi(s string) int { + n, _ := strconv.Atoi(s) + return n +} diff --git a/tests/go/solutions/basicatoi2.go b/tests/go/solutions/basicatoi2.go new file mode 100644 index 00000000..00ce3468 --- /dev/null +++ b/tests/go/solutions/basicatoi2.go @@ -0,0 +1,10 @@ +package solutions + +import ( + "strconv" +) + +func BasicAtoi2(s string) int { + n, _ := strconv.Atoi(s) + return n +} diff --git a/tests/go/solutions/basicjoin.go b/tests/go/solutions/basicjoin.go new file mode 100644 index 00000000..5f17d813 --- /dev/null +++ b/tests/go/solutions/basicjoin.go @@ -0,0 +1,8 @@ +package solutions + +func BasicJoin(a []string) (b string) { + for _, s := range a { + b += s + } + return b +} diff --git a/tests/go/solutions/boolean/main.go b/tests/go/solutions/boolean/main.go new file mode 100644 index 00000000..27cab30c --- /dev/null +++ b/tests/go/solutions/boolean/main.go @@ -0,0 +1,33 @@ +package main + +import ( + "os" + + "github.com/01-edu/z01" +) + +func printStr(str string) { + arrayStr := []rune(str) + + for i := 0; i < len(arrayStr); i++ { + z01.PrintRune(arrayStr[i]) + } + z01.PrintRune('\n') +} + +func isEven(nbr int) bool { + return nbr%2 == 0 +} + +func main() { + EvenMsg := "I have an even number of arguments" + OddMsg := "I have an odd number of arguments" + + lenOfArg := len(os.Args) - 1 + + if isEven(lenOfArg) == true { + printStr(EvenMsg) + } else { + printStr(OddMsg) + } +} diff --git a/tests/go/solutions/brackets/brackets_test.go b/tests/go/solutions/brackets/brackets_test.go new file mode 100644 index 00000000..ab63426b --- /dev/null +++ b/tests/go/solutions/brackets/brackets_test.go @@ -0,0 +1,37 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestBrackets(t *testing.T) { + oneArgs := []string{"(johndoe)", ")()", "([)]", "{2*[d - 3]/(12)}"} + + // 18 random tests ( at least half are valid) + for i := 0; i < 3; i++ { + oneArgs = append(oneArgs, "("+z01.RandASCII()+")") + oneArgs = append(oneArgs, "["+z01.RandASCII()+"]") + oneArgs = append(oneArgs, "{"+z01.RandASCII()+"}") + oneArgs = append(oneArgs, "("+z01.RandAlnum()+")") + oneArgs = append(oneArgs, "["+z01.RandAlnum()+"]") + oneArgs = append(oneArgs, "{"+z01.RandAlnum()+"}") + } + + // No args testig + z01.ChallengeMainExam(t) + + for _, v := range oneArgs { + z01.ChallengeMainExam(t, v) + } + + arg1 := []string{"", "{[(0 + 0)(1 + 1)](3*(-1)){()}}"} + arg2 := []string{"{][]}", "{3*[21/(12+ 23)]}"} + arg3 := []string{"{([)])}", "{{{something }- [something]}}", "there are"} + multArg := [][]string{arg1, arg2, arg3} + + for _, v := range multArg { + z01.ChallengeMainExam(t, v...) + } +} diff --git a/tests/go/solutions/brackets/main.go b/tests/go/solutions/brackets/main.go new file mode 100644 index 00000000..bd38bc7d --- /dev/null +++ b/tests/go/solutions/brackets/main.go @@ -0,0 +1,54 @@ +package main + +import ( + "fmt" + "os" +) + +func matchBrackets(exp string) bool { + rn := []rune(exp) + var opened []rune + ptr := -1 + for _, c := range rn { + if c == '(' || c == '[' || c == '{' { + opened = append(opened, c) + ptr++ + } else if c == ')' { + if ptr < 0 || opened[ptr] != '(' { + return false + } else { + opened = opened[:len(opened)-1] + ptr-- + } + } else if c == ']' { + if ptr < 0 || opened[ptr] != '[' { + return false + } else { + opened = opened[:len(opened)-1] + ptr-- + } + } else if c == '}' { + if ptr < 0 || opened[ptr] != '{' { + return false + } else { + opened = opened[:len(opened)-1] + ptr-- + } + } + } + return len(opened) == 0 +} + +func main() { + if len(os.Args) > 1 { + for _, v := range os.Args[1:] { + if matchBrackets(v) { + fmt.Println("OK") + } else { + fmt.Println("Error") + } + } + } else { + fmt.Println() + } +} diff --git a/tests/go/solutions/brainfuck/brainfuck_test.go b/tests/go/solutions/brainfuck/brainfuck_test.go new file mode 100644 index 00000000..b0a2a588 --- /dev/null +++ b/tests/go/solutions/brainfuck/brainfuck_test.go @@ -0,0 +1,23 @@ +package main + +import ( + "strings" + "testing" + + "github.com/01-edu/z01" +) + +func TestBrainFuck(t *testing.T) { + + // individual tests 1)Hello World! 2)Hi 3)abc 4)ABC + + args := []string{"++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.", + "+++++[>++++[>++++H>+++++i<<-]>>>++\n<<<<-]>>--------.>+++++.>.", + "++++++++++[>++++++++++>++++++++++>++++++++++<<<-]>---.>--.>-.>++++++++++.", + "ld++++++++++++++++++++++++++++++++++++++++++++this+is++a++++comment++++++++++++++[>d+<-]>.+.+.>++++++++++.", + strings.Join([]string{"ld++++++++++++++++++++++++++++++++++++++++++++this+is++a++++comment++++++++++++++[>d+<-]>.+", z01.RandStr(z01.RandIntBetween(1, 10), ".+"), ".+.>++++++++++."}, ""), + } + for _, v := range args { + z01.ChallengeMainExam(t, v) + } +} diff --git a/tests/go/solutions/brainfuck/main.go b/tests/go/solutions/brainfuck/main.go new file mode 100644 index 00000000..30054e85 --- /dev/null +++ b/tests/go/solutions/brainfuck/main.go @@ -0,0 +1,67 @@ +package main + +import ( + "github.com/01-edu/z01" + "os" +) + +const SIZE = 2048 + +func main() { + if len(os.Args) == 2 { + progpoint := []byte(os.Args[1]) + var arby [SIZE]byte + pos := 0 + openBr := 0 //opened brackets + i := 0 //iterates through the source code passed in the argument + N := len(progpoint) //length of the source code + for i >= 0 && i < N { + switch progpoint[i] { + case '>': + //Increment the pointer + pos++ + case '<': + //decrement the pointes + pos-- + case '+': + //increment the pointed byte + arby[pos]++ + case '-': + //decrement the pointed byte + arby[pos]-- + case '.': + //print the pointed byte on std output + z01.PrintRune(rune(arby[pos])) + case '[': + //go to the matching ']' if the pointed byte is 0 (while start) + openBr = 0 + if arby[pos] == 0 { + for i < N && (progpoint[i] != byte(']') || openBr > 1) { + if progpoint[i] == byte('[') { + openBr++ + } else if progpoint[i] == byte(']') { + openBr-- + } + i++ + } + } + case ']': + //go to the matching '[' if the pointed byte is not 0 (while end) + openBr = 0 + if arby[pos] != 0 { + for i >= 0 && (progpoint[i] != byte('[') || openBr > 1) { + if progpoint[i] == byte(']') { + openBr++ + } else if progpoint[i] == byte('[') { + openBr-- + } + i-- + } + } + } + i++ + } + } else { + z01.PrintRune('\n') + } +} diff --git a/tests/go/solutions/btree.go b/tests/go/solutions/btree.go new file mode 100644 index 00000000..88943fb3 --- /dev/null +++ b/tests/go/solutions/btree.go @@ -0,0 +1,253 @@ +package solutions + +type TreeNode struct { + Left, Right, Parent *TreeNode + Data string +} + +func BTreeInsertData(bt *TreeNode, elem string) *TreeNode { + if bt == nil { + return &TreeNode{Data: elem} + } + + if elem < bt.Data { + bt.Left = BTreeInsertData(bt.Left, elem) + bt.Left.Parent = bt + } else if elem >= bt.Data { + bt.Right = BTreeInsertData(bt.Right, elem) + bt.Right.Parent = bt + } + return bt +} + +func BTreeApplyInorder(root *TreeNode, f func(...interface{}) (int, error)) { + if root != nil { + BTreeApplyInorder(root.Left, f) + f(root.Data) + BTreeApplyInorder(root.Right, f) + } +} + +func BTreeApplyPreorder(root *TreeNode, f func(...interface{}) (int, error)) { + if root != nil { + f(root.Data) + BTreeApplyPreorder(root.Left, f) + BTreeApplyPreorder(root.Right, f) + } +} + +func BTreeApplyPostorder(root *TreeNode, f func(...interface{}) (int, error)) { + if root != nil { + BTreeApplyPostorder(root.Left, f) + BTreeApplyPostorder(root.Right, f) + f(root.Data) + } +} + +func BTreeSearchItem(root *TreeNode, elem string) *TreeNode { + if root == nil { + return nil + } + + if root.Data == elem { + return root + } + + if elem < root.Data { + return BTreeSearchItem(root.Left, elem) + } + + return BTreeSearchItem(root.Right, elem) +} + +func BTreeLevelCount(root *TreeNode) int { + if root == nil { + return 0 + } + + left := BTreeLevelCount(root.Left) + right := BTreeLevelCount(root.Right) + + if left > right { + return left + 1 + } + + return right + 1 +} + +func BTreeIsBinary(root *TreeNode) bool { + condLeft := true + condRight := true + + if root == nil { + return true + } + + if root.Left != nil { + condLeft = BTreeIsBinary(root.Left) && root.Data >= root.Left.Data + } + + if root.Right != nil { + condRight = BTreeIsBinary(root.Right) && root.Data <= root.Right.Data + } + + return condLeft && condRight +} + +func applyGivenOrder(root *TreeNode, level int, f func(...interface{}) (int, error)) { + if root == nil { + return + } + + if level == 0 { + arg := interface{}(root.Data) + f(arg) + } else if level > 0 { + applyGivenOrder(root.Left, level-1, f) + applyGivenOrder(root.Right, level-1, f) + } +} + +//Apply the function f level by level +func BTreeApplyByLevel(root *TreeNode, f func(...interface{}) (int, error)) { + h := BTreeLevelCount(root) + for i := 0; i < h; i++ { + applyGivenOrder(root, i, f) + } +} + +/*----------------------------------- +* node-> (A) (B) +* / / \ +* temp-> (B) --------> (C) (A) +* / \ / +* (C) [z] [z] +*------------------------------------*/ +func BTreeRotateRight(node *TreeNode) *TreeNode { + if node == nil { + return nil + } + + if node.Left == nil { + return node + } + + temp := node.Left + + node.Left = temp.Right + + if temp.Right != nil { + temp.Right.Parent = node + } + + if node.Parent != nil { + if node == node.Parent.Left { + node.Parent.Left = temp + } else { + node.Parent.Right = temp + } + } + + temp.Right = node + temp.Parent = node.Parent + node.Parent = temp + return temp +} + +/*------------------------------------ +* node->(A) (B) +* \ / \ +* temp-> (B) -------> (A) (C) +* / \ \ +* [z] (C) [z] +*------------------------------------- */ +func BTreeRotateLeft(node *TreeNode) *TreeNode { + if node == nil { + return nil + } + + if node.Right == nil { + return node + } + + temp := node.Right + node.Right = temp.Left + + if temp.Left != nil { + temp.Left.Parent = node + } + if node.Parent != nil { + if node == node.Parent.Left { + node.Parent.Left = temp + } else { + node.Parent.Right = temp + } + } + + temp.Left = node + temp.Parent = node.Parent + + node.Parent = temp + return temp +} + +//Returns the maximum node in the subtree started by root +func BTreeMax(root *TreeNode) *TreeNode { + + if root == nil || root.Right == nil { + return root + } + + return BTreeMax(root.Right) +} + +//Returns the minimum value in the subtree started by root +func BTreeMin(root *TreeNode) *TreeNode { + if root == nil || root.Left == nil { + return root + } + + return BTreeMin(root.Left) +} + +func BTreeTransplant(root, node, repla *TreeNode) *TreeNode { + if root == nil { + return nil + } + + replacement := node + if node.Parent == nil { + root = repla + } else if node == node.Parent.Left { + replacement.Parent.Left = repla + } else { + replacement.Parent.Right = repla + } + if repla != nil { + repla.Parent = node.Parent + } + + return root +} + +func BTreeDeleteNode(root, node *TreeNode) *TreeNode { + if node != nil { + if node.Left == nil { + root = BTreeTransplant(root, node, node.Right) + } else if node.Right == nil { + root = BTreeTransplant(root, node, node.Left) + } else { + y := BTreeMin(node.Right) + if y != nil && y.Parent != node { + root = BTreeTransplant(root, y, y.Right) + + y.Right = node.Right + y.Right.Parent = y + } + root = BTreeTransplant(root, node, y) + y.Left = node.Left + y.Left.Parent = y + } + } + return root +} diff --git a/tests/go/solutions/capitalize.go b/tests/go/solutions/capitalize.go new file mode 100644 index 00000000..136eea1e --- /dev/null +++ b/tests/go/solutions/capitalize.go @@ -0,0 +1,35 @@ +package solutions + +import ( + "strings" +) + +func isAlphaNumerical(r rune) bool { + return (r >= 'a' && r <= 'z') || (r >= 'A' && r <= 'Z') || (r >= '0' && r <= '9') +} + +func isLowerRune(r rune) bool { + return r >= 'a' && r <= 'z' +} + +func toUpperRune(r rune) rune { + if r >= 'a' && r <= 'z' { + return r - 32 + } + return r +} + +func Capitalize(s string) string { + r := []rune(strings.ToLower(s)) + + if isLowerRune(r[0]) { + r[0] = toUpperRune(r[0]) + } + + for i := 1; i < len(r); i++ { + if (!isAlphaNumerical(r[i-1])) && (isLowerRune(r[i])) { + r[i] = toUpperRune(r[i]) + } + } + return string(r) +} diff --git a/tests/go/solutions/capitalizeprog/capitalizeprog_test.go b/tests/go/solutions/capitalizeprog/capitalizeprog_test.go new file mode 100644 index 00000000..4534e03b --- /dev/null +++ b/tests/go/solutions/capitalizeprog/capitalizeprog_test.go @@ -0,0 +1,25 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestCapitalizeProg(t *testing.T) { + table := append( + z01.MultRandASCII(), + "Hello! How are you? How+are+things+4you?", + "Hello! How are you?", + "a", + "z", + "!", + "9a", + "9a LALALA!", + ) + for _, arg := range table { + z01.ChallengeMainExam(t, arg) + } + z01.ChallengeMainExam(t, "hello", "hihihi") + z01.ChallengeMainExam(t) +} diff --git a/tests/go/solutions/capitalizeprog/main.go b/tests/go/solutions/capitalizeprog/main.go new file mode 100644 index 00000000..f4de428a --- /dev/null +++ b/tests/go/solutions/capitalizeprog/main.go @@ -0,0 +1,47 @@ +package main + +import ( + "fmt" + "os" + "strings" +) + +func isAlphaNumerical(r rune) bool { + return (r >= 'a' && r <= 'z') || (r >= 'A' && r <= 'Z') || (r >= '0' && r <= '9') +} + +func isLowerRune(r rune) bool { + return r >= 'a' && r <= 'z' +} + +func toUpperRune(r rune) rune { + if r >= 'a' && r <= 'z' { + return r - 32 + } + return r +} + +func capitalize(s string) string { + r := []rune(strings.ToLower(s)) + + if isLowerRune(r[0]) { + r[0] = toUpperRune(r[0]) + } + + for i := 1; i < len(r); i++ { + if (!isAlphaNumerical(r[i-1])) && (isLowerRune(r[i])) { + r[i] = toUpperRune(r[i]) + } + } + return string(r) +} + +func main() { + if len(os.Args) == 2 { + fmt.Println(capitalize(os.Args[1])) + } else if len(os.Args) > 2 { + fmt.Println("Too many arguments") + } else { + fmt.Println() + } +} diff --git a/tests/go/solutions/cat/main.go b/tests/go/solutions/cat/main.go new file mode 100644 index 00000000..bf1463e0 --- /dev/null +++ b/tests/go/solutions/cat/main.go @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "io" + "io/ioutil" + "log" + "os" +) + +func main() { + size := len(os.Args) + if size == 1 { + if _, err := io.Copy(os.Stdout, os.Stdin); err != nil { + log.Fatal(err) + } + } else { + for i := 1; i < size; i++ { + data, err := ioutil.ReadFile(os.Args[i]) + if err != nil { + fmt.Println(err.Error()) + return + } + fmt.Print(string(data)) + } + } +} diff --git a/tests/go/solutions/cat/quest8.txt b/tests/go/solutions/cat/quest8.txt new file mode 100644 index 00000000..0eaa1354 --- /dev/null +++ b/tests/go/solutions/cat/quest8.txt @@ -0,0 +1 @@ +"Programming is a skill best acquired by practice and example rather than from books" by Alan Turing diff --git a/tests/go/solutions/cat/quest8T.txt b/tests/go/solutions/cat/quest8T.txt new file mode 100644 index 00000000..2ec173c6 --- /dev/null +++ b/tests/go/solutions/cat/quest8T.txt @@ -0,0 +1 @@ +"Alan Mathison Turing was an English mathematician, computer scientist, logician, cryptanalyst. Turing was highly influential in the development of theoretical computer science, providing a formalisation of the concepts of algorithm and computation with the Turing machine, which can be considered a model of a general-purpose computer. Turing is widely considered to be the father of theoretical computer science and artificial intelligence." diff --git a/tests/go/solutions/challenge.go b/tests/go/solutions/challenge.go new file mode 100644 index 00000000..87d75beb --- /dev/null +++ b/tests/go/solutions/challenge.go @@ -0,0 +1,215 @@ +package solutions + +import ( + "reflect" + "runtime" + "strconv" + "strings" + "testing" + + "github.com/01-edu/z01" +) + +func FormatTree(root *TreeNode) string { + if root == nil { + return "" + } + res := root.Data + "\n" + res += formatSubTree(root, "") + return res +} + +func formatSubTree(root *TreeNode, prefix string) string { + if root == nil { + return "" + } + + var res string + + hasLeft := root.Left != nil + hasRight := root.Right != nil + + if !hasLeft && !hasRight { + return res + } + + res += prefix + if hasLeft && hasRight { + res += "├── " + } + + if !hasLeft && hasRight { + res += "└── " + } + + if hasRight { + printStrand := (hasLeft && hasRight && (root.Right.Right != nil || root.Right.Left != nil)) + newPrefix := prefix + if printStrand { + newPrefix += "│ " + } else { + newPrefix += " " + } + res += root.Right.Data + "\n" + res += formatSubTree(root.Right, newPrefix) + } + + if hasLeft { + if hasRight { + res += prefix + } + res += "└── " + root.Left.Data + "\n" + res += formatSubTree(root.Left, prefix+" ") + } + return res +} + +func ParentList(root *TreeNode) string { + if root == nil { + return "" + } + + var parent string + + if root.Parent == nil { + parent = "nil" + } else { + parent = root.Parent.Data + } + + r := "Node: " + root.Data + " Parent: " + parent + "\n" + r += ParentList(root.Left) + ParentList(root.Right) + return r +} + +func ChallengeTree(t *testing.T, + fn1, fn2 interface{}, + arg1 *TreeNode, arg2 interface{}, + args ...interface{}) { + + args1 := []interface{}{arg1} + args2 := []interface{}{arg2} + + if args != nil { + for _, v := range args { + args1 = append(args1, v) + args2 = append(args2, v) + } + } + st1 := z01.Monitor(fn1, args1) + st2 := z01.Monitor(fn2, args2) + + if st1.Stdout != st2.Stdout { + t.Errorf("%s(\n%s)\n prints %s instead of %s\n", + z01.NameOfFunc(fn2), + FormatTree(arg1), + z01.Format(st2.Stdout), + z01.Format(st1.Stdout), + ) + } + +} + +func Challenge(t *testing.T, fn1, fn2 interface{}, arg1, arg2 interface{}, args ...interface{}) { + args1 := []interface{}{arg1} + args2 := []interface{}{arg2} + + if args != nil { + for _, v := range args { + args1 = append(args1, v) + args2 = append(args2, v) + } + } + st1 := z01.Monitor(fn1, args1) + st2 := z01.Monitor(fn2, args2) + + if st1.Stdout != st2.Stdout { + t.Errorf("%s(%s) prints %s instead of %s\n", + z01.NameOfFunc(fn2), + z01.Format(arg2), + z01.Format(st2.Stdout), + z01.Format(st1.Stdout), + ) + } + +} + +func PrintList(n *NodeI) string { + var res string + it := n + for it != nil { + res += strconv.Itoa(it.Data) + "-> " + it = it.Next + } + res += "" + return res +} + +func ListToString(n *NodeL) string { + var res string + it := n + for it != nil { + switch it.Data.(type) { + case int: + res += strconv.Itoa(it.Data.(int)) + "-> " + case string: + res += it.Data.(string) + "-> " + } + it = it.Next + } + res += "" + return res +} + +func ConvertIntToInterface(t []int) []interface{} { + RandLen := z01.RandIntBetween(0, len(t)) + s := make([]interface{}, RandLen) + for j := 0; j < RandLen; j++ { + for i := 0; i < z01.RandIntBetween(1, len(t)); i++ { + s[j] = t[i] + } + } + return s +} + +func ConvertIntToStringface(t []string) []interface{} { + RandLen := z01.RandIntBetween(0, len(t)) + s := make([]interface{}, RandLen) + for j := 0; j < RandLen; j++ { + for i := 0; i < z01.RandIntBetween(1, len(t)); i++ { + s[j] = t[i] + } + } + return s +} + +type NodeTest struct { + Data []interface{} +} + +func ElementsToTest(table []NodeTest) []NodeTest { + table = append(table, + NodeTest{ + Data: []interface{}{}, + }, + ) + for i := 0; i < 3; i++ { + val := NodeTest{ + Data: ConvertIntToInterface(z01.MultRandInt()), + } + table = append(table, val) + } + for i := 0; i < 3; i++ { + val := NodeTest{ + Data: ConvertIntToStringface(z01.MultRandWords()), + } + table = append(table, val) + } + return table +} + +// GetName gets the function name +func GetName(f interface{}) string { + pathFuncUsed := strings.Split(runtime.FuncForPC(reflect.ValueOf(f).Pointer()).Name(), "/") + return pathFuncUsed[len(pathFuncUsed)-1] +} diff --git a/tests/go/solutions/changeorder.go b/tests/go/solutions/changeorder.go new file mode 100644 index 00000000..b733caed --- /dev/null +++ b/tests/go/solutions/changeorder.go @@ -0,0 +1,56 @@ +package solutions + +//This solution is the comparing file of the staff +// Because the solution is a function, +// +//1) here the package is solutions +//2) it does not need an empty func main(){} +//3) its location is 1 level below the folder of the nauuo_test.go file + +func pushBack(node *NodeAddL, num int) *NodeAddL { + nw := &NodeAddL{Num: num} + if node == nil { + return nw + } + for tmp := node; tmp != nil; tmp = tmp.Next { + if tmp.Next == nil { + tmp.Next = nw + return node + } + } + return node +} + +func Changeorder(node *NodeAddL) *NodeAddL { + if node == nil { + return node + } + ans := &NodeAddL{Num: node.Num} + for tmp := node; tmp != nil; { + tmp = tmp.Next + if tmp == nil { + break + } + tmp = tmp.Next + if tmp == nil { + break + } + ans = pushBack(ans, tmp.Num) + } + + if node.Next == nil { + return ans + } + for tmp := node.Next; tmp != nil; { + ans = pushBack(ans, tmp.Num) + tmp = tmp.Next + if tmp == nil { + break + } + tmp = tmp.Next + if tmp == nil { + break + } + } + return ans +} diff --git a/tests/go/solutions/changeorder/changeorder_test.go b/tests/go/solutions/changeorder/changeorder_test.go new file mode 100644 index 00000000..e1d61a4a --- /dev/null +++ b/tests/go/solutions/changeorder/changeorder_test.go @@ -0,0 +1,166 @@ +package main + +import ( + "strconv" + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" // This line is not necessary when testing an exercise with a program +) + +type stuNode = NodeAddL +type solNode = solutions.NodeAddL + +func stuPushFront(node *stuNode, num int) *stuNode { + tmp := &stuNode{Num: num} + tmp.Next = node + return tmp +} + +func stuNumToList(num int) *stuNode { + var res *stuNode + for num > 0 { + res = stuPushFront(res, num%10) + num /= 10 + } + return res +} + +func stuListToNum(node *stuNode) int { + var n int + + for tmp := node; tmp != nil; tmp = tmp.Next { + n = n*10 + tmp.Num + } + return n +} + +func solPushFront(node *solNode, num int) *solNode { + tmp := &solNode{Num: num} + tmp.Next = node + return tmp +} + +func printSol(node *solNode) string { + var result string + for tmp := node; tmp != nil; tmp = tmp.Next { + result += strconv.Itoa(tmp.Num) + if tmp.Next != nil { + result += "->" + } + } + return result +} + +func solNumToList(num int) *solNode { + var res *solNode + for num > 0 { + res = solPushFront(res, num%10) + num /= 10 + } + return res +} + +func solListToNum(node *solNode) int { + var n int + + for tmp := node; tmp != nil; tmp = tmp.Next { + n = n*10 + tmp.Num + } + return n +} + +func compareNodes(t *testing.T, stuResult *stuNode, solResult *solNode, num1 int) { + solList := printSol(solNumToList(num1)) + if stuResult == nil && solResult == nil { + } else if stuResult != nil && solResult == nil { + stuNum := stuListToNum(stuResult) + t.Errorf("\nChangeorder(%s) == %v instead of %v\n\n", + solList, stuNum, "") + } else if stuResult == nil && solResult != nil { + solNum := solListToNum(solResult) + t.Errorf("\nChangeorder(%s) == %v instead of %v\n\n", + solList, "", solNum) + } else { + stuNum := stuListToNum(stuResult) + solNum := solListToNum(solResult) + if stuNum != solNum { + t.Errorf("\nChangeorder(%s) == %v instead of %v\n\n", + solList, stuNum, solNum) + } + } +} + +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) + + type node struct { + num1 int + } + + // Declaration of an empty array of type node{} + // note that in this case this is the easiest type of table to declare + // but a table can be of any other relevant type, (for example []string{}, []int{} if it + // were a single string tested or a single int) + + table := []node{} + // Initial filling of that array with the values I see in the examples of the subject + + table = append(table, + node{1234567}, + ) + + // If we were to leave the table as it is, a student could just do a program with 4 ifs and get + // "around" the goal of the exercise. We are now going to add 15 random tests using the z01 testing library + + for i := 0; i < 15; i++ { + value := node{ + num1: z01.RandIntBetween(0, 1000000000), + //this z01.RandIntBetween function allows the randomization of + //the int for each value in a desired range. + //Note that they are many others of those functions for other types of data + //Do not hesitate to have a look at all of them https://github.com/01-edu/z01 + } + + //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" + //Because the exercise asks for a function we are now using the Challenge function (this function would + // be the ChallengeMainExam function) + + for _, arg := range table { + stuResult := Changeorder(stuNumToList(arg.num1)) + solResult := solutions.Changeorder(solNumToList(arg.num1)) + + compareNodes(t, stuResult, solResult, arg.num1) + } + + // the z01.Challenge function is here applied to each argument of the table. It musts contains: + // 1) first, the t argument from the T structure imported from the package "testing" + // + // 2) second, the function from the student, in this case Nauuo + //(this disapears in the ChallengeMainExam function) + // 3) third, the function from the staff, in this case solutions.Nauuo + //(this disapears as well in the ChallengeMainExam function) + // 4) all the arguments to be tested, in this case it is the plus, minus and rand from each structure, + // notice that they are accessed with arg. (the arg notation comes from the way it was name in the + // range loop over the table) + + // Now that this is done. re-read the quickReadme (the test your test recap) and apply all the commands + // and intructions. We strongly advise to check that your error messages matches your subject. + // and that you ask a colleague to double check. + + //FINAL STEP: + // 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 new file mode 100644 index 00000000..dae67218 --- /dev/null +++ b/tests/go/solutions/changeorder/main.go @@ -0,0 +1,64 @@ +package main + +//This solution is the placeholder of the student solution +// for an exercise in the exam asking for a Function +//Remember the disclaimer!!!! +//1) here the package is main +//2) It does need an empty func main(){} + +type NodeAddL struct { + Next *NodeAddL + Num int +} + +func pushBack(node *NodeAddL, num int) *NodeAddL { + nw := &NodeAddL{Num: num} + if node == nil { + return nw + } + for tmp := node; tmp != nil; tmp = tmp.Next { + if tmp.Next == nil { + tmp.Next = nw + return node + } + } + return node +} + +func Changeorder(node *NodeAddL) *NodeAddL { + if node == nil { + return node + } + ans := &NodeAddL{Num: node.Num} + for tmp := node; tmp != nil; { + tmp = tmp.Next + if tmp == nil { + break + } + tmp = tmp.Next + if tmp == nil { + break + } + ans = pushBack(ans, tmp.Num) + } + + if node.Next == nil { + return ans + } + for tmp := node.Next; tmp != nil; { + ans = pushBack(ans, tmp.Num) + tmp = tmp.Next + if tmp == nil { + break + } + tmp = tmp.Next + if tmp == nil { + break + } + } + return ans +} + +func main() { + +} diff --git a/tests/go/solutions/checkfile.go b/tests/go/solutions/checkfile.go new file mode 100644 index 00000000..ab5b79a0 --- /dev/null +++ b/tests/go/solutions/checkfile.go @@ -0,0 +1,15 @@ +package solutions + +import ( + "os" + "testing" +) + +//function to check if the file exists in a given path +func CheckFile(t *testing.T, path string) { + _, err := os.Stat(path) + + if err != nil { + t.Errorf(err.Error()) + } +} diff --git a/tests/go/solutions/chunk.go b/tests/go/solutions/chunk.go new file mode 100644 index 00000000..feb4101a --- /dev/null +++ b/tests/go/solutions/chunk.go @@ -0,0 +1,20 @@ +package solutions + +import "fmt" + +func Chunk(arr []int, ch int) { + slice := []int{} + if ch <= 0 { + fmt.Println() + return + } + result := make([][]int, 0, len(arr)/ch+1) + for len(arr) >= ch { + slice, arr = arr[:ch], arr[ch:] + result = append(result, slice) + } + if len(arr) > 0 { + result = append(result, arr[:len(arr)]) + } + fmt.Println(result) +} diff --git a/tests/go/solutions/chunk/chunk_test.go b/tests/go/solutions/chunk/chunk_test.go new file mode 100644 index 00000000..4bfa9914 --- /dev/null +++ b/tests/go/solutions/chunk/chunk_test.go @@ -0,0 +1,42 @@ +package main + +import ( + "testing" + + solutions "../../solutions" + "github.com/01-edu/z01" +) + +func randomSize() []int { + randSlice := []int{} + for i := 0; i <= z01.RandIntBetween(0, 20); i++ { + randSlice = append(randSlice, z01.RandInt()) + } + return randSlice +} + +func TestChunk(t *testing.T) { + type node struct { + slice []int + ch int + } + table := []node{} + + for i := 0; i <= 7; i++ { + value := node{ + slice: randomSize(), + ch: z01.RandIntBetween(0, 10), + } + table = append(table, value) + } + table = append(table, node{ + slice: []int{}, + ch: 0, + }, node{ + slice: []int{1, 2, 3, 4, 5, 6, 7, 8}, + ch: 0, + }) + for _, args := range table { + z01.Challenge(t, Chunk, solutions.Chunk, args.slice, args.ch) + } +} diff --git a/tests/go/solutions/chunk/main.go b/tests/go/solutions/chunk/main.go new file mode 100644 index 00000000..f1d35492 --- /dev/null +++ b/tests/go/solutions/chunk/main.go @@ -0,0 +1,24 @@ +package main + +import "fmt" + +func Chunk(slice []int, size int) { + newSlice := []int{} + if size <= 0 { + fmt.Println() + return + } + result := make([][]int, 0, len(slice)/size+1) + for len(slice) >= size { + newSlice, slice = slice[:size], slice[size:] + result = append(result, newSlice) + } + if len(slice) > 0 { + result = append(result, slice[:len(slice)]) + } + fmt.Println(result) +} + +func main() { + +} diff --git a/tests/go/solutions/cleanstr/cleanstr_test.go b/tests/go/solutions/cleanstr/cleanstr_test.go new file mode 100644 index 00000000..25db3efa --- /dev/null +++ b/tests/go/solutions/cleanstr/cleanstr_test.go @@ -0,0 +1,24 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestCleanStr(t *testing.T) { + args := []string{"you see it's easy to display the same thing", + " only it's harder ", + "how funny", + "", + z01.RandSpace(), + } + + for _, v := range args { + z01.ChallengeMainExam(t, v) + } + + arg1 := []string{"this is not", "happening"} + + z01.ChallengeMainExam(t, arg1...) +} diff --git a/tests/go/solutions/cleanstr/main.go b/tests/go/solutions/cleanstr/main.go new file mode 100644 index 00000000..3135382a --- /dev/null +++ b/tests/go/solutions/cleanstr/main.go @@ -0,0 +1,16 @@ +package main + +import ( + "fmt" + "os" + "regexp" + "strings" +) + +func main() { + if len(os.Args) == 2 { + re := regexp.MustCompile(`( +)`) + fmt.Print(re.ReplaceAllString(strings.Trim(os.Args[1], " "), " ")) + } + fmt.Println() +} diff --git a/tests/go/solutions/collatzcountdown.go b/tests/go/solutions/collatzcountdown.go new file mode 100644 index 00000000..a0e8b490 --- /dev/null +++ b/tests/go/solutions/collatzcountdown.go @@ -0,0 +1,20 @@ +package solutions + +func CollatzCountdown(start int) int { + if start <= 0 { + return -1 + } + + steps := 0 + + for start != 1 { + if start%2 == 0 { + start = start / 2 + } else { + start = 3*start + 1 + } + steps++ + } + + return steps +} diff --git a/tests/go/solutions/comcheck/main.go b/tests/go/solutions/comcheck/main.go new file mode 100644 index 00000000..b3084b56 --- /dev/null +++ b/tests/go/solutions/comcheck/main.go @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "os" +) + +func main() { + safeWords := []string{"01", "galaxy", "galaxy 01"} + count := 0 + for i := 1; i < len(os.Args); i++ { + for _, s := range safeWords { + if os.Args[i] == s { + count++ + } + } + } + if count == 1 || count == 2 { + fmt.Println("Alert!!!") + } +} diff --git a/tests/go/solutions/compact.go b/tests/go/solutions/compact.go new file mode 100644 index 00000000..dd61f3b3 --- /dev/null +++ b/tests/go/solutions/compact.go @@ -0,0 +1,14 @@ +package solutions + +func Compact(slice *[]string) int { + count := 0 + var compacted []string + for _, v := range *slice { + if v != "" { + count++ + compacted = append(compacted, v) + } + } + *slice = compacted + return count +} diff --git a/tests/go/solutions/compare.go b/tests/go/solutions/compare.go new file mode 100644 index 00000000..4a096ee6 --- /dev/null +++ b/tests/go/solutions/compare.go @@ -0,0 +1,9 @@ +package solutions + +import ( + "strings" +) + +func Compare(s string, toCompare string) int { + return strings.Compare(s, toCompare) +} diff --git a/tests/go/solutions/comparenode.go b/tests/go/solutions/comparenode.go new file mode 100644 index 00000000..6e587ded --- /dev/null +++ b/tests/go/solutions/comparenode.go @@ -0,0 +1,33 @@ +// +build ignore + +package solutions + +import ( + "testing" + + student "../student" +) + +func CompareNode(t *testing.T, a *solutions.TreeNode, b *student.TreeNode) { + if a != nil && b != nil { + if a.Data != b.Data { + t.Errorf("expected %s instead of %s\n", + a.Data, + b.Data, + ) + CompareNode(t, a.Parent, b.Parent) + CompareNode(t, a.Left, b.Left) + CompareNode(t, a.Right, b.Right) + } + } else if a != nil && b == nil { + t.Errorf("expected %s instead of %v\n", + a.Data, + b, + ) + } else if a == nil && b != nil { + t.Errorf("expected %v instead of %v\n", + a, + b.Data, + ) + } +} diff --git a/tests/go/solutions/compareprog/compareprog_test.go b/tests/go/solutions/compareprog/compareprog_test.go new file mode 100644 index 00000000..3a9521d6 --- /dev/null +++ b/tests/go/solutions/compareprog/compareprog_test.go @@ -0,0 +1,51 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestCompareProg(t *testing.T) { + type node struct { + s string + toCompare string + } + + table := []node{} + + // the first 7 values are returning 0 for this test + for i := 0; i < 7; i++ { + wordToTest := z01.RandASCII() + + val := node{ + s: wordToTest, + toCompare: wordToTest, + } + table = append(table, val) + } + + // the next 7 values are supposed to return 1 or -1 for this test + for i := 0; i < 7; i++ { + wordToTest := z01.RandASCII() + wrongMatch := z01.RandASCII() + + val := node{ + s: wordToTest, + toCompare: wrongMatch, + } + table = append(table, val) + + } + // those are the test values from the README examples + table = append(table, + node{s: "Hello!", toCompare: "Hello!"}, + node{s: "Salut!", toCompare: "lut!"}, + node{s: "Ola!", toCompare: "Ol"}, + ) + for _, arg := range table { + z01.ChallengeMainExam(t, arg.s, arg.toCompare) + } + z01.ChallengeMainExam(t) + z01.ChallengeMainExam(t, "1 arg", "2args", "3args") +} diff --git a/tests/go/solutions/compareprog/main.go b/tests/go/solutions/compareprog/main.go new file mode 100644 index 00000000..1a9c48d9 --- /dev/null +++ b/tests/go/solutions/compareprog/main.go @@ -0,0 +1,20 @@ +package main + +import ( + "fmt" + "os" + "strings" +) + +func main() { + if len(os.Args) == 3 { + fmt.Println(compare(os.Args[1], os.Args[2])) + } else { + fmt.Println() + } +} + +func compare(s string, toCompare string) int { + result := strings.Compare(s, toCompare) + return result +} diff --git a/tests/go/solutions/comparereturn.go b/tests/go/solutions/comparereturn.go new file mode 100644 index 00000000..cc9c7b69 --- /dev/null +++ b/tests/go/solutions/comparereturn.go @@ -0,0 +1,36 @@ +// +build ignore + +package solutions + +import ( + "reflect" + "testing" + + "github.com/01-edu/z01" + + student "../student" +) + +func CompareReturn(t *testing.T, fn1, fn2, arg1, arg2 interface{}) { + arar1 := []interface{}{arg1} + arar2 := []interface{}{arg2} + + out1 := z01.Monitor(fn1, arar1) + out2 := z01.Monitor(fn2, arar2) + + for i, v := range out1.Results { + switch str := v.(type) { + case *solutions.TreeNode: + CompareNode(t, str, out2.Results[i].(*student.TreeNode)) + default: + if !reflect.DeepEqual(str, out2.Results[i]) { + t.Errorf("%s(%s) == %s instead of %s\n", + z01.NameOfFunc(fn1), + z01.Format(arg1), + z01.Format(out1.Results...), + z01.Format(out2.Results...), + ) + } + } + } +} diff --git a/tests/go/solutions/comparetrees.go b/tests/go/solutions/comparetrees.go new file mode 100644 index 00000000..85a95fa9 --- /dev/null +++ b/tests/go/solutions/comparetrees.go @@ -0,0 +1,23 @@ +// +build ignore + +package solutions + +import ( + student "../student" + "testing" +) + +func CompareTrees(root *solutions.TreeNode, rootS *student.TreeNode, t *testing.T) { + if root != nil && rootS != nil { + CompareTrees(root.Left, rootS.Left, t) + CompareTrees(root.Right, rootS.Right, t) + if root.Data != rootS.Data { + t.Errorf("BTreeInsertData(%v), node == %v instead of %v ", + root.Data, root.Data, rootS.Data) + } + } else if root != nil && rootS == nil { + t.Errorf("BTreeInsertData(%v), node == %v instead of %v ", root, root, rootS) + } else if root == nil && rootS != nil { + t.Errorf("BTreeInsertData(%v), node == %v instead of %v ", root, root, rootS) + } +} diff --git a/tests/go/solutions/concat.go b/tests/go/solutions/concat.go new file mode 100644 index 00000000..1dd882dc --- /dev/null +++ b/tests/go/solutions/concat.go @@ -0,0 +1,5 @@ +package solutions + +func Concat(a, b string) string { + return a + b +} diff --git a/tests/go/solutions/concatparams.go b/tests/go/solutions/concatparams.go new file mode 100644 index 00000000..feaf3bc8 --- /dev/null +++ b/tests/go/solutions/concatparams.go @@ -0,0 +1,9 @@ +package solutions + +import ( + "strings" +) + +func ConcatParams(args []string) string { + return strings.Join(args, "\n") +} diff --git a/tests/go/solutions/convertbase.go b/tests/go/solutions/convertbase.go new file mode 100644 index 00000000..0e9636b6 --- /dev/null +++ b/tests/go/solutions/convertbase.go @@ -0,0 +1,22 @@ +package solutions + +func ConvertNbrBase(n int, base string) string { + var result string + length := len(base) + + for n >= length { + result = string(base[(n%length)]) + result + n = n / length + } + result = string(base[n]) + result + + return result +} + +func ConvertBase(nbr, baseFrom, baseTo string) string { + resultIntermediary := AtoiBase(nbr, baseFrom) + + resultFinal := ConvertNbrBase(resultIntermediary, baseTo) + + return resultFinal +} diff --git a/tests/go/solutions/costumeprofit/costumeprofit_test.go b/tests/go/solutions/costumeprofit/costumeprofit_test.go new file mode 100644 index 00000000..3251a964 --- /dev/null +++ b/tests/go/solutions/costumeprofit/costumeprofit_test.go @@ -0,0 +1,37 @@ +package main + +import ( + "strconv" + "testing" + + "github.com/01-edu/z01" +) + +type node struct { + A, B, C, D, E, F int +} + +func TestCostumeProfit(t *testing.T) { + + table := []node{} + + for i := 0; i < 25; i++ { + a := z01.RandIntBetween(0, 1000) + b := z01.RandIntBetween(0, 1000) + c := z01.RandIntBetween(0, 1000) + d := z01.RandIntBetween(0, 1000) + e := z01.RandIntBetween(0, 1000) + f := z01.RandIntBetween(0, 1000) + table = append(table, node{a, b, c, d, e, f}) + } + + for _, arg := range table { + a := strconv.Itoa(arg.A) + b := strconv.Itoa(arg.B) + c := strconv.Itoa(arg.C) + d := strconv.Itoa(arg.D) + e := strconv.Itoa(arg.E) + f := strconv.Itoa(arg.F) + z01.ChallengeMainExam(t, a, b, c, d, e, f) + } +} diff --git a/tests/go/solutions/costumeprofit/main.go b/tests/go/solutions/costumeprofit/main.go new file mode 100644 index 00000000..cc8fe764 --- /dev/null +++ b/tests/go/solutions/costumeprofit/main.go @@ -0,0 +1,62 @@ +package main + +import ( + "fmt" + "os" + "strconv" +) + +//This solution is the comparing file of the staff +// Because the solution is a function, +// +//1) here the package is solutions +//2) it does not need an empty func main(){} +//3) its location is 1 level below the folder of the nauuo_test.go file + +func min(numbers ...int) int { + minVal := numbers[0] + for i := 0; i < len(numbers); i++ { + if numbers[i] < minVal { + minVal = numbers[i] + } + } + return minVal +} + +func max(numbers ...int) int { + maxVal := numbers[0] + for i := 0; i < len(numbers); i++ { + if numbers[i] > maxVal { + maxVal = numbers[i] + } + } + return maxVal +} + +func Costume_profit(a, b, c, d, e, f int) int { + if d == min(a, b, c, d) { + return d * max(e, f) + } + if e > f { + ans := min(a, d) * e + d -= min(a, d) + ans += min(d, b, c) * f + return ans + } + ans := min(b, c, d) * f + d -= min(b, c, d) + ans += min(a, d) * e + return ans +} + +func main() { + args := os.Args[1:] + a, _ := strconv.Atoi(args[0]) + b, _ := strconv.Atoi(args[1]) + c, _ := strconv.Atoi(args[2]) + d, _ := strconv.Atoi(args[3]) + e, _ := strconv.Atoi(args[4]) + f, _ := strconv.Atoi(args[5]) + + fmt.Println(Costume_profit(a, b, c, d, e, f)) +} diff --git a/tests/go/solutions/countdown/countdown_test.go b/tests/go/solutions/countdown/countdown_test.go new file mode 100644 index 00000000..f88c6920 --- /dev/null +++ b/tests/go/solutions/countdown/countdown_test.go @@ -0,0 +1,11 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestCountdown(t *testing.T) { + z01.ChallengeMainExam(t) +} diff --git a/tests/go/solutions/countdown/main.go b/tests/go/solutions/countdown/main.go new file mode 100644 index 00000000..ac44c1f8 --- /dev/null +++ b/tests/go/solutions/countdown/main.go @@ -0,0 +1,13 @@ +package main + +import "fmt" + +func main() { + count := 9 + for count != -1 { + + fmt.Print(count) + count-- + } + fmt.Println() +} diff --git a/tests/go/solutions/countif.go b/tests/go/solutions/countif.go new file mode 100644 index 00000000..7c24ea4c --- /dev/null +++ b/tests/go/solutions/countif.go @@ -0,0 +1,14 @@ +package solutions + +func CountIf(f func(string) bool, arr []string) int { + + counter := 0 + for _, el := range arr { + if f(el) { + counter++ + } + } + + return counter + +} diff --git a/tests/go/solutions/createElem.go b/tests/go/solutions/createElem.go new file mode 100644 index 00000000..abddb9bf --- /dev/null +++ b/tests/go/solutions/createElem.go @@ -0,0 +1,9 @@ +package solutions + +type Node struct { + Data int +} + +func CreateElem(n *Node, value int) { + n.Data = value +} diff --git a/tests/go/solutions/displaya/displaya_test.go b/tests/go/solutions/displaya/displaya_test.go new file mode 100644 index 00000000..396899aa --- /dev/null +++ b/tests/go/solutions/displaya/displaya_test.go @@ -0,0 +1,21 @@ +package main + +import ( + "strings" + "testing" + + "github.com/01-edu/z01" +) + +func TestDisplaya(t *testing.T) { + 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.ChallengeMainExam(t, "1", "a") +} diff --git a/tests/go/solutions/displaya/main.go b/tests/go/solutions/displaya/main.go new file mode 100644 index 00000000..1ba1bc69 --- /dev/null +++ b/tests/go/solutions/displaya/main.go @@ -0,0 +1,9 @@ +package main + +import ( + "fmt" +) + +func main() { + fmt.Println("a") +} diff --git a/tests/go/solutions/displayalpham/displayalpham_test.go b/tests/go/solutions/displayalpham/displayalpham_test.go new file mode 100644 index 00000000..23bdd194 --- /dev/null +++ b/tests/go/solutions/displayalpham/displayalpham_test.go @@ -0,0 +1,11 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestDisplayAlphaM(t *testing.T) { + z01.ChallengeMainExam(t) +} diff --git a/tests/go/solutions/displayalpham/main.go b/tests/go/solutions/displayalpham/main.go new file mode 100644 index 00000000..6ff98ea4 --- /dev/null +++ b/tests/go/solutions/displayalpham/main.go @@ -0,0 +1,17 @@ +package main + +import ( + "github.com/01-edu/z01" +) + +func main() { + dif := 'a' - 'A' + for c := 'a'; c <= 'z'; c++ { + if c%2 == 0 { + z01.PrintRune(c - dif) + } else { + z01.PrintRune(c) + } + } + z01.PrintRune('\n') +} diff --git a/tests/go/solutions/displayalrevm/displayalrevm_test.go b/tests/go/solutions/displayalrevm/displayalrevm_test.go new file mode 100644 index 00000000..0fdbe703 --- /dev/null +++ b/tests/go/solutions/displayalrevm/displayalrevm_test.go @@ -0,0 +1,11 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestDisplayAlRevM(t *testing.T) { + z01.ChallengeMainExam(t) +} diff --git a/tests/go/solutions/displayalrevm/main.go b/tests/go/solutions/displayalrevm/main.go new file mode 100644 index 00000000..f98d80ea --- /dev/null +++ b/tests/go/solutions/displayalrevm/main.go @@ -0,0 +1,17 @@ +package main + +import ( + "github.com/01-edu/z01" +) + +func main() { + dif := 'a' - 'A' + for c := 'z'; c >= 'a'; c-- { + if c%2 == 0 { + z01.PrintRune(c) + } else { + z01.PrintRune(c - dif) + } + } + z01.PrintRune('\n') +} diff --git a/tests/go/solutions/displayfile/main.go b/tests/go/solutions/displayfile/main.go new file mode 100644 index 00000000..cd67714e --- /dev/null +++ b/tests/go/solutions/displayfile/main.go @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "io/ioutil" + "os" +) + +func main() { + + if len(os.Args) < 2 { + fmt.Println("File name missing") + return + } + if len(os.Args) > 2 { + fmt.Println("Too many arguments") + return + } + fileName := os.Args[1] + + data, err := ioutil.ReadFile(fileName) + + if err != nil { + fmt.Println(err.Error()) + return + } + + fmt.Println(string(data)) +} diff --git a/tests/go/solutions/displayfile/quest8.txt b/tests/go/solutions/displayfile/quest8.txt new file mode 100644 index 00000000..dd4be06d --- /dev/null +++ b/tests/go/solutions/displayfile/quest8.txt @@ -0,0 +1 @@ +Almost there!! diff --git a/tests/go/solutions/displayfirstparam/displayfirstparam_test.go b/tests/go/solutions/displayfirstparam/displayfirstparam_test.go new file mode 100644 index 00000000..15c8a8b7 --- /dev/null +++ b/tests/go/solutions/displayfirstparam/displayfirstparam_test.go @@ -0,0 +1,19 @@ +package main + +import ( + "strings" + "testing" + + "github.com/01-edu/z01" +) + +func TestDisplayFirstParam(t *testing.T) { + 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)...) + } +} diff --git a/tests/go/solutions/displayfirstparam/main.go b/tests/go/solutions/displayfirstparam/main.go new file mode 100644 index 00000000..0555cf90 --- /dev/null +++ b/tests/go/solutions/displayfirstparam/main.go @@ -0,0 +1,12 @@ +package main + +import ( + "fmt" + "os" +) + +func main() { + if len(os.Args) > 1 { + fmt.Println(os.Args[1]) + } +} diff --git a/tests/go/solutions/displaylastparam/displaylastparam_test.go b/tests/go/solutions/displaylastparam/displaylastparam_test.go new file mode 100644 index 00000000..11a6d113 --- /dev/null +++ b/tests/go/solutions/displaylastparam/displaylastparam_test.go @@ -0,0 +1,18 @@ +package main + +import ( + "strings" + "testing" + + "github.com/01-edu/z01" +) + +func TestDisplayLastParam(t *testing.T) { + table := append(z01.MultRandWords(), " ") + table = append(table, "1") + table = append(table, "1 2") + + for _, s := range table { + z01.ChallengeMainExam(t, strings.Fields(s)...) + } +} diff --git a/tests/go/solutions/displaylastparam/main.go b/tests/go/solutions/displaylastparam/main.go new file mode 100644 index 00000000..6c52acc2 --- /dev/null +++ b/tests/go/solutions/displaylastparam/main.go @@ -0,0 +1,13 @@ +package main + +import ( + "fmt" + "os" +) + +func main() { + size := len(os.Args) + if size > 1 { + fmt.Println(os.Args[size-1]) + } +} diff --git a/tests/go/solutions/displayz/displayz_test.go b/tests/go/solutions/displayz/displayz_test.go new file mode 100644 index 00000000..22e5ea98 --- /dev/null +++ b/tests/go/solutions/displayz/displayz_test.go @@ -0,0 +1,21 @@ +package main + +import ( + "strings" + "testing" + + "github.com/01-edu/z01" +) + +func TestDisplayz(t *testing.T) { + 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.ChallengeMainExam(t, "1", "z") +} diff --git a/tests/go/solutions/displayz/main.go b/tests/go/solutions/displayz/main.go new file mode 100644 index 00000000..425e87bc --- /dev/null +++ b/tests/go/solutions/displayz/main.go @@ -0,0 +1,9 @@ +package main + +import ( + "fmt" +) + +func main() { + fmt.Println("z") +} diff --git a/tests/go/solutions/divmod.go b/tests/go/solutions/divmod.go new file mode 100644 index 00000000..90e805d6 --- /dev/null +++ b/tests/go/solutions/divmod.go @@ -0,0 +1,6 @@ +package solutions + +func DivMod(a, b int, div, mod *int) { + *div = a / b + *mod = a % b +} diff --git a/tests/go/solutions/doop/main.go b/tests/go/solutions/doop/main.go new file mode 100644 index 00000000..b3667d3d --- /dev/null +++ b/tests/go/solutions/doop/main.go @@ -0,0 +1,57 @@ +package main + +import ( + "fmt" + "os" + "strconv" +) + +func main() { + if len(os.Args) == 4 { + var result int + firstArg, err := strconv.Atoi(os.Args[1]) + if err != nil { + fmt.Println(0) + return + } + + operator := os.Args[2] + secondArg, err1 := strconv.Atoi(os.Args[3]) + + if err1 != nil { + fmt.Println(0) + return + } + + if secondArg == 0 && operator == "/" { + fmt.Println("No division by 0") + return + } else if secondArg == 0 && operator == "%" { + fmt.Println("No modulo by 0") + return + } else if operator == "+" { + result = firstArg + secondArg + if !((result > firstArg) == (secondArg > 0)) { + fmt.Println(0) + return + } + } else if operator == "-" { + result = firstArg - secondArg + if !((result < firstArg) == (secondArg > 0)) { + fmt.Println(0) + return + } + } else if operator == "/" { + result = firstArg / secondArg + } else if operator == "*" { + result = firstArg * secondArg + if firstArg != 0 && (result/firstArg != secondArg) { + fmt.Println(0) + return + } + } else if operator == "%" { + result = firstArg % secondArg + } + fmt.Println(result) + } +} diff --git a/tests/go/solutions/doopprog/doopprog_test.go b/tests/go/solutions/doopprog/doopprog_test.go new file mode 100644 index 00000000..fa0e4750 --- /dev/null +++ b/tests/go/solutions/doopprog/doopprog_test.go @@ -0,0 +1,45 @@ +package main + +import ( + "strings" + "testing" + + "strconv" + + "github.com/01-edu/z01" +) + +func TestDoopProg(t *testing.T) { + + operatorsTable := []string{"+", "-", "*", "/", "%"} + + table := []string{} + + for i := 0; i < 4; i++ { + firstArg := strconv.Itoa(z01.RandIntBetween(-1000, 1000)) + secondArg := strconv.Itoa(z01.RandIntBetween(0, 1000)) + + for _, operator := range operatorsTable { + table = append(table, firstArg+" "+operator+" "+secondArg) + + } + } + + table = append(table, "1 + 1") + table = append(table, "hello + 1") + table = append(table, "1 p 1") + table = append(table, "1 # 1") + table = append(table, "1 / 0") + table = append(table, "1 % 0") + table = append(table, "1 * 1") + table = append(table, "1argument") + table = append(table, "2 arguments") + table = append(table, "4 arguments so invalid") + table = append(table, "9223372036854775807 + 1") + table = append(table, "9223372036854775809 - 3") + table = append(table, "9223372036854775807 * 3") + + for _, s := range table { + z01.ChallengeMainExam(t, strings.Fields(s)...) + } +} diff --git a/tests/go/solutions/doopprog/main.go b/tests/go/solutions/doopprog/main.go new file mode 100644 index 00000000..7c887600 --- /dev/null +++ b/tests/go/solutions/doopprog/main.go @@ -0,0 +1,58 @@ +package main + +import ( + "fmt" + "os" + "strconv" +) + +func main() { + if len(os.Args) == 4 { + var result int + firstArg, err := strconv.Atoi(os.Args[1]) + + if err != nil { + fmt.Println(0) + return + } + + operator := os.Args[2] + secondArg, err1 := strconv.Atoi(os.Args[3]) + + if err1 != nil { + fmt.Println(0) + return + } + + if secondArg == 0 && operator == "/" { + fmt.Println("No division by 0") + return + } else if secondArg == 0 && operator == "%" { + fmt.Println("No modulo by 0") + return + } else if operator == "+" { + result = firstArg + secondArg + if !((result > firstArg) == (secondArg > 0)) { + fmt.Println(0) + return + } + } else if operator == "-" { + result = firstArg - secondArg + if !((result < firstArg) == (secondArg > 0)) { + fmt.Println(0) + return + } + } else if operator == "/" { + result = firstArg / secondArg + } else if operator == "*" { + result = firstArg * secondArg + if firstArg != 0 && (result/firstArg != secondArg) { + fmt.Println(0) + return + } + } else if operator == "%" { + result = firstArg % secondArg + } + fmt.Println(result) + } +} diff --git a/tests/go/solutions/doppelganger.go b/tests/go/solutions/doppelganger.go new file mode 100644 index 00000000..2a233d71 --- /dev/null +++ b/tests/go/solutions/doppelganger.go @@ -0,0 +1,12 @@ +package solutions + +import ( + "strings" +) + +func DoppelGanger(big, little string) int { + if little == "" { + return -1 + } + return strings.LastIndex(big, little) +} diff --git a/tests/go/solutions/doppelgangerprog/doppelgangerprog_test.go b/tests/go/solutions/doppelgangerprog/doppelgangerprog_test.go new file mode 100644 index 00000000..cc4c4ee8 --- /dev/null +++ b/tests/go/solutions/doppelgangerprog/doppelgangerprog_test.go @@ -0,0 +1,53 @@ +package main + +import ( + "testing" + + solutions "../../solutions" + "github.com/01-edu/z01" +) + +type node struct { + big, little string +} + +func TestDoppelGanger(t *testing.T) { + table := []node{} + + table = append(table, + node{"aaaaaaa", "a"}, + node{"qwerty", "t"}, + node{"a", "b"}, + ) + + for i := 0; i < 10; i++ { + l := z01.RandIntBetween(5, 30) + big := z01.RandStr(l, "qwertyuiopasdfghjklzxcvbnm") + start := z01.RandIntBetween(0, l-1) + end := z01.RandIntBetween(start+1, l-1) + little := big[start:end] + + value := node{ + big: big, + little: little, + } + + table = append(table, value) + } + + for i := 0; i < 10; i++ { + big := z01.RandStr(z01.RandIntBetween(5, 30), "qwertyuiopasdfghjklzxcvbnm") + little := z01.RandStr(z01.RandIntBetween(1, 29), "qwertyuiopasdfghjklzxcvbnm") + + value := node{ + big: big, + little: little, + } + + table = append(table, value) + } + + for _, arg := range table { + z01.Challenge(t, DoppelGanger, solutions.DoppelGanger, arg.big, arg.little) + } +} diff --git a/tests/go/solutions/doppelgangerprog/main.go b/tests/go/solutions/doppelgangerprog/main.go new file mode 100644 index 00000000..c71f3314 --- /dev/null +++ b/tests/go/solutions/doppelgangerprog/main.go @@ -0,0 +1,16 @@ +package main + +import ( + "strings" +) + +func DoppelGanger(big, little string) int { + if little == "" { + return -1 + } + return strings.LastIndex(big, little) +} + +func main() { + +} diff --git a/tests/go/solutions/eightqueens.go b/tests/go/solutions/eightqueens.go new file mode 100644 index 00000000..833faab7 --- /dev/null +++ b/tests/go/solutions/eightqueens.go @@ -0,0 +1,86 @@ +package solutions + +import ( + "github.com/01-edu/z01" +) + +const size = 8 + +// board is a chessboard composed of boolean squares, a true square means a queen is on it +// a false square means it is a free square +var board [size][size]bool + +// goodDirection check that there is no queen on the segment that starts at (x, y) +// coordinates, points into the direction vector (vx, vy) and ends at the edge of the board +func goodDirection(x, y, vx, vy int) bool { + // x and y are still on board + for 0 <= x && x < size && + 0 <= y && y < size { + if board[x][y] { + // Not a good line : the square is already occupied + return false + } + x = x + vx // Move x in the right direction + y = y + vy // Move y in the right direction + } + // All clear + return true +} + +// goodSquare makes all the necessary line checks for the queens movements +func goodSquare(x, y int) bool { + return goodDirection(x, y, +0, -1) && + goodDirection(x, y, +1, -1) && + goodDirection(x, y, +1, +0) && + goodDirection(x, y, +1, +1) && + goodDirection(x, y, +0, +1) && + goodDirection(x, y, -1, +1) && + goodDirection(x, y, -1, +0) && + goodDirection(x, y, -1, -1) +} + +func printQueens() { + x := 0 + for x < size { + y := 0 + for y < size { + if board[x][y] { + // We have found a queen, let's print her y + z01.PrintRune(rune(y) + '1') + } + y++ + } + x++ + } + z01.PrintRune('\n') +} + +// tryX tries, for a given x (column) to find a y (row) so that the queen on (x, y) is a part +// of the solution to the problem +func tryX(x int) { + y := 0 + for y < size { + if goodSquare(x, y) { + // Since the square is good for the queen, let's put one on it: + board[x][y] = true + + if x == size-1 { + // x is the biggest possible x, it means that we just placed the last + // queen on the board, so the solution is complete and we can print it + printQueens() + } else { + // let's try to put another queen on the next empty x (column) + tryX(x + 1) + } + + // remove the queen of the board, to try other y values + board[x][y] = false + } + y++ + } +} + +func EightQueens() { + // try the first column + tryX(0) +} diff --git a/tests/go/solutions/enigma.go b/tests/go/solutions/enigma.go new file mode 100644 index 00000000..7d868e5f --- /dev/null +++ b/tests/go/solutions/enigma.go @@ -0,0 +1,23 @@ +package solutions + +//this function will put a in c; c in d; d in b and b in a +func Enigma(a ***int, b *int, c *******int, d ****int) { + valc := *******c + *******c = ***a + vald := ****d + ****d = valc + valb := *b + *b = vald + ***a = valb +} + +//Helper function used in the test for checking the function Enigma() +func Decript(a ***int, b *int, c *******int, d ****int) { + vala := ***a + ***a = *******c + valb := *b + *b = vala + vald := ****d + ****d = valb + *******c = vald +} diff --git a/tests/go/solutions/expandstr/expandstr_test.go b/tests/go/solutions/expandstr/expandstr_test.go new file mode 100644 index 00000000..4fd81958 --- /dev/null +++ b/tests/go/solutions/expandstr/expandstr_test.go @@ -0,0 +1,25 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestExpandStr(t *testing.T) { + arg1 := []string{"hello", "you"} + arg2 := []string{" only it's harder "} + arg3 := []string{"you see it's easy to display the same thing"} + args := [][]string{arg1, arg2, arg3} + + // adding of 15 random valid tests + for i := 0; i < 15; i++ { + randomArg := []string{z01.RandWords()} + args = append(args, randomArg) + } + + for _, v := range args { + z01.ChallengeMainExam(t, v...) + } + z01.ChallengeMainExam(t) +} diff --git a/tests/go/solutions/expandstr/main.go b/tests/go/solutions/expandstr/main.go new file mode 100644 index 00000000..fbe1a284 --- /dev/null +++ b/tests/go/solutions/expandstr/main.go @@ -0,0 +1,34 @@ +package main + +import ( + "fmt" + "os" + "strings" +) + +func deleteExtraSpaces(arr []string) []string { + var res []string + for _, v := range arr { + if v != "" { + res = append(res, v) + } + } + return res +} + +func main() { + if len(os.Args) != 2 { + fmt.Println() + os.Exit(0) + } + + arg := strings.Split(os.Args[1], " ") + arg = deleteExtraSpaces(arg) + for i, v := range arg { + fmt.Print(v) + if i < len(arg)-1 { + fmt.Print(" ") + } + } + fmt.Println() +} diff --git a/tests/go/solutions/fib.go b/tests/go/solutions/fib.go new file mode 100644 index 00000000..1cca543e --- /dev/null +++ b/tests/go/solutions/fib.go @@ -0,0 +1,33 @@ +package solutions + +func rec(a, b, cnt int) int { + if a > b { + return -1 + } + if a == b { + // fmt.Printf("%d\n", cnt) + return cnt + } + if rec(a*2, b, cnt+1) != -1 { + return rec(a*2, b, cnt+1) + } + if rec(a*3, b, cnt+1) != -1 { + return rec(a*3, b, cnt+1) + } + return -1 +} + +func Fib(n int) int { + if n <= 0 { + return 0 + } + t1 := 0 + t2 := 1 + for i := 2; i <= n; i++ { + t1 = t1 + t2 + tmp := t1 + t1 = t2 + t2 = tmp + } + return t2 +} diff --git a/tests/go/solutions/fib/fib_test.go b/tests/go/solutions/fib/fib_test.go new file mode 100644 index 00000000..0bb226f7 --- /dev/null +++ b/tests/go/solutions/fib/fib_test.go @@ -0,0 +1,82 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" // This line is not necessary when testing an exercise with a program +) + +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) + + type node struct { + n int + } + + // Declaration of an empty array of type node{} + // note that in this case this is the easiest type of table to declare + // but a table can be of any other relevant type, (for example []string{}, []int{} if it + // were a single string tested or a single int) + + table := []node{} + // Initial filling of that array with the values I see in the examples of the subject + + table = append(table, + node{20}, + node{0}, + node{9}, + node{2}, + ) + + // If we were to leave the table as it is, a student could just do a program with 4 ifs and get + // "around" the goal of the exercise. We are now going to add 15 random tests using the z01 testing library + + for i := 0; i < 15; i++ { + value := node{ + n: z01.RandIntBetween(-100, 150), + //this z01.RandIntBetween function allows the randomization of + //the int for each value in a desired range. + //Note that they are many others of those functions for other types of data + //Do not hesitate to have a look at all of them https://github.com/01-edu/z01 + } + + //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" + //Because the exercise asks for a function we are now using the Challenge function (this function would + // be the ChallengeMainExam function) + + for _, arg := range table { + z01.Challenge(t, Fib, solutions.Fib, arg.n) + } + + // the z01.Challenge function is here applied to each argument of the table. It musts contains: + // 1) first, the t argument from the T structure imported from the package "testing" + // + // 2) second, the function from the student, in this case Nauuo + //(this disapears in the ChallengeMainExam function) + // 3) third, the function from the staff, in this case solutions.Nauuo + //(this disapears as well in the ChallengeMainExam function) + // 4) all the arguments to be tested, in this case it is the plus, minus and rand from each structure, + // notice that they are accessed with arg. (the arg notation comes from the way it was name in the + // range loop over the table) + + // Now that this is done. re-read the quickReadme (the test your test recap) and apply all the commands + // and intructions. We strongly advise to check that your error messages matches your subject. + // and that you ask a colleague to double check. + + //FINAL STEP: + // 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 new file mode 100644 index 00000000..789c8f20 --- /dev/null +++ b/tests/go/solutions/fib/main.go @@ -0,0 +1,37 @@ +package main + +func rec(a, b, cnt int) int { + if a > b { + return -1 + } + if a == b { + // fmt.Printf("%d\n", cnt) + return cnt + } + if rec(a*2, b, cnt+1) != -1 { + return rec(a*2, b, cnt+1) + } + if rec(a*3, b, cnt+1) != -1 { + return rec(a*3, b, cnt+1) + } + return -1 +} + +func Fib(n int) int { + if n <= 0 { + return 0 + } + t1 := 0 + t2 := 1 + for i := 2; i <= n; i++ { + t1 = t1 + t2 + tmp := t1 + t1 = t2 + t2 = tmp + } + return t2 +} + +func main() { + +} diff --git a/tests/go/solutions/fibonacci.go b/tests/go/solutions/fibonacci.go new file mode 100644 index 00000000..4eccf8ca --- /dev/null +++ b/tests/go/solutions/fibonacci.go @@ -0,0 +1,14 @@ +package solutions + +func Fibonacci(value int) int { + if value < 0 { + return -1 + } + if value == 0 { + return 0 + } + if value == 1 { + return 1 + } + return Fibonacci(value-1) + Fibonacci(value-2) +} diff --git a/tests/go/solutions/findnextprime.go b/tests/go/solutions/findnextprime.go new file mode 100644 index 00000000..a50c0698 --- /dev/null +++ b/tests/go/solutions/findnextprime.go @@ -0,0 +1,27 @@ +package solutions + +import ( + "math" +) + +func FindNextPrime(value int) int { + isPrime := func(value int) bool { + if value < 2 { + return false + } + limit := int(math.Floor(math.Sqrt(float64(value)))) + i := 2 + for i <= limit { + if value%i == 0 { + return false + } + i++ + } + return true + } + + if isPrime(value) { + return value + } + return FindNextPrime(value + 1) +} diff --git a/tests/go/solutions/findprevprime.go b/tests/go/solutions/findprevprime.go new file mode 100644 index 00000000..39130c67 --- /dev/null +++ b/tests/go/solutions/findprevprime.go @@ -0,0 +1,12 @@ +package solutions + +func FindPrevPrime(nbr int) int { + if nbr < 2 { + return 0 + } + if IsPrime(nbr) { + return nbr + } + return FindPrevPrime(nbr - 1) + +} diff --git a/tests/go/solutions/findprevprimeprog/findprevprimeprog_test.go b/tests/go/solutions/findprevprimeprog/findprevprimeprog_test.go new file mode 100644 index 00000000..10528079 --- /dev/null +++ b/tests/go/solutions/findprevprimeprog/findprevprimeprog_test.go @@ -0,0 +1,19 @@ +package main + +import ( + "testing" + + solutions "../../solutions" + "github.com/01-edu/z01" +) + +func TestFindPrevPrime(t *testing.T) { + array := []int{5, 4, 1} + for i := 0; i < 7; i++ { + array = append(array, z01.RandIntBetween(0, 99999)) + } + + for i := 0; i < len(array); i++ { + z01.Challenge(t, FindPrevPrime, solutions.FindPrevPrime, array[i]) + } +} diff --git a/tests/go/solutions/findprevprimeprog/main.go b/tests/go/solutions/findprevprimeprog/main.go new file mode 100644 index 00000000..8f734a19 --- /dev/null +++ b/tests/go/solutions/findprevprimeprog/main.go @@ -0,0 +1,30 @@ +package main + +func main(){ + +} + +func FindPrevPrime(nbr int) int { + if nbr < 2 { + return 0 + } + if IsPrime(nbr) { + return nbr + } + return FindPrevPrime(nbr - 1) + +} + +func IsPrime(nb int) bool { + + if nb <= 0 || nb == 1 { + return false + } + + for i := 2; i <= nb/2; i++ { + if nb%i == 0 { + return false + } + } + return true +} diff --git a/tests/go/solutions/firstrune.go b/tests/go/solutions/firstrune.go new file mode 100644 index 00000000..093287d5 --- /dev/null +++ b/tests/go/solutions/firstrune.go @@ -0,0 +1,6 @@ +package solutions + +func FirstRune(s string) rune { + runes := []rune(s) + return runes[0] +} diff --git a/tests/go/solutions/firstruneprog/firstruneprog_test.go b/tests/go/solutions/firstruneprog/firstruneprog_test.go new file mode 100644 index 00000000..42231482 --- /dev/null +++ b/tests/go/solutions/firstruneprog/firstruneprog_test.go @@ -0,0 +1,22 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" +) + +func TestFirstRuneProg(t *testing.T) { + table := append( + z01.MultRandASCII(), + "Hello!", + "Salut!", + "Ola!", + "♥01", + ) + for _, arg := range table { + z01.Challenge(t, FirstRune, solutions.FirstRune, arg) + } +} diff --git a/tests/go/solutions/firstruneprog/main.go b/tests/go/solutions/firstruneprog/main.go new file mode 100644 index 00000000..f9c6f667 --- /dev/null +++ b/tests/go/solutions/firstruneprog/main.go @@ -0,0 +1,9 @@ +package main + +func FirstRune(s string) rune { + runes := []rune(s) + return runes[0] +} + +func main() { +} diff --git a/tests/go/solutions/firstword/firstword_test.go b/tests/go/solutions/firstword/firstword_test.go new file mode 100644 index 00000000..b0afff17 --- /dev/null +++ b/tests/go/solutions/firstword/firstword_test.go @@ -0,0 +1,23 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestFirstWord(t *testing.T) { + table := append(z01.MultRandWords(), + "", + " a as", + " f d", + " asd ad", + ) + table = append(table, " salut !!! ") + table = append(table, " salut ! ! !") + table = append(table, "salut ! !") + + for _, s := range table { + z01.ChallengeMainExam(t, s) + } +} diff --git a/tests/go/solutions/firstword/main.go b/tests/go/solutions/firstword/main.go new file mode 100644 index 00000000..b4e83155 --- /dev/null +++ b/tests/go/solutions/firstword/main.go @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "os" + + "github.com/01-edu/z01" +) + +func main() { + if len(os.Args) == 2 { + for i := 0; i < len(os.Args[1]); i++ { + if os.Args[1][i] != ' ' { + z01.PrintRune(rune(os.Args[1][i])) + + if i != len(os.Args[1])-1 { + if os.Args[1][i+1] == ' ' { + z01.PrintRune('\n') + return + } + } + } + } + z01.PrintRune('\n') + } else { + fmt.Println() + } +} diff --git a/tests/go/solutions/fixthemain/main.go b/tests/go/solutions/fixthemain/main.go new file mode 100644 index 00000000..71eb7a61 --- /dev/null +++ b/tests/go/solutions/fixthemain/main.go @@ -0,0 +1,59 @@ +package main + +import "github.com/01-edu/z01" + +const CLOSE = 0 +const OPEN = 1 + +type Door struct { + State int +} + +func PrintStr(str string) { + arrayRune := []rune(str) + for _, s := range arrayRune { + z01.PrintRune(s) + } + z01.PrintRune('\n') +} + +func CloseDoor(ptrDoor *Door) { + PrintStr("Door Closing...") + ptrDoor.State = CLOSE +} + +func OpenDoor(ptrdoor *Door) { + PrintStr("Door Opening...") + ptrdoor.State = OPEN +} + +func IsDoorOpened(ptrDoor *Door) bool { + PrintStr("is the Door opened ?") + if ptrDoor.State == OPEN { + return true + } + return false +} + +func IsDoorClosed(ptrDoor *Door) bool { + PrintStr("is the Door closed ?") + if ptrDoor.State == CLOSE { + return true + } + return false +} + +func main() { + var door Door + + OpenDoor(&door) + if IsDoorClosed(&door) { + OpenDoor(&door) + } + if IsDoorOpened(&door) { + CloseDoor(&door) + } + if door.State == OPEN { + CloseDoor(&door) + } +} diff --git a/tests/go/solutions/flags/main.go b/tests/go/solutions/flags/main.go new file mode 100644 index 00000000..4330663c --- /dev/null +++ b/tests/go/solutions/flags/main.go @@ -0,0 +1,87 @@ +package main + +import ( + "fmt" + "os" + "sort" + "strings" +) + +type helpMs struct { + flag string + shortenFlag string + handler string +} + +type sortRunes []rune + +//to implement the sort for a []rune it is necessary to +//implement Lessm, Swap and Len functions for the sort interface +func (s sortRunes) Less(i, j int) bool { + return s[i] < s[j] +} + +func (s sortRunes) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} + +func (s sortRunes) Len() int { + return len(s) +} + +func obtainValues(value, strsplit string) string { + values := strings.Split(value, "=") + return values[len(values)-1] +} + +func setMs(flag, shortenFlag, handler string) *helpMs { + helpMs := &helpMs{ + flag: flag, + shortenFlag: shortenFlag, + handler: handler, + } + return helpMs +} + +func main() { + size := len(os.Args) + + if size == 1 || os.Args[1] == "-h" || os.Args[1] == "--help" { + table := []helpMs{} + + helpMs := setMs("--insert", "-i", "This flag inserts the string into the string passed as argument.") + table = append(table, *helpMs) + helpMs = setMs("--order", "-o", "This flag will behave like a boolean, if it is called it will order the argument.") + table = append(table, *helpMs) + + for _, v := range table { + fmt.Println(v.flag) + fmt.Println(" ", v.shortenFlag) + fmt.Println(" ", v.handler) + } + + } else if size <= 4 { + var str []rune + strToInsert := "" + var order bool + + for i := 1; i < size; i++ { + if strings.Contains(os.Args[i], "--insert") || strings.Contains(os.Args[i], "-i") { + strToInsert = obtainValues(os.Args[i], "=") + } else if strings.Contains(os.Args[i], "--order") || strings.Contains(os.Args[i], "-o") { + order = true + } else { + str = []rune(os.Args[i]) + } + } + if strToInsert != "" { + concatStr := string(str) + strToInsert + str = []rune(concatStr) + } + if order == true { + sort.Sort(sortRunes(str)) + } + + fmt.Println(string(str)) + } +} diff --git a/tests/go/solutions/foldint.go b/tests/go/solutions/foldint.go new file mode 100644 index 00000000..6291bc85 --- /dev/null +++ b/tests/go/solutions/foldint.go @@ -0,0 +1,13 @@ +package solutions + +import ( + "fmt" +) + +func FoldInt(f func(int, int) int, arr []int, n int) { + result := n + for _, v := range arr { + result = f(result, v) + } + fmt.Println(result) +} diff --git a/tests/go/solutions/foldint/foldint_test.go b/tests/go/solutions/foldint/foldint_test.go new file mode 100644 index 00000000..91f69b7d --- /dev/null +++ b/tests/go/solutions/foldint/foldint_test.go @@ -0,0 +1,60 @@ +package main + +import ( + "testing" + + solutions "../../solutions" + "github.com/01-edu/z01" +) + +func TestFoldInt(t *testing.T) { + f := []func(int, int) int{Add, Sub, Mul} + + type node struct { + arr []int + functions []func(int, int) int + n int + } + argInt := []int{} + table := []node{} + + for i := 0; i < 8; i++ { + argInt = append(argInt, z01.MultRandIntBetween(0, 50)...) + val := node{ + arr: argInt, + functions: f, + n: z01.RandIntBetween(0, 60), + } + table = append(table, val) + } + + table = append(table, node{ + arr: []int{1, 2, 3}, + functions: f, + n: 93, + }) + + table = append(table, node{ + arr: []int{0}, + functions: f, + n: 93, + }) + + for _, v := range table { + for _, f := range v.functions { + z01.Challenge(t, FoldInt, solutions.FoldInt, f, v.arr, v.n) + } + } +} + +func Add(accumulator, currentValue int) int { + return accumulator + currentValue +} + +func Sub(accumulator, currentValue int) int { + return accumulator - currentValue +} + +func Mul(accumulator, currentValue int) int { + return currentValue * accumulator +} diff --git a/tests/go/solutions/foldint/main.go b/tests/go/solutions/foldint/main.go new file mode 100644 index 00000000..84b28d10 --- /dev/null +++ b/tests/go/solutions/foldint/main.go @@ -0,0 +1,14 @@ +package main + +import "fmt" + +func FoldInt(f func(int, int) int, arr []int, n int) { + result := n + for _, v := range arr { + result = f(result, v) + } + fmt.Println(result) +} +func main() { + +} diff --git a/tests/go/solutions/foreach.go b/tests/go/solutions/foreach.go new file mode 100644 index 00000000..2462eb8f --- /dev/null +++ b/tests/go/solutions/foreach.go @@ -0,0 +1,33 @@ +package solutions + +import ( + "fmt" +) + +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 new file mode 100644 index 00000000..2159e04d --- /dev/null +++ b/tests/go/solutions/foreachprog/foreachprog_test.go @@ -0,0 +1,43 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" +) + +func TestForEachProg(t *testing.T) { + + functionsArray := []func(int){solutions.Add0, solutions.Add1, solutions.Add2, solutions.Add3} + + type node struct { + f func(int) + arr []int + } + + table := []node{} + + //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{ + f: solutions.Add0, + arr: []int{1, 2, 3, 4, 5, 6}, + }) + + for _, arg := range table { + z01.Challenge(t, ForEach, solutions.ForEach, arg.f, arg.arr) + } +} diff --git a/tests/go/solutions/foreachprog/main.go b/tests/go/solutions/foreachprog/main.go new file mode 100644 index 00000000..b4d9ef17 --- /dev/null +++ b/tests/go/solutions/foreachprog/main.go @@ -0,0 +1,37 @@ +package main + +import ( + "fmt" +) + +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/fprime_test.go b/tests/go/solutions/fprime/fprime_test.go new file mode 100644 index 00000000..5e06fcad --- /dev/null +++ b/tests/go/solutions/fprime/fprime_test.go @@ -0,0 +1,33 @@ +package main + +import ( + "strconv" + "strings" + "testing" + + "github.com/01-edu/z01" +) + +func TestFprime(t *testing.T) { + table := []string{} + for i := 0; i < 10; i++ { + table = append(table, strconv.Itoa(z01.RandIntBetween(1, 100))) + } + + table = append(table, " ") + table = append(table, "1") + table = append(table, "1 1") + table = append(table, "hello") + table = append(table, "p 1") + table = append(table, "804577") + table = append(table, "225225") + table = append(table, "8333325") + table = append(table, "42") + table = append(table, "9539") + table = append(table, "1000002") + table = append(table, "1000003") + + for _, s := range table { + z01.ChallengeMainExam(t, strings.Fields(s)...) + } +} diff --git a/tests/go/solutions/fprime/main.go b/tests/go/solutions/fprime/main.go new file mode 100644 index 00000000..86caef28 --- /dev/null +++ b/tests/go/solutions/fprime/main.go @@ -0,0 +1,39 @@ +package main + +import ( + "fmt" + "os" + "strconv" + + "github.com/01-edu/z01" +) + +func fprime(value int) { + if value != 1 { + divisionIterator := 2 + for value > 1 { + if value%divisionIterator == 0 { + fmt.Print(divisionIterator) + value = value / divisionIterator + + if value > 1 { + z01.PrintRune('*') + } + divisionIterator-- + } + divisionIterator++ + } + } + + z01.PrintRune('\n') +} + +func main() { + if len(os.Args) != 2 { + z01.PrintRune('\n') + } else { + par, _ := strconv.Atoi(os.Args[1]) + fprime(par) + } + +} diff --git a/tests/go/solutions/game23.go b/tests/go/solutions/game23.go new file mode 100644 index 00000000..f8e1df56 --- /dev/null +++ b/tests/go/solutions/game23.go @@ -0,0 +1,18 @@ +package solutions + +func Game23(a, b int) int { + if a > b { + return -1 + } + if a == b { + // fmt.Printf("%d\n", cnt) + return 0 + } + if Game23(a*2, b) != -1 { + return 1 + Game23(a*2, b) + } + if Game23(a*3, b) != -1 { + return 1 + Game23(a*3, b) + } + return -1 +} diff --git a/tests/go/solutions/game23/game23_test.go b/tests/go/solutions/game23/game23_test.go new file mode 100644 index 00000000..34663023 --- /dev/null +++ b/tests/go/solutions/game23/game23_test.go @@ -0,0 +1,121 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" // This line is not necessary when testing an exercise with a program +) + +func nd(a, b int) int { + if a > b { + return -1 + } + if a == b { + // fmt.Printf("%d\n", cnt) + return 0 + } + if nd(a*2, b) != -1 { + return 1 + nd(a*2, b) + } + if nd(a*3, b) != -1 { + return 1 + nd(a*3, b) + } + return -1 +} + +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) + + type node struct { + init int + fin int + } + + // Declaration of an empty array of type node{} + // note that in this case this is the easiest type of table to declare + // but a table can be of any other relevant type, (for example []string{}, []int{} if it + // were a single string tested or a single int) + + table := []node{} + // Initial filling of that array with the values I see in the examples of the subject + + table = append(table, + node{50, 43}, + node{13, 13}, + node{10, 9}, + node{5, 9}, + ) + + // If we were to leave the table as it is, a student could just do a program with 4 ifs and get + // "around" the goal of the exercise. We are now going to add 15 random tests using the z01 testing library + + for i := 0; i < 20; i++ { + value := node{ + init: z01.RandIntBetween(1, 1000), + fin: z01.RandIntBetween(1, 1000), + //this z01.RandIntBetween function allows the randomization of + //the int for each value in a desired range. + //Note that they are many others of those functions for other types of data + //Do not hesitate to have a look at all of them https://github.com/01-edu/z01 + } + + //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 i := 1; i < 100; i++ { + value := node{ + init: 1, + fin: 1, + } + if nd(1, i) > 0 { + value = node{ + init: 1, + fin: i, + } + //this z01.RandIntBetween function allows the randomization of + //the int for each value in a desired range. + //Note that they are many others of those functions for other types of data + //Do not hesitate to have a look at all of them https://github.com/01-edu/z01 + } + + //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" + //Because the exercise asks for a function we are now using the Challenge function (this function would + // be the ChallengeMainExam function) + + for _, arg := range table { + z01.Challenge(t, Game23, solutions.Game23, arg.init, arg.fin) + } + + // the z01.Challenge function is here applied to each argument of the table. It musts contains: + // 1) first, the t argument from the T structure imported from the package "testing" + // + // 2) second, the function from the student, in this case Nauuo + //(this disapears in the ChallengeMainExam function) + // 3) third, the function from the staff, in this case solutions.Nauuo + //(this disapears as well in the ChallengeMainExam function) + // 4) all the arguments to be tested, in this case it is the plus, minus and rand from each structure, + // notice that they are accessed with arg. (the arg notation comes from the way it was name in the + // range loop over the table) + + // Now that this is done. re-read the quickReadme (the test your test recap) and apply all the commands + // and intructions. We strongly advise to check that your error messages matches your subject. + // and that you ask a colleague to double check. + + //FINAL STEP: + // 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/game23/main.go b/tests/go/solutions/game23/main.go new file mode 100644 index 00000000..797e8477 --- /dev/null +++ b/tests/go/solutions/game23/main.go @@ -0,0 +1,21 @@ +package main + +func Game23(a, b int) int { + if a > b { + return -1 + } + if a == b { + // fmt.Printf("%d\n", cnt) + return 0 + } + if Game23(a*2, b) != -1 { + return 1 + Game23(a*2, b) + } + if Game23(a*3, b) != -1 { + return 1 + Game23(a*3, b) + } + return -1 +} + +func main() { +} diff --git a/tests/go/solutions/gcd/gcd_test.go b/tests/go/solutions/gcd/gcd_test.go new file mode 100644 index 00000000..8e5656c0 --- /dev/null +++ b/tests/go/solutions/gcd/gcd_test.go @@ -0,0 +1,28 @@ +package main + +import ( + "strconv" + "testing" + + "github.com/01-edu/z01" +) + +func TestGCD(t *testing.T) { + arg1 := []string{"23"} + arg2 := []string{"12", "23"} + arg3 := []string{"25", "15"} + arg4 := []string{"23043", "122"} + arg5 := []string{"11", "77"} + 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}) + } + + for _, v := range args { + z01.ChallengeMainExam(t, v...) + } +} diff --git a/tests/go/solutions/gcd/main.go b/tests/go/solutions/gcd/main.go new file mode 100644 index 00000000..7d856876 --- /dev/null +++ b/tests/go/solutions/gcd/main.go @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "os" + "strconv" +) + +//Greatest common divisor +func gcd(num1, num2 uint) uint { + + for i := num1; i > 0; i-- { + if num1%i == 0 && num2%i == 0 { + return i + } + } + + return 1 +} + +func main() { + if len(os.Args) != 3 { + fmt.Println() + os.Exit(0) + } + + v1, _ := strconv.Atoi(os.Args[1]) + + 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 new file mode 100644 index 00000000..fe8269d2 --- /dev/null +++ b/tests/go/solutions/grouping/grouping_test.go @@ -0,0 +1,61 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestGrouping(t *testing.T) { + + type args struct { + first string + second string + } + + arr := []args{ + {first: "(a)", + second: "I'm heavyjumpsuit is on steady, Lighter when I'm lower, higher when I'm heavy"}, + + {first: "(e|n)", second: "I currently have 4 windows opened up… and I don’t know why."}, + {first: "(hi)", second: "He swore he just saw his sushi move."}, + {first: "(s)", second: ""}, + {first: "i", second: "Something in the air"}, + } + + for i := 0; i < 2; i++ { + helper := args{first: validRegExp(2), second: validString(60)} + arr = append(arr, helper) + } + helper := args{first: validRegExp(6), second: validString(60)} + arr = append(arr, helper) + + helper = args{first: z01.RandStr(1, "axyz"), second: z01.RandStr(10, "axyzdassbzzxxxyy cdq ")} + arr = append(arr, helper) + + for _, s := range arr { + z01.ChallengeMainExam(t, s.first, s.second) + } +} + +func validString(len int) string { + s := z01.RandStr(len, "abcdefijklmnopqrstyz ") + return s +} + +func validRegExp(n int) string { + result := "(" + + for i := 0; i < n; i++ { + result += string(z01.RandStr(1, "abcdefijklmnopqrstyz")) + if z01.RandInt()%2 == 0 { + result += string(z01.RandStr(1, "abcdefijklmnopqrstyz")) + } + if i != n-1 { + result += "|" + } + } + + result += ")" + return result +} diff --git a/tests/go/solutions/grouping/main.go b/tests/go/solutions/grouping/main.go new file mode 100644 index 00000000..2f2f791b --- /dev/null +++ b/tests/go/solutions/grouping/main.go @@ -0,0 +1,74 @@ +package main + +import ( + "fmt" + "os" + "strings" +) + +func main() { + //brackets("al|b", "ale atg bar sim nao pro par impar") In JS it's used without brackets + if len(os.Args) == 3 { + brackets(os.Args[1], os.Args[2]) + } else { + fmt.Println() + } +} + +func brackets(regexp, text string) { + if len(text) == 0 || len(regexp) == 0 { + fmt.Println() + return + } + reArr := []rune(regexp) + + if len(reArr) != 0 && reArr[0] == '(' && reArr[len(reArr)-1] == ')' { + reArr = reArr[1 : len(reArr)-1] + result := simpleSearch(reArr, text) + for i, results := range result { + if !isAlphaNum(results[len(results)-1]) { + results = results[:len(results)-1] + } + if !isAlphaNum(results[0]) { + results = results[1:] + } + fmt.Printf("%d: %s\n", i+1, results) + } + } else { + fmt.Println() + } +} + +func isAlphaNum(r byte) bool { + return (r >= 'a' && r <= 'z') || + (r >= 'A' && r <= 'Z') || + (r >= '0' && r <= '9') +} + +func simpleSearch(reArr []rune, text string) []string { + exp := string(reArr) + + var result []string + if !(strings.ContainsRune(exp, '|')) { + helper := []string{exp} + result = append(singleSearch(helper, text)) + } else { + expWords := strings.Split(exp, "|") + result = append(result, singleSearch(expWords, text)...) + } + return result +} + +func singleSearch(exp []string, text string) []string { + tArr := strings.Split(text, " ") + var result []string + + for _, elem := range tArr { + for _, word := range exp { + if strings.Contains(elem, word) { + result = append(result, elem) + } + } + } + return result +} diff --git a/tests/go/solutions/halfcontest.go b/tests/go/solutions/halfcontest.go new file mode 100644 index 00000000..33adb669 --- /dev/null +++ b/tests/go/solutions/halfcontest.go @@ -0,0 +1,10 @@ +package solutions + +func Halfcontest(h1, m1, h2, m2 int) int { + t1 := h1*60 + m1 + t2 := h2*60 + m2 + t2 = (t2 + t1) / 2 + h2 = t2 / 60 + m2 = t2 % 60 + return h2*100 + m2 +} diff --git a/tests/go/solutions/halfcontestprog/halfcontestprog_test.go b/tests/go/solutions/halfcontestprog/halfcontestprog_test.go new file mode 100644 index 00000000..4d06f851 --- /dev/null +++ b/tests/go/solutions/halfcontestprog/halfcontestprog_test.go @@ -0,0 +1,54 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" // This line is not necessary when testing an exercise with a program +) + +func TestHalf_contest(t *testing.T) { + type node struct { + h1 int + m1 int + h2 int + m2 int + } + table := []node{} + // Initial filling of that array with the values I see in the examples of the subject + + table = append(table, + node{11, 44, 21, 59}, + node{1, 12, 1, 14}, + node{5, 50, 6, 51}, + node{14, 35, 18, 55}, + ) + + // If we were to leave the table as it is, a student could just do a program with 4 ifs and get + // "around" the goal of the exercise. We are now going to add 15 random tests using the z01 testing library + + for i := 0; i < 20; i++ { + value := node{ + h1: z01.RandIntBetween(0, 10), + m1: z01.RandIntBetween(0, 59), + h2: z01.RandIntBetween(11, 23), + m2: z01.RandIntBetween(0, 59), + } + + //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) + } + + //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. + //The table with 4 specific exercises and 15 randoms is now ready to be "challenged" + //Because the exercise asks for a function we are now using the Challenge function (this function would + // be the ChallengeMainExam function) + + 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 new file mode 100644 index 00000000..b717fdb5 --- /dev/null +++ b/tests/go/solutions/halfcontestprog/main.go @@ -0,0 +1,14 @@ +package main + +func Halfcontest(h1, m1, h2, m2 int) int { + t1 := h1*60 + m1 + t2 := h2*60 + m2 + t2 = (t2 + t1) / 2 + h2 = t2 / 60 + m2 = t2 % 60 + return h2*100 + m2 +} + +func main() { + +} diff --git a/tests/go/solutions/hello/hello_test.go b/tests/go/solutions/hello/hello_test.go new file mode 100644 index 00000000..ce0bfac6 --- /dev/null +++ b/tests/go/solutions/hello/hello_test.go @@ -0,0 +1,11 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestHello(t *testing.T) { + z01.ChallengeMainExam(t) +} diff --git a/tests/go/solutions/hello/main.go b/tests/go/solutions/hello/main.go new file mode 100644 index 00000000..b1b14d0c --- /dev/null +++ b/tests/go/solutions/hello/main.go @@ -0,0 +1,7 @@ +package main + +import "fmt" + +func main() { + fmt.Println("Hello World!") +} diff --git a/tests/go/solutions/hiddenp/hiddenp_test.go b/tests/go/solutions/hiddenp/hiddenp_test.go new file mode 100644 index 00000000..13ec5a07 --- /dev/null +++ b/tests/go/solutions/hiddenp/hiddenp_test.go @@ -0,0 +1,52 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestHiddenP(t *testing.T) { + arg1 := []string{"fgex.;", "tyf34gdgf;'ektufjhgdgex.;.;rtjynur6"} + arg2 := []string{"abc", "2altrb53c.sse"} + arg3 := []string{"abc", "btarc"} + arg4 := []string{"DD", "DABC"} + arg5 := []string{""} + args := [][]string{arg1, arg2, arg3, arg4, arg5} + + 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()} + extraArg2 := []string{randomUpperLetter, z01.RandUpper()} + + args = append(args, extraArg) + args = append(args, extraArg2) + + } + for i := 0; i < 10; i++ { + randomLowerLetter := z01.RandStr(2, z01.RuneRange('a', 'z')) + randomUpperLetter := z01.RandStr(2, z01.RuneRange('A', 'Z')) + extraArg := []string{randomLowerLetter, z01.RandLower()} + extraArg2 := []string{randomUpperLetter, z01.RandUpper()} + + 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()} + extraArg2 := []string{randomUpperLetter, z01.RandUpper()} + + args = append(args, extraArg) + args = append(args, extraArg2) + + } + + for _, v := range args { + z01.ChallengeMainExam(t, v...) + } +} diff --git a/tests/go/solutions/hiddenp/main.go b/tests/go/solutions/hiddenp/main.go new file mode 100644 index 00000000..a017ce4c --- /dev/null +++ b/tests/go/solutions/hiddenp/main.go @@ -0,0 +1,58 @@ +package main + +import ( + "os" + + "github.com/01-edu/z01" +) + +func main() { + if len(os.Args) != 3 { + z01.PrintRune('\n') + return + } + + first := os.Args[1] + second := os.Args[2] + + if first == "" { + z01.PrintRune('1') + z01.PrintRune('\n') + return + } + if second == "" { + z01.PrintRune('0') + z01.PrintRune('\n') + return + } + + i := 0 + j := 0 + count := 0 + + firstA := []rune(first) + secondA := []rune(second) + + for i < len(first) { + for j < len(second) { + if firstA[i] == secondA[j] { + count++ + i++ + } + if i == len(first) { + break + } + j++ + } + i++ + } + + if count == len(first) { + z01.PrintRune('1') + + } else { + z01.PrintRune('0') + } + z01.PrintRune('\n') + +} diff --git a/tests/go/solutions/index.go b/tests/go/solutions/index.go new file mode 100644 index 00000000..d2226be4 --- /dev/null +++ b/tests/go/solutions/index.go @@ -0,0 +1,10 @@ +package solutions + +import ( + "strings" +) + +func Index(s string, toFind string) int { + result := strings.Index(s, toFind) + return result +} diff --git a/tests/go/solutions/inter/inter_test.go b/tests/go/solutions/inter/inter_test.go new file mode 100644 index 00000000..24e04e2d --- /dev/null +++ b/tests/go/solutions/inter/inter_test.go @@ -0,0 +1,32 @@ +package main + +import ( + "strings" + "testing" + + "github.com/01-edu/z01" +) + +func TestInter(t *testing.T) { + table := append(z01.MultRandWords(), + "padinton paqefwtdjetyiytjneytjoeyjnejeyj", + "ddf6vewg64f twthgdwthdwfteewhrtag6h4ffdhsd", + ) + table = append(table, "abcdefghij efghijlmnopq") + table = append(table, "123456 456789") + table = append(table, "1 1") + table = append(table, "1 2") + + for i := 0; i < 5; i++ { + str1 := z01.RandAlnum() + str2 := strings.Join([]string{z01.RandAlnum(), str1, z01.RandAlnum()}, "") + + table = append(table, strings.Join([]string{str1, str2}, " ")) + table = append(table, strings.Join([]string{z01.RandAlnum(), z01.RandAlnum()}, " ")) + + } + + for _, s := range table { + z01.ChallengeMainExam(t, strings.Fields(s)...) + } +} diff --git a/tests/go/solutions/inter/main.go b/tests/go/solutions/inter/main.go new file mode 100644 index 00000000..212f1601 --- /dev/null +++ b/tests/go/solutions/inter/main.go @@ -0,0 +1,34 @@ +package main + +import ( + "fmt" + "os" + "strings" +) + +func result(str1 string, str2 string) string { + + arraystr1 := []rune(str1) + arraystr2 := []rune(str2) + sizeStr1 := len(arraystr1) + sizeStr2 := len(arraystr2) + var rest []rune + + for i := 0; i < sizeStr1; i++ { + for j := 0; j < sizeStr2; j++ { + if arraystr1[i] == arraystr2[j] && !strings.ContainsRune(string(rest), arraystr1[i]) { + rest = append(rest, arraystr1[i]) + } + } + } + return string(rest) +} + +func main() { + + if len(os.Args) == 3 { + fmt.Println(result(os.Args[1], os.Args[2])) + } else { + fmt.Println() + } +} diff --git a/tests/go/solutions/interestingnumber.go b/tests/go/solutions/interestingnumber.go new file mode 100644 index 00000000..ec42583c --- /dev/null +++ b/tests/go/solutions/interestingnumber.go @@ -0,0 +1,23 @@ +package solutions + +func isInteresting(n int) bool { + s := 0 + for n > 0 { + s += n % 10 + n /= 10 + } + if s%7 == 0 { + return true + } + return false +} + +func InterestingNumber(n int) int { + for n > 0 { + if isInteresting(n) == true { + return n + } + n++ + } + return -1 +} diff --git a/tests/go/solutions/interestingnumber/interestingnumber_test.go b/tests/go/solutions/interestingnumber/interestingnumber_test.go new file mode 100644 index 00000000..c04ba3bd --- /dev/null +++ b/tests/go/solutions/interestingnumber/interestingnumber_test.go @@ -0,0 +1,43 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" // This line is not necessary when testing an exercise with a program +) + +func TestInterestingNumber(t *testing.T) { + type node struct { + n int + } + + table := []node{} + // Initial filling of that array with the values I see in the examples of the subject + + table = append(table, + node{20}, + node{1}, + node{9}, + node{2}, + ) + + // If we were to leave the table as it is, a student could just do a program with 4 ifs and get + // "around" the goal of the exercise. We are now going to add 15 random tests using the z01 testing library + + for i := 0; i < 15; i++ { + value := node{ + n: z01.RandIntBetween(1, 1500), + } + + //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 { + z01.Challenge(t, InterestingNumber, solutions.InterestingNumber, arg.n) + } +} diff --git a/tests/go/solutions/interestingnumber/main.go b/tests/go/solutions/interestingnumber/main.go new file mode 100644 index 00000000..81ab3970 --- /dev/null +++ b/tests/go/solutions/interestingnumber/main.go @@ -0,0 +1,27 @@ +package main + +func isInteresting(n int) bool { + s := 0 + for n > 0 { + s += n % 10 + n /= 10 + } + if s%7 == 0 { + return true + } + return false +} + +func InterestingNumber(n int) int { + for n > 0 { + if isInteresting(n) == true { + return n + } + n++ + } + return -1 +} + +func main() { + +} diff --git a/tests/go/solutions/inverttree.go b/tests/go/solutions/inverttree.go new file mode 100644 index 00000000..b5c16763 --- /dev/null +++ b/tests/go/solutions/inverttree.go @@ -0,0 +1,23 @@ +package solutions + +type TNode struct { + Val int + Left *TNode + Right *TNode +} + +func Invert(root *TNode) { + if root != nil { + temp := root.Left + root.Left = root.Right + root.Right = temp + + Invert(root.Left) + Invert(root.Right) + } +} + +func InvertTree(root *TNode) *TNode { + Invert(root) + return root +} diff --git a/tests/go/solutions/inverttree/inverttree_test.go b/tests/go/solutions/inverttree/inverttree_test.go new file mode 100644 index 00000000..cfef1014 --- /dev/null +++ b/tests/go/solutions/inverttree/inverttree_test.go @@ -0,0 +1,167 @@ +package main + +import ( + "io" + // "os" + "fmt" + "math/rand" + "testing" + "strconv" + + // "github.com/01-edu/z01" + solutions "../../solutions" +) + +type stuNode = TNode +type solNode = solutions.TNode + +func solInsert(N *solNode, newVal int) { + if N == nil { + return + } else if newVal <= N.Val { + if N.Left == nil { + N.Left = &solNode{Val: newVal, Left: nil, Right: nil} + } else { + solInsert(N.Left, newVal) + } + } else { + if N.Right == nil { + N.Right = &solNode{Val: newVal, Left: nil, Right: nil} + } else { + solInsert(N.Right, newVal) + } + } +} + +func stuInsert(N *stuNode, newVal int) { + if N == nil { + return + } else if newVal <= N.Val { + if N.Left == nil { + N.Left = &stuNode{Val: newVal, Left: nil, Right: nil} + } else { + stuInsert(N.Left, newVal) + } + } else { + if N.Right == nil { + N.Right = &stuNode{Val: newVal, Left: nil, Right: nil} + } else { + stuInsert(N.Right, newVal) + } + } +} + +func IsIdentical(root1 *solNode, root2 *stuNode) int { + if root1 == nil && root2 == nil { + return 1 + } else if root1 == nil && root2 != nil { + return 0 + } else if root2 == nil && root1 != nil { + return 0 + } else { + if root1.Val == root2.Val && IsIdentical(root1.Left, root2.Left) == 1 && IsIdentical(root1.Right, root2.Right) == 1 { + return 1 + } else { + return 0 + } + } + return 1 +} + +func stuPrint(w io.Writer, node *stuNode, ns int, ch rune) { + if node == nil { + return + } + + for i := 0; i < ns; i++ { + fmt.Fprint(w, " ") + } + fmt.Fprintf(w, "%c:%v\n", ch, node.Val) + stuPrint(w, node.Left, ns+2, 'L') + stuPrint(w, node.Right, ns+2, 'R') +} + +func solPrint(w io.Writer, node *solNode, ns int, ch rune) { + if node == nil { + return + } + + for i := 0; i < ns; i++ { + fmt.Fprint(w, " ") + } + fmt.Fprintf(w, "%c:%v\n", ch, node.Val) + solPrint(w, node.Left, ns+2, 'L') + solPrint(w, node.Right, ns+2, 'R') +} + +func returnStuTree(root *stuNode) string { + if (root == nil) { + return "" + } + ans := strconv.Itoa(root.Val) + if (root.Left == nil && root.Right == nil) { + return ans + } + if (root.Left != nil) { + ans += " " + returnStuTree(root.Left) + } + if (root.Right != nil) { + ans += " " + returnStuTree(root.Right) + } + return ans +} + +func returnSolTree(root *solNode) string{ + if (root == nil) { + return "" + } + ans := strconv.Itoa(root.Val) + if (root.Left == nil && root.Right == nil) { + return ans + } + if (root.Left != nil) { + ans += " " + returnSolTree(root.Left) + } + if (root.Right != nil) { + ans += " " + returnSolTree(root.Right) + } + return ans +} + +func TestInvertTree(t *testing.T) { + root, val1, val2, val3, val4 := 0, 0, 0, 0, 0 + + root = rand.Intn(30) + tree := &solNode{Val: root, Left: nil, Right: nil} + TestTree := &stuNode{Val: root, Left: nil, Right: nil} + for i := 0; i < 15; i++ { + tree = &solNode{Val: root, Left: nil, Right: nil} + temp := tree + val1, val2, val3, val4 = rand.Intn(30), rand.Intn(30), rand.Intn(30), rand.Intn(30) + solInsert(tree, val1) + solInsert(tree, val2) + solInsert(tree, val3) + solInsert(tree, val4) + // solPrint(os.Stdout, tree, 0, 'M') + solutions.InvertTree(tree) + // solPrint(os.Stdout, tree, 0, 'M') + + TestTree = &stuNode{Val: root, Left: nil, Right: nil} + tmp := TestTree + stuInsert(TestTree, val1) + stuInsert(TestTree, val2) + stuInsert(TestTree, val3) + stuInsert(TestTree, val4) + // stuPrint(os.Stdout, TestTree, 0, 'M') + InvertTree(TestTree) + // stuPrint(os.Stdout, TestTree, 0, 'M') + + ret := IsIdentical(tree, TestTree) + if ret != 1 { + tree1 := returnSolTree(temp) + tree2 := returnStuTree(tmp) + t.Errorf("\n\"%v\" instead of \"%v\"\n\n", tree1, tree2) + // t.Errorf("\nError\n\n") + } + } +} diff --git a/tests/go/solutions/inverttree/main.go b/tests/go/solutions/inverttree/main.go new file mode 100644 index 00000000..ae1231e0 --- /dev/null +++ b/tests/go/solutions/inverttree/main.go @@ -0,0 +1,28 @@ +package main + +type TNode struct { + Val int + Left *TNode + Right *TNode +} + +func Invert(root *TNode) { + if root != nil { + temp := root.Left + root.Left = root.Right + root.Right = temp + + Invert(root.Left) + Invert(root.Right) + } +} + +func InvertTree(root *TNode) *TNode { + Invert(root) + return root +} + +func main() { + +} + diff --git a/tests/go/solutions/isalpha.go b/tests/go/solutions/isalpha.go new file mode 100644 index 00000000..18a6826c --- /dev/null +++ b/tests/go/solutions/isalpha.go @@ -0,0 +1,10 @@ +package solutions + +func IsAlpha(s string) bool { + for _, r := range s { + if !((r >= 'a' && r <= 'z') || (r >= 'A' && r <= 'Z') || (r >= '0' && r <= '9')) { + return false + } + } + return true +} diff --git a/tests/go/solutions/islower.go b/tests/go/solutions/islower.go new file mode 100644 index 00000000..8f665fa1 --- /dev/null +++ b/tests/go/solutions/islower.go @@ -0,0 +1,10 @@ +package solutions + +func IsLower(s string) bool { + for _, r := range s { + if !(r >= 'a' && r <= 'z') { + return false + } + } + return true +} diff --git a/tests/go/solutions/isnegative.go b/tests/go/solutions/isnegative.go new file mode 100644 index 00000000..f650b3e9 --- /dev/null +++ b/tests/go/solutions/isnegative.go @@ -0,0 +1,13 @@ +package solutions + +import ( + "fmt" +) + +func IsNegative(n int) { + if n < 0 { + fmt.Println("T") + } else { + fmt.Println("F") + } +} diff --git a/tests/go/solutions/isnumeric.go b/tests/go/solutions/isnumeric.go new file mode 100644 index 00000000..ee3fc083 --- /dev/null +++ b/tests/go/solutions/isnumeric.go @@ -0,0 +1,10 @@ +package solutions + +func IsNumeric(s string) bool { + for _, r := range s { + if !(r >= '0' && r <= '9') { + return false + } + } + return true +} diff --git a/tests/go/solutions/ispowerof2/ispowerof2_test.go b/tests/go/solutions/ispowerof2/ispowerof2_test.go new file mode 100644 index 00000000..1616b7ef --- /dev/null +++ b/tests/go/solutions/ispowerof2/ispowerof2_test.go @@ -0,0 +1,30 @@ +package main + +import ( + "strconv" + "strings" + "testing" + + "github.com/01-edu/z01" +) + +func TestIsPowerOf2(t *testing.T) { + var args []string + for i := 1; i < 5; i++ { + args = append(args, strconv.Itoa(i)) + } + + for i := 0; i < 12; i++ { + args = append(args, strconv.Itoa(z01.RandIntBetween(1, 2048))) + } + + args = append(args, "1024") + args = append(args, "") + args = append(args, "4096") + args = append(args, "8388608") + + for _, v := range args { + z01.ChallengeMainExam(t, strings.Fields(v)...) + } + z01.ChallengeMainExam(t, "1", "2") +} diff --git a/tests/go/solutions/ispowerof2/main.go b/tests/go/solutions/ispowerof2/main.go new file mode 100644 index 00000000..bf47d002 --- /dev/null +++ b/tests/go/solutions/ispowerof2/main.go @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "os" + "strconv" +) + +func main() { + if len(os.Args) > 2 || len(os.Args) < 2 { + fmt.Println() + return + } + nbr, _ := strconv.Atoi(os.Args[1]) + fmt.Println(isPowerOf2(nbr)) +} + +//& computes the logical bitwise AND of its operands. +func isPowerOf2(n int) bool { + return n != 0 && ((n & (n - 1)) == 0) +} diff --git a/tests/go/solutions/isprime.go b/tests/go/solutions/isprime.go new file mode 100644 index 00000000..353cd69f --- /dev/null +++ b/tests/go/solutions/isprime.go @@ -0,0 +1,20 @@ +package solutions + +import ( + "math" +) + +func IsPrime(value int) bool { + if value < 2 { + return false + } + limit := int(math.Floor(math.Sqrt(float64(value)))) + i := 2 + for i <= limit { + if value%i == 0 { + return false + } + i++ + } + return true +} diff --git a/tests/go/solutions/isprintable.go b/tests/go/solutions/isprintable.go new file mode 100644 index 00000000..927bdf6c --- /dev/null +++ b/tests/go/solutions/isprintable.go @@ -0,0 +1,10 @@ +package solutions + +func IsPrintable(s string) bool { + for _, r := range s { + if !(r >= 32 && r <= 127) { + return false + } + } + return true +} diff --git a/tests/go/solutions/issorted.go b/tests/go/solutions/issorted.go new file mode 100644 index 00000000..ce2509e2 --- /dev/null +++ b/tests/go/solutions/issorted.go @@ -0,0 +1,46 @@ +package solutions + +func IsSortedBy1(a, b int) int { + if a-b < 0 { + return -1 + } else if a-b > 0 { + return 1 + } else { + return 0 + } +} + +func IsSortedBy10(a, b int) int { + if a-b < 0 { + return -10 + } else if a-b > 0 { + return 10 + } else { + return 0 + } +} + +func IsSortedByDiff(a, b int) int { + return a - b +} + +func IsSorted(f func(int, int) int, arr []int) bool { + + ascendingOrdered := true + descendingOrdered := true + + for i := 1; i < len(arr); i++ { + if !(f(arr[i-1], arr[i]) >= 0) { + ascendingOrdered = false + } + } + + for i := 1; i < len(arr); i++ { + if !(f(arr[i-1], arr[i]) <= 0) { + descendingOrdered = false + } + } + + return ascendingOrdered || descendingOrdered + +} diff --git a/tests/go/solutions/isupper.go b/tests/go/solutions/isupper.go new file mode 100644 index 00000000..c4d6d1c1 --- /dev/null +++ b/tests/go/solutions/isupper.go @@ -0,0 +1,10 @@ +package solutions + +func IsUpper(s string) bool { + for _, r := range s { + if !(r >= 'A' && r <= 'Z') { + return false + } + } + return true +} diff --git a/tests/go/solutions/iterativefactorial.go b/tests/go/solutions/iterativefactorial.go new file mode 100644 index 00000000..2f67a650 --- /dev/null +++ b/tests/go/solutions/iterativefactorial.go @@ -0,0 +1,17 @@ +package solutions + +import "math/bits" + +func IterativeFactorial(nb int) int { + limit := 12 + if bits.UintSize == 64 { + limit = 20 + } + if nb < 0 || nb > limit { + return 0 + } + if nb == 0 { + return 1 + } + return nb * IterativeFactorial(nb-1) +} diff --git a/tests/go/solutions/iterativepower.go b/tests/go/solutions/iterativepower.go new file mode 100644 index 00000000..1dd75609 --- /dev/null +++ b/tests/go/solutions/iterativepower.go @@ -0,0 +1,13 @@ +package solutions + +import ( + "math" +) + +func IterativePower(nb int, power int) int { + if power < 0 { + return 0 + } + result := math.Pow(float64(nb), float64(power)) + return int(result) +} diff --git a/tests/go/solutions/itoa.go b/tests/go/solutions/itoa.go new file mode 100644 index 00000000..9589adc5 --- /dev/null +++ b/tests/go/solutions/itoa.go @@ -0,0 +1,9 @@ +package solutions + +import ( + "strconv" +) + +func Itoa(v int) string { + return strconv.Itoa(v) +} diff --git a/tests/go/solutions/itoabase.go b/tests/go/solutions/itoabase.go new file mode 100644 index 00000000..54871183 --- /dev/null +++ b/tests/go/solutions/itoabase.go @@ -0,0 +1,14 @@ +package solutions + +import ( + "strconv" + "strings" +) + +func ItoaBase(value, base int) string { + if base < 2 || base > 16 { + return "" + } + + return strings.ToUpper(strconv.FormatInt(int64(value), base)) +} diff --git a/tests/go/solutions/itoabaseprog/itoabaseprog_test.go b/tests/go/solutions/itoabaseprog/itoabaseprog_test.go new file mode 100644 index 00000000..45a73e7c --- /dev/null +++ b/tests/go/solutions/itoabaseprog/itoabaseprog_test.go @@ -0,0 +1,22 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" +) + +func TestItoaBaseProg(t *testing.T) { + for i := 0; i < 30; i++ { + value := z01.RandIntBetween(-1000000, 1000000) + base := z01.RandIntBetween(2, 16) + z01.Challenge(t, ItoaBase, solutions.ItoaBase, value, base) + } + for i := 0; i < 5; i++ { + base := z01.RandIntBetween(2, 16) + z01.Challenge(t, ItoaBase, solutions.ItoaBase, z01.MaxInt, base) + z01.Challenge(t, ItoaBase, solutions.ItoaBase, z01.MinInt, base) + } +} diff --git a/tests/go/solutions/itoabaseprog/main.go b/tests/go/solutions/itoabaseprog/main.go new file mode 100644 index 00000000..38143920 --- /dev/null +++ b/tests/go/solutions/itoabaseprog/main.go @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/01-edu/z01" + "strconv" + + student "../../student" + "strings" +) + +func ItoaBase(value, base int) string { + if base < 2 || base > 16 { + return "" + } + return strings.ToUpper(strconv.FormatInt(int64(value), base)) +} + +func main() { + value := z01.RandIntBetween(-1000000, 1000000) + base := z01.RandIntBetween(2, 16) + fmt.Println(student.ItoaBase(141895, 11)) + + fmt.Println(ItoaBase(value, base)) +} diff --git a/tests/go/solutions/itoaprog/itoaprog_test.go b/tests/go/solutions/itoaprog/itoaprog_test.go new file mode 100644 index 00000000..74566c0e --- /dev/null +++ b/tests/go/solutions/itoaprog/itoaprog_test.go @@ -0,0 +1,16 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" +) + +func TestItoaProg(t *testing.T) { + for i := 0; i < 50; i++ { + arg := z01.RandIntBetween(-2000000000, 2000000000) + z01.Challenge(t, Itoa, solutions.Itoa, arg) + } +} diff --git a/tests/go/solutions/itoaprog/main.go b/tests/go/solutions/itoaprog/main.go new file mode 100644 index 00000000..72e2e6e4 --- /dev/null +++ b/tests/go/solutions/itoaprog/main.go @@ -0,0 +1,13 @@ +package main + +import ( + "strconv" +) + +func Itoa(v int) string { + return strconv.Itoa(v) +} + +func main() { + +} diff --git a/tests/go/solutions/join.go b/tests/go/solutions/join.go new file mode 100644 index 00000000..5b5bd63b --- /dev/null +++ b/tests/go/solutions/join.go @@ -0,0 +1,14 @@ +package solutions + +//Join the elements of the slice using the sep as glue between each element +func Join(arstr []string, sep string) string { + res := "" + n := len(arstr) + for i, a := range arstr { + res += a + if i < n-1 { + res += sep + } + } + return res +} diff --git a/tests/go/solutions/lastrune.go b/tests/go/solutions/lastrune.go new file mode 100644 index 00000000..cc599088 --- /dev/null +++ b/tests/go/solutions/lastrune.go @@ -0,0 +1,7 @@ +package solutions + +func LastRune(s string) rune { + runes := []rune(s) + index := len(runes) - 1 + return runes[index] +} diff --git a/tests/go/solutions/lastruneprog/lastruneprog_test.go b/tests/go/solutions/lastruneprog/lastruneprog_test.go new file mode 100644 index 00000000..bc0d1eff --- /dev/null +++ b/tests/go/solutions/lastruneprog/lastruneprog_test.go @@ -0,0 +1,22 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" +) + +func TestLastRuneProg(t *testing.T) { + table := z01.MultRandASCII() + table = append(table, + "Hello!", + "Salut!", + "Ola!", + z01.RandStr(z01.RandIntBetween(1, 15), z01.RandAlnum()), + ) + for _, arg := range table { + z01.Challenge(t, LastRune, solutions.LastRune, arg) + } +} diff --git a/tests/go/solutions/lastruneprog/main.go b/tests/go/solutions/lastruneprog/main.go new file mode 100644 index 00000000..b4a2d849 --- /dev/null +++ b/tests/go/solutions/lastruneprog/main.go @@ -0,0 +1,10 @@ +package main + +func LastRune(s string) rune { + runes := []rune(s) + index := len(runes) - 1 + return runes[index] +} + +func main() { +} diff --git a/tests/go/solutions/lastword/lastword_test.go b/tests/go/solutions/lastword/lastword_test.go new file mode 100644 index 00000000..a7af9a9a --- /dev/null +++ b/tests/go/solutions/lastword/lastword_test.go @@ -0,0 +1,27 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestLastWord(t *testing.T) { + args := []string{ + "FOR PONY", + "this ... is sparta, then again, maybe not", + " ", + " lorem,ipsum ", + } + + for i := 0; i < 5; i++ { + args = append(args, z01.RandWords()) + } + + for _, v := range args { + z01.ChallengeMainExam(t, v) + } + + z01.ChallengeMainExam(t, "a", "b") + z01.ChallengeMainExam(t) +} diff --git a/tests/go/solutions/lastword/main.go b/tests/go/solutions/lastword/main.go new file mode 100644 index 00000000..eba6e291 --- /dev/null +++ b/tests/go/solutions/lastword/main.go @@ -0,0 +1,20 @@ +package main + +import ( + "fmt" + "os" + "strings" +) + +func main() { + if len(os.Args) == 2 { + words := strings.Split(os.Args[1], " ") + for i := len(words) - 1; i >= 0; i-- { + if words[i] != "" { + fmt.Println(words[i]) + return + } + } + } + fmt.Println() +} diff --git a/tests/go/solutions/lcm.go b/tests/go/solutions/lcm.go new file mode 100644 index 00000000..3b9e1747 --- /dev/null +++ b/tests/go/solutions/lcm.go @@ -0,0 +1,19 @@ +package solutions + +//This solution is the comparing file of the staff +// Because the solution is a function, +// +//1) here the package is solutions +//2) it does not need an empty func main(){} +//3) its location is 1 level below the folder of the nauuo_test.go file + +func gcd(first, second int) int { + if (second == 0) { + return (first) + } + return (gcd(second, first % second)) +} + +func Lcm(first, second int) int { + return (first / gcd(second, first % second) * second) +} \ No newline at end of file diff --git a/tests/go/solutions/lcm/lcm_test.go b/tests/go/solutions/lcm/lcm_test.go new file mode 100644 index 00000000..1c4cc62a --- /dev/null +++ b/tests/go/solutions/lcm/lcm_test.go @@ -0,0 +1,42 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" // This line is not necessary when testing an exercise with a program +) + +func TestLcm(t *testing.T) { + + type node struct { + first int + second int + } + + table := []node{} + + table = append(table, + node{50, 43}, + node{13, 13}, + node{10, 9}, + node{0, 9}, + node{1, 1}, + ) + + // If we were to leave the table as it is, a student could just do a program with 4 ifs and get + // "around" the goal of the exercise. We are now going to add 15 random tests using the z01 testing library + + for i := 0; i < 15; i++ { + value := node{ + first: z01.RandIntBetween(0, 1000), + second: z01.RandIntBetween(0, 1000), + } + table = append(table, value) + } + + for _, arg := range table { + z01.Challenge(t, Lcm, solutions.Lcm, arg.first, arg.second) + } +} diff --git a/tests/go/solutions/lcm/main.go b/tests/go/solutions/lcm/main.go new file mode 100644 index 00000000..55c57316 --- /dev/null +++ b/tests/go/solutions/lcm/main.go @@ -0,0 +1,24 @@ +package main + +import "fmt" + +//This solution is the placeholder of the student solution +// for an exercise in the exam asking for a Function +//Remember the disclaimer!!!! +//1) here the package is main +//2) It does need an empty func main(){} + +func gcd(first, second int) int { + if second == 0 { + return (first) + } + return gcd(second, first%second) +} + +func Lcm(first, second int) int { + return (first / gcd(first, second) * second) +} +func main() { + fmt.Println(Lcm(3, 0)) + fmt.Println(Lcm(4, 0)) +} diff --git a/tests/go/solutions/listat.go b/tests/go/solutions/listat.go new file mode 100644 index 00000000..fde3386f --- /dev/null +++ b/tests/go/solutions/listat.go @@ -0,0 +1,23 @@ +package solutions + +//returs the node in a given position +func ListAt(l *NodeL, nbr int) *NodeL { + index := 0 + count := 0 + head := l + + for head != nil { + index++ + head = head.Next + } + if nbr <= index { + for l != nil { + if count == nbr { + return l + } + count++ + l = l.Next + } + } + return nil +} diff --git a/tests/go/solutions/listclear.go b/tests/go/solutions/listclear.go new file mode 100644 index 00000000..0f58b3c3 --- /dev/null +++ b/tests/go/solutions/listclear.go @@ -0,0 +1,15 @@ +package solutions + +//cleans the list +func ListClear(l *List) { + + temp := l.Head + next := l.Head + for temp != nil { + next = temp.Next + temp = nil + temp = next + } + + l.Head = nil +} diff --git a/tests/go/solutions/listfind.go b/tests/go/solutions/listfind.go new file mode 100644 index 00000000..6c392d20 --- /dev/null +++ b/tests/go/solutions/listfind.go @@ -0,0 +1,19 @@ +package solutions + +// finds the element and returns the first data from the node that is a string +func ListFind(l *List, ref interface{}, comp func(a, b interface{}) bool) *interface{} { + iterator := l.Head + for iterator != nil { + if comp(iterator.Data, ref) { + return &iterator.Data + } + + iterator = iterator.Next + } + return nil +} + +// defines for two elements the equality criteria +func CompStr(a, b interface{}) bool { + return a == b +} diff --git a/tests/go/solutions/listforeach.go b/tests/go/solutions/listforeach.go new file mode 100644 index 00000000..785d6b4c --- /dev/null +++ b/tests/go/solutions/listforeach.go @@ -0,0 +1,28 @@ +package solutions + +//applies a function in argument to each element of the linked list +func ListForEach(l *List, f func(*NodeL)) { + it := l.Head + for it != nil { + f(it) + it = it.Next + } +} + +func Add2_node(node *NodeL) { + switch node.Data.(type) { + case int: + node.Data = node.Data.(int) + 2 + case string: + node.Data = node.Data.(string) + "2" + } +} + +func Subtract3_node(node *NodeL) { + switch node.Data.(type) { + case int: + node.Data = node.Data.(int) - 3 + case string: + node.Data = node.Data.(string) + "-3" + } +} diff --git a/tests/go/solutions/listforeachif.go b/tests/go/solutions/listforeachif.go new file mode 100644 index 00000000..6aaea655 --- /dev/null +++ b/tests/go/solutions/listforeachif.go @@ -0,0 +1,43 @@ +package solutions + +// compare each element of the linked list to see if it is a String +func IsPositive_node(node *NodeL) bool { + switch node.Data.(type) { + case int, float32, float64, byte: + return node.Data.(int) > 0 + case string, rune: + return false + } + return false +} + +func IsNegative_node(node *NodeL) bool { + switch node.Data.(type) { + case int, float32, float64, byte: + return node.Data.(int) > 0 + case string, rune: + return false + } + return false +} + +func IsNumeric_node(node *NodeL) bool { + switch node.Data.(type) { + case int, float32, float64, byte: + return true + case string, rune: + return false + } + return false +} + +// applies the function f on each string if the boolean function comp returns true +func ListForEachIf(l *List, f func(*NodeL), comp func(*NodeL) bool) { + it := l.Head + for it != nil { + if comp(it) { + f(it) + } + it = it.Next + } +} diff --git a/tests/go/solutions/listlast.go b/tests/go/solutions/listlast.go new file mode 100644 index 00000000..f0fde732 --- /dev/null +++ b/tests/go/solutions/listlast.go @@ -0,0 +1,15 @@ +package solutions + +//gives the last element of the list +func ListLast(l *List) interface{} { + if l.Head == nil { + return nil + } + for l.Head != nil { + if l.Head.Next == nil { + return l.Head.Data + } + l.Head = l.Head.Next + } + return l.Head.Data +} diff --git a/tests/go/solutions/listmerge.go b/tests/go/solutions/listmerge.go new file mode 100644 index 00000000..3f5cfe54 --- /dev/null +++ b/tests/go/solutions/listmerge.go @@ -0,0 +1,12 @@ +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/listpushback.go b/tests/go/solutions/listpushback.go new file mode 100644 index 00000000..e45ecf40 --- /dev/null +++ b/tests/go/solutions/listpushback.go @@ -0,0 +1,22 @@ +package solutions + +type NodeL struct { + Data interface{} + Next *NodeL +} + +type List struct { + Head *NodeL + Tail *NodeL +} + +func ListPushBack(l *List, data interface{}) { + n := &NodeL{Data: data} + + if l.Head == nil { + l.Head = n + } else { + l.Tail.Next = n + } + l.Tail = n +} diff --git a/tests/go/solutions/listpushfront.go b/tests/go/solutions/listpushfront.go new file mode 100644 index 00000000..b73b4652 --- /dev/null +++ b/tests/go/solutions/listpushfront.go @@ -0,0 +1,15 @@ +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 { + l.Head = n + return + } + + n.Next = l.Head + l.Head = n +} diff --git a/tests/go/solutions/listremoveif.go b/tests/go/solutions/listremoveif.go new file mode 100644 index 00000000..0087ab7c --- /dev/null +++ b/tests/go/solutions/listremoveif.go @@ -0,0 +1,19 @@ +package solutions + +//removes all elements that are equal to the data_ref +func ListRemoveIf(l *List, data_ref interface{}) { + temp := l.Head + prev := l.Head + + for temp != nil && temp.Data == data_ref { + l.Head = temp.Next + temp = l.Head + } + for temp != nil { + if temp.Data != data_ref { + prev = temp + } + prev.Next = temp.Next + temp = prev.Next + } +} diff --git a/tests/go/solutions/listremoveifprog/listremoveifprog_test.go b/tests/go/solutions/listremoveifprog/listremoveifprog_test.go new file mode 100644 index 00000000..d0712589 --- /dev/null +++ b/tests/go/solutions/listremoveifprog/listremoveifprog_test.go @@ -0,0 +1,108 @@ +package main + +import ( + "strconv" + "testing" + + solution "../../solutions" + "github.com/01-edu/z01" +) + +type Node10 = NodeL +type List10 = solution.List +type NodeS10 = solution.NodeL +type ListS10 = List + +func listToStringStu12(l *ListS10) string { + var res string + it := l.Head + for it != nil { + switch it.Data.(type) { + case int: + res += strconv.Itoa(it.Data.(int)) + "-> " + case string: + res += it.Data.(string) + "-> " + } + it = it.Next + } + res += "" + return res +} + +func listPushBackTest10(l *ListS10, l1 *List10, data interface{}) { + n := &Node10{Data: data} + n1 := &NodeS10{Data: data} + if l.Head == nil { + l.Head = n + } else { + iterator := l.Head + for iterator.Next != nil { + iterator = iterator.Next + } + iterator.Next = n + } + if l1.Head == nil { + l1.Head = n1 + } else { + iterator1 := l1.Head + for iterator1.Next != nil { + iterator1 = iterator1.Next + } + iterator1.Next = n1 + } +} + +func comparFuncList10(l *List10, l1 *ListS10, t *testing.T, data interface{}) { + for l.Head != nil || l1.Head != nil { + if (l.Head == nil && l1.Head != nil) || (l.Head != nil && l1.Head == nil) { + t.Errorf("\ndata used: %v\nstudent list:%s\nlist:%s\n\nListRemoveIf() == %v instead of %v\n\n", + data, listToStringStu12(l1), solution.ListToString(l.Head), l1.Head, l.Head) + return + } else if l.Head.Data != l1.Head.Data { + t.Errorf("\ndata used: %v\nstudent list:%s\nlist:%s\n\nListRemoveIf() == %v instead of %v\n\n", + data, listToStringStu12(l1), solution.ListToString(l.Head), l1.Head.Data, l.Head.Data) + return + } + l.Head = l.Head.Next + l1.Head = l1.Head.Next + } +} + +//exercise 13 +//removes all the elements that are equal to a value +func TestListRemoveIfProg(t *testing.T) { + link := &List10{} + link2 := &ListS10{} + var index int + table := []solution.NodeTest{} + + table = solution.ElementsToTest(table) + + table = append(table, + solution.NodeTest{ + Data: []interface{}{"hello", "hello1", "hello2", "hello3"}, + }, + ) + + for _, arg := range table { + for i := 0; i < len(arg.Data); i++ { + listPushBackTest10(link2, link, arg.Data[i]) + } + aux := len(arg.Data) - 1 + + index = z01.RandIntBetween(0, aux) + if link.Head != nil && link2.Head != nil { + cho := arg.Data[index] + ListRemoveIf(link2, cho) + solution.ListRemoveIf(link, cho) + comparFuncList10(link, link2, t, cho) + } else { + ListRemoveIf(link2, 1) + solution.ListRemoveIf(link, 1) + comparFuncList10(link, link2, t, 1) + } + + link = &List10{} + link2 = &ListS10{} + } +} diff --git a/tests/go/solutions/listremoveifprog/main.go b/tests/go/solutions/listremoveifprog/main.go new file mode 100644 index 00000000..3e01186b --- /dev/null +++ b/tests/go/solutions/listremoveifprog/main.go @@ -0,0 +1,34 @@ +package main + +type NodeL struct { + Data interface{} + Next *NodeL +} + +type List struct { + Head *NodeL + Tail *NodeL +} + +//removes all elements that are equal to the data_ref +func ListRemoveIf(l *List, data_ref interface{}) { + temp := l.Head + prev := l.Head + + for temp != nil && temp.Data == data_ref { + l.Head = temp.Next + temp = l.Head + } + for temp != nil { + if temp.Data != data_ref { + prev = temp + } + + prev.Next = temp.Next + temp = prev.Next + } +} + +func main() { + +} diff --git a/tests/go/solutions/listreverse.go b/tests/go/solutions/listreverse.go new file mode 100644 index 00000000..23812c05 --- /dev/null +++ b/tests/go/solutions/listreverse.go @@ -0,0 +1,17 @@ +package solutions + +//reverses the list +func ListReverse(l *List) { + + current := l.Head + prev := l.Head + prev = nil + + for current != nil { + next := current.Next + current.Next = prev + prev = current + current = next + } + l.Head = prev +} diff --git a/tests/go/solutions/listsize.go b/tests/go/solutions/listsize.go new file mode 100644 index 00000000..4615a9de --- /dev/null +++ b/tests/go/solutions/listsize.go @@ -0,0 +1,12 @@ +package solutions + +//gives the length of the List +func ListSize(l *List) int { + count := 0 + iterator := l.Head + for iterator != nil { + count++ + iterator = iterator.Next + } + return count +} diff --git a/tests/go/solutions/listsizeprog/listsizeprog_test.go b/tests/go/solutions/listsizeprog/listsizeprog_test.go new file mode 100644 index 00000000..ed03837c --- /dev/null +++ b/tests/go/solutions/listsizeprog/listsizeprog_test.go @@ -0,0 +1,61 @@ +package main + +import ( + "testing" + + solution "../../solutions" +) + +type Node2 = NodeL +type List2 = solution.List +type NodeS2 = solution.NodeL +type ListS2 = List + +func listPushBackTest2(l *ListS2, l1 *List2, data interface{}) { + n := &Node2{Data: data} + n1 := &NodeS2{Data: data} + if l.Head == nil { + l.Head = n + } else { + iterator := l.Head + for iterator.Next != nil { + iterator = iterator.Next + } + iterator.Next = n + } + + if l1.Head == nil { + l1.Head = n1 + } else { + iterator1 := l1.Head + for iterator1.Next != nil { + iterator1 = iterator1.Next + } + iterator1.Next = n1 + } +} + +//exercise 4 +func TestListSizeProg(t *testing.T) { + link := &List2{} + link2 := &ListS2{} + table := []solution.NodeTest{} + table = solution.ElementsToTest(table) + table = append(table, + solution.NodeTest{ + Data: []interface{}{"Hello", "man", "how are you"}, + }, + ) + for _, arg := range table { + for i := 0; i < len(arg.Data); i++ { + listPushBackTest2(link2, link, arg.Data[i]) + } + aux := solution.ListSize(link) + aux2 := ListSize(link2) + if aux != aux2 { + t.Errorf("ListSize(%v) == %d instead of %d\n", solution.ListToString(link.Head), aux2, aux) + } + link = &List2{} + link2 = &ListS2{} + } +} diff --git a/tests/go/solutions/listsizeprog/main.go b/tests/go/solutions/listsizeprog/main.go new file mode 100644 index 00000000..eb786bbb --- /dev/null +++ b/tests/go/solutions/listsizeprog/main.go @@ -0,0 +1,26 @@ +package main + +type NodeL struct { + Data interface{} + Next *NodeL +} + +type List struct { + Head *NodeL + Tail *NodeL +} + +//gives the length of the List +func ListSize(l *List) int { + count := 0 + iterator := l.Head + for iterator != nil { + count++ + iterator = iterator.Next + } + return count +} + +func main() { + +} diff --git a/tests/go/solutions/listsort.go b/tests/go/solutions/listsort.go new file mode 100644 index 00000000..d49aa172 --- /dev/null +++ b/tests/go/solutions/listsort.go @@ -0,0 +1,29 @@ +package solutions + +func ListSort(l *NodeI) *NodeI { + + Head := l + if Head == nil { + return nil + } + Head.Next = ListSort(Head.Next) + + if Head.Next != nil && Head.Data > Head.Next.Data { + Head = move(Head) + } + return Head +} + +func move(l *NodeI) *NodeI { + p := l + n := l.Next + ret := n + + for n != nil && l.Data > n.Data { + p = n + n = n.Next + } + p.Next = l + l.Next = n + return ret +} diff --git a/tests/go/solutions/makerange.go b/tests/go/solutions/makerange.go new file mode 100644 index 00000000..93c27d9e --- /dev/null +++ b/tests/go/solutions/makerange.go @@ -0,0 +1,15 @@ +package solutions + +func MakeRange(min, max int) []int { + size := max - min + + if size <= 0 { + return nil + } + answer := make([]int, size) + for i := range answer { + answer[i] = min + min++ + } + return answer +} diff --git a/tests/go/solutions/map.go b/tests/go/solutions/map.go new file mode 100644 index 00000000..0751eea3 --- /dev/null +++ b/tests/go/solutions/map.go @@ -0,0 +1,21 @@ +package solutions + +func IsPositive(value int) bool { + return value > 0 +} + +func IsNegative0(value int) bool { + return value < 0 +} + +func Map(f func(int) bool, arr []int) []bool { + + arrBool := make([]bool, len(arr)) + + for i, el := range arr { + arrBool[i] = f(el) + } + + return arrBool + +} diff --git a/tests/go/solutions/max.go b/tests/go/solutions/max.go new file mode 100644 index 00000000..ec089717 --- /dev/null +++ b/tests/go/solutions/max.go @@ -0,0 +1,10 @@ +package solutions + +import ( + "sort" +) + +func Max(arr []int) int { + sort.Sort(sort.IntSlice(arr)) + return arr[len(arr)-1] +} diff --git a/tests/go/solutions/maxprog/main.go b/tests/go/solutions/maxprog/main.go new file mode 100644 index 00000000..644aebd7 --- /dev/null +++ b/tests/go/solutions/maxprog/main.go @@ -0,0 +1,14 @@ +package main + +import ( + "sort" +) + +func Max(arr []int) int { + sort.Sort(sort.IntSlice(arr)) + return arr[len(arr)-1] +} + +func main() { + +} diff --git a/tests/go/solutions/maxprog/maxprog_test.go b/tests/go/solutions/maxprog/maxprog_test.go new file mode 100644 index 00000000..9b2d2ef4 --- /dev/null +++ b/tests/go/solutions/maxprog/maxprog_test.go @@ -0,0 +1,19 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" +) + +func TestMaxProg(t *testing.T) { + args := []int{z01.RandInt()} + limit := z01.RandIntBetween(20, 50) + for i := 0; i < limit; i++ { + args = append(args, z01.RandInt()) + } + + z01.Challenge(t, Max, solutions.Max, args) +} diff --git a/tests/go/solutions/merge.go b/tests/go/solutions/merge.go new file mode 100644 index 00000000..8fa487ca --- /dev/null +++ b/tests/go/solutions/merge.go @@ -0,0 +1,20 @@ +package solutions + +type TreeNodeM struct { + Left *TreeNodeM + Val int + Right *TreeNodeM +} + +func MergeTrees(t1 *TreeNodeM, t2 *TreeNodeM) *TreeNodeM { + if t1 == nil { + return t2 + } + if t2 == nil { + return t1 + } + t1.Val = t1.Val + t2.Val + t1.Left = MergeTrees(t1.Left, t2.Left) + t1.Right = MergeTrees(t1.Right, t2.Right) + return t1 +} diff --git a/tests/go/solutions/merge/main.go b/tests/go/solutions/merge/main.go new file mode 100644 index 00000000..6443e09b --- /dev/null +++ b/tests/go/solutions/merge/main.go @@ -0,0 +1,24 @@ +package main + +type TreeNodeM struct { + Left *TreeNodeM + Val int + Right *TreeNodeM +} + +func MergeTrees(t1 *TreeNodeM, t2 *TreeNodeM) *TreeNodeM { + if t1 == nil { + return t2 + } + if t2 == nil { + return t1 + } + t1.Val = t1.Val + t2.Val + t1.Left = MergeTrees(t1.Left, t2.Left) + t1.Right = MergeTrees(t1.Right, t2.Right) + return t1 +} + +func main() { + +} diff --git a/tests/go/solutions/merge/merge_test.go b/tests/go/solutions/merge/merge_test.go new file mode 100644 index 00000000..2e4887d0 --- /dev/null +++ b/tests/go/solutions/merge/merge_test.go @@ -0,0 +1,173 @@ +package main + +import ( + "math/rand" + "strconv" + "testing" + + solutions "../../solutions" + "github.com/01-edu/z01" +) + +type stuTreeNode = TreeNodeM +type solTreeNode = solutions.TreeNodeM + +func New(n, k int) (*solTreeNode, *stuTreeNode, *solTreeNode) { + var cop *solTreeNode + var stu *stuTreeNode + var sol *solTreeNode + for _, v := range rand.Perm(n) { + cop = insertSol(cop, (1+v)*k) + stu = insertStu(stu, (1+v)*k) + sol = insertSol(sol, (1+v)*k) + } + return cop, stu, sol +} + +func insertStu(t *stuTreeNode, v int) *stuTreeNode { + if t == nil { + return &stuTreeNode{Left: nil, Val: v, Right: nil} + } + if v < t.Val { + t.Left = insertStu(t.Left, v) + return t + } + t.Right = insertStu(t.Right, v) + return t +} + +func insertSol(t *solTreeNode, v int) *solTreeNode { + if t == nil { + return &solTreeNode{Left: nil, Val: v, Right: nil} + } + if v < t.Val { + t.Left = insertSol(t.Left, v) + return t + } + t.Right = insertSol(t.Right, v) + return t +} + +// Walk traverses a tree depth-first, +// sending each Value on a channel. +func stuWalk(t *stuTreeNode, ch chan int) { + if t == nil { + return + } + stuWalk(t.Left, ch) + ch <- t.Val + stuWalk(t.Right, ch) +} + +// Walk traverses a tree depth-first, +// sending each Val on a channel. +func solWalk(t *solTreeNode, ch chan int) { + if t == nil { + return + } + solWalk(t.Left, ch) + ch <- t.Val + solWalk(t.Right, ch) +} + +// Walker launches Walk in a new goroutine, +// and returns a read-only channel of values. +func stuWalker(t *stuTreeNode) <-chan int { + ch := make(chan int) + go func() { + stuWalk(t, ch) + close(ch) + }() + return ch +} + +// Walker launches Walk in a new goroutine, +// and returns a read-only channel of values. +func solWalker(t *solTreeNode) <-chan int { + ch := make(chan int) + go func() { + solWalk(t, ch) + close(ch) + }() + return ch +} + +func compare(stuResult *stuTreeNode, solResult *solTreeNode) bool { + c1, c2 := stuWalker(stuResult), solWalker(solResult) + for { + v1, ok1 := <-c1 + v2, ok2 := <-c2 + if !ok1 || !ok2 { + return ok1 == ok2 + } + if v1 != v2 { + break + } + } + return false +} + +func returnSolTree(root *solTreeNode) string { + if root == nil { + return "" + } + ans := strconv.Itoa(root.Val) + if root.Left == nil && root.Right == nil { + return ans + } + if root.Left != nil { + ans += " " + returnSolTree(root.Left) + } + if root.Right != nil { + ans += " " + returnSolTree(root.Right) + } + return ans +} + +func returnStuTree(root *stuTreeNode) string { + if root == nil { + return "" + } + ans := strconv.Itoa(root.Val) + if root.Left == nil && root.Right == nil { + return ans + } + if root.Left != nil { + ans += " " + returnStuTree(root.Left) + } + if root.Right != nil { + ans += " " + returnStuTree(root.Right) + } + return ans +} + +func compareTrees(t *testing.T, stuResult *stuTreeNode, solResult, solTree1, solTree2 *solTreeNode) { + if !compare(stuResult, solResult) { + tree1 := returnSolTree(solTree1) + tree2 := returnSolTree(solTree2) + stuTree := returnStuTree(stuResult) + solTree := returnSolTree(solResult) + t.Errorf("\nMergeTrees(\"%v\", \"%v\") == \"%v\" instead of \"%v\"\n\n", tree1, tree2, stuTree, solTree) + } +} + +func TestMerge(t *testing.T) { + type node struct { + n int + k int + } + + table := []node{} + for i := 0; i < 15; i++ { + value := node{z01.RandIntBetween(10, 15), z01.RandIntBetween(1, 10)} + table = append(table, value) + } + for _, arg := range table { + cop1, stuTree1, solTree1 := New(arg.n, arg.k) + cop2, stuTree2, solTree2 := New(arg.n, arg.k) + stuResult := MergeTrees(stuTree1, stuTree2) + solResult := solutions.MergeTrees(solTree1, solTree2) + + compareTrees(t, stuResult, solResult, cop1, cop2) + } +} diff --git a/tests/go/solutions/nauuo.go b/tests/go/solutions/nauuo.go new file mode 100644 index 00000000..e4235f72 --- /dev/null +++ b/tests/go/solutions/nauuo.go @@ -0,0 +1,35 @@ +package solutions + +//This solution is the comparing file of the staff +// Because the solution is a function, +// +//1) here the package is solutions +//2) it does not need an empty func main(){} +//3) its location is 1 level below the folder of the nauuo_test.go file + +func Nauuo(plus, minus, rand int) string { + if rand == 0 { + if plus > minus { + return ("+") + } + if plus < minus { + return ("-") + } + if plus == minus { + return ("0") + } + } + if plus > minus+rand { + return ("+") + } + if plus+rand < minus { + return ("-") + } + if (plus+rand >= minus) && (plus-rand <= minus) { + return ("?") + } + if (minus+rand >= plus) && (minus-rand <= plus) { + return ("?") + } + return ("?") +} diff --git a/tests/go/solutions/nauuo/main.go b/tests/go/solutions/nauuo/main.go new file mode 100644 index 00000000..d6366a6d --- /dev/null +++ b/tests/go/solutions/nauuo/main.go @@ -0,0 +1,38 @@ +package main + +//This solution is the placeholder of the student solution +// for an exercise in the exam asking for a Function +//Remember the disclaimer!!!! +//1) here the package is main +//2) It does need an empty func main(){} + +func Nauuo(plus, minus, rand int) string { + if rand == 0 { + if plus > minus { + return ("+") + } + if plus < minus { + return ("-") + } + if plus == minus { + return ("0") + } + } + if plus > minus+rand { + return ("+") + } + if plus+rand < minus { + return ("-") + } + if (plus+rand >= minus) && (plus-rand <= minus) { + return ("?") + } + if (minus+rand >= plus) && (minus-rand <= plus) { + return ("?") + } + return ("?") +} + +func main() { + +} diff --git a/tests/go/solutions/nauuo/nauuo_test.go b/tests/go/solutions/nauuo/nauuo_test.go new file mode 100644 index 00000000..d689a964 --- /dev/null +++ b/tests/go/solutions/nauuo/nauuo_test.go @@ -0,0 +1,86 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" // This line is not necessary when testing an exercise with a program +) + +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) + + type node struct { + plus int + minus int + rand int + } + + // Declaration of an empty array of type node{} + // note that in this case this is the easiest type of table to declare + // but a table can be of any other relevant type, (for example []string{}, []int{} if it + // were a single string tested or a single int) + + table := []node{} + // Initial filling of that array with the values I see in the examples of the subject + + table = append(table, + node{50, 43, 20}, + node{13, 13, 0}, + node{10, 9, 0}, + node{5, 9, 2}, + ) + + // If we were to leave the table as it is, a student could just do a program with 4 ifs and get + // "around" the goal of the exercise. We are now going to add 15 random tests using the z01 testing library + + for i := 0; i < 15; i++ { + value := node{ + plus: z01.RandIntBetween(0, 10), + minus: z01.RandIntBetween(0, 10), + rand: z01.RandIntBetween(0, 10), + //this z01.RandIntBetween function allows the randomization of + //the int for each value in a desired range. + //Note that they are many others of those functions for other types of data + //Do not hesitate to have a look at all of them https://github.com/01-edu/z01 + } + + //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" + //Because the exercise asks for a function we are now using the Challenge function (this function would + // be the ChallengeMainExam function) + + for _, arg := range table { + z01.Challenge(t, Nauuo, solutions.Nauuo, arg.plus, arg.minus, arg.rand) + } + + // the z01.Challenge function is here applied to each argument of the table. It musts contains: + // 1) first, the t argument from the T structure imported from the package "testing" + // + // 2) second, the function from the student, in this case Nauuo + //(this disapears in the ChallengeMainExam function) + // 3) third, the function from the staff, in this case solutions.Nauuo + //(this disapears as well in the ChallengeMainExam function) + // 4) all the arguments to be tested, in this case it is the plus, minus and rand from each structure, + // notice that they are accessed with arg. (the arg notation comes from the way it was name in the + // range loop over the table) + + // Now that this is done. re-read the quickReadme (the test your test recap) and apply all the commands + // and intructions. We strongly advise to check that your error messages matches your subject. + // and that you ask a colleague to double check. + + //FINAL STEP: + // 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 new file mode 100644 index 00000000..a67d33fa --- /dev/null +++ b/tests/go/solutions/nbrconvertalpha/main.go @@ -0,0 +1,46 @@ +package main + +import ( + "os" + "strconv" + + "github.com/01-edu/z01" +) + +func IsNumeric(str string) bool { + + for i := 0; i < len(str); i++ { + if !(str[i] >= '0' && str[i] <= '9') { + return false + } + } + return true +} + +func main() { + arguments := os.Args[1:] + for i := range arguments { + if IsNumeric(arguments[i]) { + number, _ := strconv.Atoi(arguments[i]) + boole := false + if os.Args[1] == "--upper" { + boole = true + } + + if number <= 26 && number >= 1 && !boole { + number += 96 + z01.PrintRune(rune(number)) + } else if number <= 26 && number >= 1 && boole { + number += 64 + z01.PrintRune(rune(number)) + } else { + z01.PrintRune(' ') + } + } else { + if !(arguments[i] == "--upper" && i == 0) { + z01.PrintRune(' ') + } + } + } + z01.PrintRune('\n') +} diff --git a/tests/go/solutions/nenokku/main.go b/tests/go/solutions/nenokku/main.go new file mode 100644 index 00000000..cd578e48 --- /dev/null +++ b/tests/go/solutions/nenokku/main.go @@ -0,0 +1,48 @@ +package main + +import ( + "os" + "fmt" + "strings" +) + +func contains(big, small string) bool { + for i := 0; i <= len(big)-len(small); i++ { + if big[i] == small[0] { + for j := 0; j < len(small); j++ { + if big[i+j] != small[j] { + break + } + if j == len(small)-1 { + return true + } + } + } + } + return false +} + +func main() { + var big string + args := os.Args[1:] + + for _, arg := range args { + split := strings.Split(arg, " ") + ch := split[0] + small := split[1] + + if ch == "x" { + break + } + if ch == "A" { + big = big + small + } + if ch == "?" { + if contains(big, small) == true { + fmt.Println("YES") + } else { + fmt.Println("NO") + } + } + } +} diff --git a/tests/go/solutions/nenokku/nenokku_test.go b/tests/go/solutions/nenokku/nenokku_test.go new file mode 100644 index 00000000..e9f1e7ac --- /dev/null +++ b/tests/go/solutions/nenokku/nenokku_test.go @@ -0,0 +1,56 @@ +package main + +import ( + "testing" + "github.com/01-edu/z01" +) + +type node struct { + operations []string +} + +func TestNenokku(t *testing.T) { + + table := []node{} + + table = append(table, + node{ + []string{ + "? love", + "? is", + "A loveis", + "? love", + "? Who", + "A Whoareyou", + "? is", + }, + }, + ) + + sets := [][]string { + []string{"An", "array", "variable", "denotes", "the", "entire", "array"}, + []string{"This", "means", "that", "when", "you", "assign", "or", "pass"}, + []string{"To", "avoid", "the", "copy", "you", "could", "pass"}, + []string{"struct", "but", "with", "indexed", "rather", "than", "named", "fields"}, + } + ops := []string { + "?", "x", "A", + } + + for i := 0; i < 6; i++ { + result := []string{} + nOps := z01.RandIntBetween(3, 15) + index := z01.RandIntBetween(0, len(sets)-1) + for j := 0; j < nOps; j++ { + k := z01.RandIntBetween(0, len(ops)-1) + s := z01.RandIntBetween(0, len(sets[index])-1) + result = append(result, ops[k] + " " + sets[index][s]) + } + table = append(table, node{result}) + } + + + for _, arg := range table { + z01.ChallengeMainExam(t, arg.operations...) + } +} diff --git a/tests/go/solutions/nrune.go b/tests/go/solutions/nrune.go new file mode 100644 index 00000000..ccf845ba --- /dev/null +++ b/tests/go/solutions/nrune.go @@ -0,0 +1,9 @@ +package solutions + +func NRune(s string, n int) rune { + if n > len(s) || n < 1 { + return 0 + } + runes := []rune(s) + return runes[n-1] +} diff --git a/tests/go/solutions/nruneprog/main.go b/tests/go/solutions/nruneprog/main.go new file mode 100644 index 00000000..be94ee66 --- /dev/null +++ b/tests/go/solutions/nruneprog/main.go @@ -0,0 +1,38 @@ +package main + +import ( + "fmt" + "os" + "strconv" + + solutions ".." +) + +func NRune(s string, n int) rune { + if n > len(s) || n < 1 { + return 0 + } + runes := []rune(s) + return runes[n-1] +} + +func main() { + if len(os.Args) != 3 { + return + } + val, err := strconv.Atoi(os.Args[2]) + + if err != nil { + fmt.Printf("\"%s\" is not an integer value\n", os.Args[2]) + return + } + + rune := solutions.NRune(os.Args[1], val) + + if rune == 0 { + fmt.Printf("Invalid position: \"%d\" in \"%s\"\n", val, os.Args[1]) + return + } + + fmt.Printf("%c\n", rune) +} diff --git a/tests/go/solutions/nruneprog/nruneprog_test.go b/tests/go/solutions/nruneprog/nruneprog_test.go new file mode 100644 index 00000000..cf681ff0 --- /dev/null +++ b/tests/go/solutions/nruneprog/nruneprog_test.go @@ -0,0 +1,44 @@ +package main + +import ( + "math/rand" + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" +) + +func TestNRune(t *testing.T) { + type node struct { + word string + n int + } + + table := []node{} + + for i := 0; i < 30; i++ { + wordToInput := z01.RandASCII() + val := node{ + word: wordToInput, + n: rand.Intn(len(wordToInput)) + 1, + } + table = append(table, val) + } + + table = append(table, + node{word: "Hello!", n: 3}, + node{word: "Salut!", n: 2}, + node{word: "Ola!", n: 4}, + node{word: "♥01!", n: 1}, + node{word: "Not", n: 6}, + node{word: "Also not", n: 9}, + node{word: "Tree house", n: 5}, + node{word: "Whatever", n: 0}, + node{word: "Whatshisname", n: -2}, + ) + + for _, arg := range table { + z01.Challenge(t, NRune, solutions.NRune, arg.word, arg.n) + } +} diff --git a/tests/go/solutions/onlya/main.go b/tests/go/solutions/onlya/main.go new file mode 100644 index 00000000..930abb29 --- /dev/null +++ b/tests/go/solutions/onlya/main.go @@ -0,0 +1,9 @@ +package main + +import ( + "github.com/01-edu/z01" +) + +func main() { + z01.PrintRune('a') +} diff --git a/tests/go/solutions/onlya/onlya_test.go b/tests/go/solutions/onlya/onlya_test.go new file mode 100644 index 00000000..a4015576 --- /dev/null +++ b/tests/go/solutions/onlya/onlya_test.go @@ -0,0 +1,11 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestOnlya(t *testing.T) { + z01.ChallengeMainExam(t) +} diff --git a/tests/go/solutions/onlyz/main.go b/tests/go/solutions/onlyz/main.go new file mode 100644 index 00000000..3414268a --- /dev/null +++ b/tests/go/solutions/onlyz/main.go @@ -0,0 +1,9 @@ +package main + +import ( + "github.com/01-edu/z01" +) + +func main() { + z01.PrintRune('z') +} diff --git a/tests/go/solutions/onlyz/onlyz_test.go b/tests/go/solutions/onlyz/onlyz_test.go new file mode 100644 index 00000000..e8817ccb --- /dev/null +++ b/tests/go/solutions/onlyz/onlyz_test.go @@ -0,0 +1,10 @@ +package main + +import ( + "github.com/01-edu/z01" + "testing" +) + +func TestOnlyz(t *testing.T) { + z01.ChallengeMainExam(t) +} diff --git a/tests/go/solutions/options/main.go b/tests/go/solutions/options/main.go new file mode 100644 index 00000000..f717be9b --- /dev/null +++ b/tests/go/solutions/options/main.go @@ -0,0 +1,50 @@ +package main + +import ( + "fmt" + "os" +) + +func printOptions(op [32]int, i int) { + for _, v := range op { + if i == 8 { + fmt.Print(" ") + i = 0 + } + fmt.Print(v) + i++ + } + fmt.Println() +} + +func main() { + var options [32]int + pos := 1 + size := len(os.Args) + if size < 2 { + fmt.Println("options: abcdefghijklmnopqrstuvwxyz") + } else { + for pos < size { + j := 1 + if os.Args[pos][0] == '-' { + if os.Args[pos][1] == 'h' { + fmt.Println("options: abcdefghijklmnopqrstuvwxyz") + return + } + for j < len(os.Args[pos]) && os.Args[pos][j] >= 'a' && os.Args[pos][j] <= 'z' { + posOption := 'z' - os.Args[pos][j] + 6 + options[posOption] = 1 + j++ + } + + if j < len(os.Args[pos]) && os.Args[pos][j] <= 'a' && os.Args[pos][j] <= 'z' { + fmt.Println("Invalid Option") + return + } + j++ + } + pos++ + } + printOptions(options, 0) + } +} diff --git a/tests/go/solutions/options/options_test.go b/tests/go/solutions/options/options_test.go new file mode 100644 index 00000000..a94f6429 --- /dev/null +++ b/tests/go/solutions/options/options_test.go @@ -0,0 +1,35 @@ +package main + +import ( + "strings" + "testing" + + "github.com/01-edu/z01" +) + +func TestOptions(t *testing.T) { + var table []string + + table = append(table, "-"+z01.RandLower(), + " ", + "-%", + "-?", + "-=", + "-abc -ijk", + "-z", + "-abc -hijk", + "-abcdefghijklmnopqrstuvwxyz", + "-abcdefgijklmnopqrstuvwxyz", + "-eeeeee", + "-hhhhhh", + "-h", + "-hz", + "-zh", + "-z -h", + strings.Join([]string{"-", z01.RandStr(10, z01.RuneRange('a', 'z'))}, ""), + ) + + for _, s := range table { + z01.ChallengeMainExam(t, strings.Fields(s)...) + } +} diff --git a/tests/go/solutions/paramcount/main.go b/tests/go/solutions/paramcount/main.go new file mode 100644 index 00000000..66746a0d --- /dev/null +++ b/tests/go/solutions/paramcount/main.go @@ -0,0 +1,10 @@ +package main + +import ( + "fmt" + "os" +) + +func main() { + fmt.Println(len(os.Args) - 1) +} diff --git a/tests/go/solutions/paramcount/paramcount_test.go b/tests/go/solutions/paramcount/paramcount_test.go new file mode 100644 index 00000000..fc7b7bc7 --- /dev/null +++ b/tests/go/solutions/paramcount/paramcount_test.go @@ -0,0 +1,36 @@ +package main + +import ( + "strconv" + "testing" + + "github.com/01-edu/z01" +) + +func TestParamCount(t *testing.T) { + arg1 := []string{"2", "5", "u", "19"} + arg2 := []string{"2"} + arg3 := []string{"1", "2", "3", "5", "7", "24"} + arg4 := []string{"6", "12", "24"} + + args := [][]string{arg1, arg2, arg3, arg4} + + for i := 0; i < 10; i++ { + var arg []string + init := z01.RandIntBetween(0, 10) + for i := init; i < init+z01.RandIntBetween(5, 10); i++ { + arg = append(arg, strconv.Itoa(i)) + } + args = append(args, arg) + } + + for i := 0; i < 1; i++ { + args = append(args, z01.MultRandWords()) + } + + for _, v := range args { + z01.ChallengeMainExam(t, v...) + } + + z01.ChallengeMainExam(t) +} diff --git a/tests/go/solutions/piglatin/main.go b/tests/go/solutions/piglatin/main.go new file mode 100644 index 00000000..bebe8449 --- /dev/null +++ b/tests/go/solutions/piglatin/main.go @@ -0,0 +1,38 @@ +package main + +import ( + "fmt" + "os" + "github.com/01-edu/z01" +) + +func main() { + if len(os.Args) != 2 || os.Args[1] == "" { + z01.PrintRune('\n') + return + } + letters := []rune(os.Args[1]) + switch letters[0] { + case 'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U': + fmt.Print(os.Args[1] + "ay\n") + default: + start := firstNotVowel(letters) + if start == 0 { + fmt.Println("No vowels") + } else { + fmt.Print(string(letters[start:]) + string(letters[:start]) + "ay\n") + } + } +} + +func firstNotVowel(letters []rune) int { + index := 0 + for i := 0; i < len(letters); i++ { + if letters[i] == 'a' || letters[i] == 'e' || letters[i] == 'i' || letters[i] == 'o' || letters[i] == 'u' || + letters[i] == 'A' || letters[i] == 'E' || letters[i] == 'I' || letters[i] == 'O' || letters[i] == 'U' { + return index + } + index++ + } + return 0 +} diff --git a/tests/go/solutions/piglatin/piglatin_test.go b/tests/go/solutions/piglatin/piglatin_test.go new file mode 100644 index 00000000..9a3a4f75 --- /dev/null +++ b/tests/go/solutions/piglatin/piglatin_test.go @@ -0,0 +1,22 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestPigLatin(t *testing.T) { + type args struct { + first []string + } + arr := []args{{first: []string{"", "pig", "is", "crunch", "crnch"}}, {first: []string{"something", "else"}}} + + for i := 0; i < 4; i++ { + arr = append(arr, args{first: z01.MultRandBasic()}) + } + + for _, v := range arr { + z01.ChallengeMainExam(t, v.first...) + } +} diff --git a/tests/go/solutions/pilot.go b/tests/go/solutions/pilot.go new file mode 100644 index 00000000..226946ca --- /dev/null +++ b/tests/go/solutions/pilot.go @@ -0,0 +1,10 @@ +package solutions + +type Pilot struct { + Name string + Life float32 + Age int + Aircraft int +} + +const AIRCRAFT1 = 1 diff --git a/tests/go/solutions/pilot/pilot.go b/tests/go/solutions/pilot/pilot.go new file mode 100644 index 00000000..b2b856ab --- /dev/null +++ b/tests/go/solutions/pilot/pilot.go @@ -0,0 +1,16 @@ +package main + +import ( + student ".." + "fmt" +) + +func main() { + var donnie student.Pilot + donnie.Name = "Donnie" + donnie.Life = 100.0 + donnie.Age = 24 + donnie.Aircraft = student.AIRCRAFT1 + + fmt.Println(donnie) +} diff --git a/tests/go/solutions/point/main.go b/tests/go/solutions/point/main.go new file mode 100644 index 00000000..bf9b809c --- /dev/null +++ b/tests/go/solutions/point/main.go @@ -0,0 +1,22 @@ +package main + +import "fmt" + +type point struct { + x int + y int +} + +func setPoint(ptr *point) { + ptr.x = 42 + ptr.y = 21 +} + +func main() { + points := &point{} + + setPoint(points) + + fmt.Printf("x = %d, y = %d", points.x, points.y) + fmt.Println() +} diff --git a/tests/go/solutions/pointone.go b/tests/go/solutions/pointone.go new file mode 100644 index 00000000..10556e96 --- /dev/null +++ b/tests/go/solutions/pointone.go @@ -0,0 +1,5 @@ +package solutions + +func PointOne(n *int) { + *n = 1 +} diff --git a/tests/go/solutions/printalphabet/printalphabet.go b/tests/go/solutions/printalphabet/printalphabet.go new file mode 100644 index 00000000..c7ce6d41 --- /dev/null +++ b/tests/go/solutions/printalphabet/printalphabet.go @@ -0,0 +1,12 @@ +package main + +import ( + "github.com/01-edu/z01" +) + +func main() { + for i := 'a'; i <= 'z'; i++ { + z01.PrintRune(i) + } + z01.PrintRune('\n') +} diff --git a/tests/go/solutions/printalphabetprog/main.go b/tests/go/solutions/printalphabetprog/main.go new file mode 100644 index 00000000..c7ce6d41 --- /dev/null +++ b/tests/go/solutions/printalphabetprog/main.go @@ -0,0 +1,12 @@ +package main + +import ( + "github.com/01-edu/z01" +) + +func main() { + for i := 'a'; i <= 'z'; i++ { + z01.PrintRune(i) + } + z01.PrintRune('\n') +} diff --git a/tests/go/solutions/printalphabetprog/printalphabetprog_test.go b/tests/go/solutions/printalphabetprog/printalphabetprog_test.go new file mode 100644 index 00000000..8a06582b --- /dev/null +++ b/tests/go/solutions/printalphabetprog/printalphabetprog_test.go @@ -0,0 +1,10 @@ +package main + +import ( + "github.com/01-edu/z01" + "testing" +) + +func TestPrintAlphabetProg(t *testing.T) { + z01.ChallengeMainExam(t) +} diff --git a/tests/go/solutions/printbits/main.go b/tests/go/solutions/printbits/main.go new file mode 100644 index 00000000..a3fef136 --- /dev/null +++ b/tests/go/solutions/printbits/main.go @@ -0,0 +1,18 @@ +package main + +import ( + "fmt" + "os" + "strconv" +) + +func main() { + if len(os.Args) == 2 { + nbr, _ := strconv.Atoi(os.Args[1]) + printBits(byte(nbr)) + } +} + +func printBits(octe byte) { + fmt.Printf("%08b", octe) +} diff --git a/tests/go/solutions/printbits/printbits_test.go b/tests/go/solutions/printbits/printbits_test.go new file mode 100644 index 00000000..621700bd --- /dev/null +++ b/tests/go/solutions/printbits/printbits_test.go @@ -0,0 +1,26 @@ +package main + +import ( + "strconv" + "strings" + "testing" + + "github.com/01-edu/z01" +) + +func TestPrintBits(t *testing.T) { + var arg []string + for i := 0; i < 20; i++ { + arg = append(arg, strconv.Itoa(z01.RandIntBetween(0, 255))) + } + arg = append(arg, "") + arg = append(arg, "a") + arg = append(arg, "bc") + arg = append(arg, "def") + arg = append(arg, "notanumber") + arg = append(arg, z01.RandBasic()) + + for _, v := range arg { + z01.ChallengeMainExam(t, strings.Fields(v)...) + } +} diff --git a/tests/go/solutions/printchessboard.go b/tests/go/solutions/printchessboard.go new file mode 100644 index 00000000..f51b7177 --- /dev/null +++ b/tests/go/solutions/printchessboard.go @@ -0,0 +1,47 @@ +package solutions + +import ( + "github.com/01-edu/z01" + "os" + "strconv" +) + +func printLineCh(str string) { + for _, c := range str { + z01.PrintRune(c) + } + z01.PrintRune('\n') +} + +func solve(x, y int) { + for i := 0; i < x; i++ { + line := "" + for j := 0; j < y; j++ { + if (i%2 == 0) && (j%2 == 0) { + line += "#" + } else if (i%2 == 0) && (j%2 == 1) { + line += " " + } else if (i%2 == 1) && (j%2 == 1) { + line += "#" + } else { + line += " " + } + } + printLineCh(line) + } +} + +func main() { + args := os.Args[1:] + if len(args) != 2 { + printLineCh("Error") + return + } + x, _ := strconv.Atoi(args[1]) + y, _ := strconv.Atoi(args[0]) + if x <= 0 || y <= 0 { + printLineCh("Error") + return + } + solve(x, y) +} diff --git a/tests/go/solutions/printchessboard/main.go b/tests/go/solutions/printchessboard/main.go new file mode 100644 index 00000000..6e92e5e9 --- /dev/null +++ b/tests/go/solutions/printchessboard/main.go @@ -0,0 +1,47 @@ +package main + +import ( + "github.com/01-edu/z01" + "os" + "strconv" +) + +func printLine(str string) { + for _, c := range str { + z01.PrintRune(c) + } + z01.PrintRune('\n') +} + +func solve(x, y int) { + for i := 0; i < x; i++ { + line := "" + for j := 0; j < y; j++ { + if (i%2 == 0) && (j%2 == 0) { + line += "#" + } else if (i%2 == 0) && (j%2 == 1) { + line += " " + } else if (i%2 == 1) && (j%2 == 1) { + line += "#" + } else { + line += " " + } + } + printLine(line) + } +} + +func main() { + args := os.Args[1:] + if len(args) != 2 { + printLine("Error") + return + } + x, _ := strconv.Atoi(args[1]) + y, _ := strconv.Atoi(args[0]) + if x <= 0 || y <= 0 { + printLine("Error") + return + } + solve(x, y) +} diff --git a/tests/go/solutions/printchessboard/printchessboard_test.go b/tests/go/solutions/printchessboard/printchessboard_test.go new file mode 100644 index 00000000..7bed560e --- /dev/null +++ b/tests/go/solutions/printchessboard/printchessboard_test.go @@ -0,0 +1,32 @@ +package main + +import ( + "github.com/01-edu/z01" + "strconv" + "testing" +) + +func TestPrintChessBoard(t *testing.T) { + table := [][]string{} + + table = append(table, + []string{"0", "0"}, + []string{"1", "2"}, + []string{"2"}, + []string{"0"}, + []string{"3", "3"}, + []string{"1", "5"}, + []string{"5", "1"}, + []string{"4", "3"}, + ) + + for i := 0; i < 2; i++ { + number1 := strconv.Itoa(z01.RandIntBetween(1, 200)) + number2 := strconv.Itoa(z01.RandIntBetween(1, 200)) + table = append(table, []string{number1, number2}) + } + + for _, v := range table { + z01.ChallengeMainExam(t, v...) + } +} diff --git a/tests/go/solutions/printcomb.go b/tests/go/solutions/printcomb.go new file mode 100644 index 00000000..8c6ec9de --- /dev/null +++ b/tests/go/solutions/printcomb.go @@ -0,0 +1,24 @@ +package solutions + +import ( + "github.com/01-edu/z01" +) + +func PrintComb() { + for i := '0'; i <= '7'; i++ { + for j := i + 1; j <= '8'; j++ { + for k := j + 1; k <= '9'; k++ { + z01.PrintRune(rune(i)) + z01.PrintRune(rune(j)) + z01.PrintRune(rune(k)) + if i < '7' { + z01.PrintRune(rune(',')) + z01.PrintRune(rune(' ')) + } else { + z01.PrintRune(rune('\n')) + } + + } + } + } +} diff --git a/tests/go/solutions/printcomb2.go b/tests/go/solutions/printcomb2.go new file mode 100644 index 00000000..c0265569 --- /dev/null +++ b/tests/go/solutions/printcomb2.go @@ -0,0 +1,22 @@ +package solutions + +import ( + "fmt" +) + +func PrintComb2() { + a := 0 + b := 1 + for a <= 98 { + b = a + 1 + for b <= 99 { + fmt.Printf("%.2d %.2d", a, b) + if !(a == 98 && b == 99) { + fmt.Print(", ") + } + b++ + } + a++ + } + fmt.Println() +} diff --git a/tests/go/solutions/printcombn.go b/tests/go/solutions/printcombn.go new file mode 100644 index 00000000..8d5f1e0d --- /dev/null +++ b/tests/go/solutions/printcombn.go @@ -0,0 +1,66 @@ +package solutions + +import ( + "fmt" +) + +func show(n int, table [9]int, tmax [9]int) { + i := 0 + for i < n { + fmt.Print(table[i]) + i++ + } + if table[0] != tmax[0] { + fmt.Print(", ") + } +} + +func printComb1() { + table := [9]int{0} + tmax := [9]int{9} + for table[0] <= tmax[0] { + show(1, table, tmax) + table[0]++ + } +} + +func PrintCombN(n int) { + table := [9]int{0, 1, 2, 3, 4, 5, 6, 7, 8} + tmax := [9]int{} + + if n == 1 { + printComb1() + } else { + i := n - 1 + j := 9 + for i >= 0 { + tmax[i] = j + i-- + j-- + } + i = n - 1 + for table[0] < tmax[0] { + if table[i] != tmax[i] { + show(n, table, tmax) + table[i]++ + } + if table[i] == tmax[i] { + if table[i-1] != tmax[i-1] { + show(n, table, tmax) + table[i-1]++ + j = i + for j < n { + table[j] = table[j-1] + 1 + j++ + } + i = n - 1 + } + } + for table[i] == tmax[i] && table[i-1] == tmax[i-1] && i > 1 { + i-- + } + } + show(n, table, tmax) + } + fmt.Println() +} diff --git a/tests/go/solutions/printcombprog/main.go b/tests/go/solutions/printcombprog/main.go new file mode 100644 index 00000000..49609ffa --- /dev/null +++ b/tests/go/solutions/printcombprog/main.go @@ -0,0 +1,28 @@ +package main + +import ( + "github.com/01-edu/z01" +) + +func printComb() { + for i := '0'; i <= '7'; i++ { + for j := i + 1; j <= '8'; j++ { + for k := j + 1; k <= '9'; k++ { + z01.PrintRune(rune(i)) + z01.PrintRune(rune(j)) + z01.PrintRune(rune(k)) + if i < '7' { + z01.PrintRune(rune(',')) + z01.PrintRune(rune(' ')) + } else { + z01.PrintRune(rune('\n')) + } + + } + } + } +} + +func main() { + printComb() +} diff --git a/tests/go/solutions/printcombprog/printcombprog_test.go b/tests/go/solutions/printcombprog/printcombprog_test.go new file mode 100644 index 00000000..d6361950 --- /dev/null +++ b/tests/go/solutions/printcombprog/printcombprog_test.go @@ -0,0 +1,11 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestPrintCombProg(t *testing.T) { + z01.ChallengeMainExam(t) +} diff --git a/tests/go/solutions/printdigits/main.go b/tests/go/solutions/printdigits/main.go new file mode 100644 index 00000000..e2df9aa1 --- /dev/null +++ b/tests/go/solutions/printdigits/main.go @@ -0,0 +1,10 @@ +package main + +import "github.com/01-edu/z01" + +func main() { + for i := '0'; i <= '9'; i++ { + z01.PrintRune(i) + } + z01.PrintRune('\n') +} diff --git a/tests/go/solutions/printdigitsprog/main.go b/tests/go/solutions/printdigitsprog/main.go new file mode 100644 index 00000000..e2df9aa1 --- /dev/null +++ b/tests/go/solutions/printdigitsprog/main.go @@ -0,0 +1,10 @@ +package main + +import "github.com/01-edu/z01" + +func main() { + for i := '0'; i <= '9'; i++ { + z01.PrintRune(i) + } + z01.PrintRune('\n') +} diff --git a/tests/go/solutions/printdigitsprog/printdigitsprog_test.go b/tests/go/solutions/printdigitsprog/printdigitsprog_test.go new file mode 100644 index 00000000..30893310 --- /dev/null +++ b/tests/go/solutions/printdigitsprog/printdigitsprog_test.go @@ -0,0 +1,10 @@ +package main + +import ( + "github.com/01-edu/z01" + "testing" +) + +func TestPrintDigitsProg(t *testing.T) { + z01.ChallengeMainExam(t) +} diff --git a/tests/go/solutions/printhex/main.go b/tests/go/solutions/printhex/main.go new file mode 100644 index 00000000..b5149230 --- /dev/null +++ b/tests/go/solutions/printhex/main.go @@ -0,0 +1,38 @@ +package main + +import ( + "fmt" + "os" + "strconv" + + "github.com/01-edu/z01" +) + +func printBase(nbr int, base string) { + var result []rune + typeBase := []rune(base) + baseSize := len(base) + pos := 0 + for nbr > 0 { + pos = nbr % baseSize + result = append(result, typeBase[pos]) + nbr = nbr / baseSize + } + for j := len(result) - 1; j >= 0; j-- { + z01.PrintRune(result[j]) + } +} + +func main() { + if len(os.Args) != 2 { + z01.PrintRune('\n') + } else { + nbr, _ := strconv.Atoi(os.Args[1]) + if nbr != 0 { + printBase(nbr, "0123456789abcdef") + z01.PrintRune('\n') + } else { + fmt.Println(0) + } + } +} diff --git a/tests/go/solutions/printhex/printhex_test.go b/tests/go/solutions/printhex/printhex_test.go new file mode 100644 index 00000000..d21962dc --- /dev/null +++ b/tests/go/solutions/printhex/printhex_test.go @@ -0,0 +1,30 @@ +package main + +import ( + "strconv" + "strings" + "testing" + + "github.com/01-edu/z01" +) + +func TestPrintHex(t *testing.T) { + var table []string + table = append(table, + " ", + "123 132 1", + "1 5", + "0", + ) + for i := 0; i < 10; i++ { + table = append(table, strconv.Itoa(z01.RandIntBetween(-1000, 2000000000))) + } + + for i := 0; i < 15; i++ { + table = append(table, strconv.Itoa(i)) + } + + for _, s := range table { + z01.ChallengeMainExam(t, strings.Fields(s)...) + } +} diff --git a/tests/go/solutions/printmemory.go b/tests/go/solutions/printmemory.go new file mode 100644 index 00000000..74722cb0 --- /dev/null +++ b/tests/go/solutions/printmemory.go @@ -0,0 +1,86 @@ +package solutions + +import ( + "github.com/01-edu/z01" +) + +func printBase(nbr int) int { + var result []rune + base := "0123456789abcdef" + typeBase := []rune(base) + a := 0 + pos := 0 + i := 0 + if nbr == 0 { + result = append(result, '0', '0') + i = 2 + } + for nbr > 0 { + pos = nbr % 16 + nbr = nbr / 16 + result = append(result, typeBase[pos]) + i++ + } + if i == 1 { + result = append(result, '0') + i = 2 + } + for j := i - 1; j >= 0; j-- { + z01.PrintRune(result[j]) + a++ + } + return a +} + +func printascii(a int) { + if a > 31 && a < 127 { + z01.PrintRune(rune(a)) + } else { + z01.PrintRune('.') + } +} + +func printLine(arr [10]int, start int, max int) { + a := 0 + a = start + aux := 0 + var b int + + for a < start+16 && a < max { + if a%4 == 0 && a != 0 { + z01.PrintRune('\n') + } + b = 8 - printBase(arr[a]) + for aux != b { + if b == 6 { + z01.PrintRune('0') + } + if aux == 1 { + z01.PrintRune(' ') + } + if b < 6 { + z01.PrintRune('0') + } + aux++ + } + z01.PrintRune(' ') + aux = 0 + a++ + } + z01.PrintRune('\n') + c := start + for c < start+16 && c < max { + printascii(arr[c]) + c++ + } + z01.PrintRune('\n') +} + +func PrintMemory(arr [10]int) { + i := 0 + size := len(arr) + for i < size { + printLine(arr, i, size) + i += 16 + } +} diff --git a/tests/go/solutions/printmemory/main.go b/tests/go/solutions/printmemory/main.go new file mode 100644 index 00000000..bb113edf --- /dev/null +++ b/tests/go/solutions/printmemory/main.go @@ -0,0 +1,90 @@ +package main + +import ( + "github.com/01-edu/z01" +) + +func printBase(nbr int) int { + var result []rune + base := "0123456789abcdef" + typeBase := []rune(base) + a := 0 + pos := 0 + i := 0 + if nbr == 0 { + result = append(result, '0', '0') + i = 2 + } + for nbr > 0 { + pos = nbr % 16 + nbr = nbr / 16 + result = append(result, typeBase[pos]) + i++ + } + if i == 1 { + result = append(result, '0') + i = 2 + } + for j := i - 1; j >= 0; j-- { + z01.PrintRune(result[j]) + a++ + } + return a +} + +func printascii(a int) { + if a > 31 && a < 127 { + z01.PrintRune(rune(a)) + } else { + z01.PrintRune('.') + } +} + +func printLine(arr [10]int, start int, max int) { + a := 0 + a = start + aux := 0 + var b int + + for a < start+16 && a < max { + if a%4 == 0 && a != 0 { + z01.PrintRune('\n') + } + b = 8 - printBase(arr[a]) + for aux != b { + if b == 6 { + z01.PrintRune('0') + } + if aux == 1 { + z01.PrintRune(' ') + } + if b < 6 { + z01.PrintRune('0') + } + aux++ + } + z01.PrintRune(' ') + aux = 0 + a++ + } + z01.PrintRune('\n') + c := start + for c < start+16 && c < max { + printascii(arr[c]) + c++ + } + z01.PrintRune('\n') +} + +func PrintMemory(arr [10]int) { + i := 0 + size := len(arr) + for i < size { + printLine(arr, i, size) + i += 16 + } +} + +func main() { + +} diff --git a/tests/go/solutions/printmemory/printmemory_test.go b/tests/go/solutions/printmemory/printmemory_test.go new file mode 100644 index 00000000..50f942b4 --- /dev/null +++ b/tests/go/solutions/printmemory/printmemory_test.go @@ -0,0 +1,23 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" +) + +func TestPrintMemory(t *testing.T) { + var table [10]int + + for j := 0; j < 5; j++ { + for i := 0; i < 10; i++ { + table[i] = z01.RandIntBetween(0, 1000) + } + z01.Challenge(t, PrintMemory, solutions.PrintMemory, table) + } + table2 := [10]int{104, 101, 108, 108, 111, 16, 21, 42} + z01.Challenge(t, PrintMemory, solutions.PrintMemory, table2) + +} diff --git a/tests/go/solutions/printnbr.go b/tests/go/solutions/printnbr.go new file mode 100644 index 00000000..62fff447 --- /dev/null +++ b/tests/go/solutions/printnbr.go @@ -0,0 +1,9 @@ +package solutions + +import ( + "fmt" +) + +func PrintNbr(n int) { + fmt.Print(n) +} diff --git a/tests/go/solutions/printnbrbase.go b/tests/go/solutions/printnbrbase.go new file mode 100644 index 00000000..451f2324 --- /dev/null +++ b/tests/go/solutions/printnbrbase.go @@ -0,0 +1,27 @@ +package solutions + +import ( + "github.com/01-edu/z01" +) + +func PrintNbrBase(n int, base string) { + if ValidBase(base) { + length := len(base) + sign := 1 + rbase := []rune(base) + if n < 0 { + z01.PrintRune('-') + sign = -1 + } + if n < length && n >= 0 { + z01.PrintRune(rbase[n]) + } else { + PrintNbrBase(sign*(n/length), base) + z01.PrintRune(rbase[sign*(n%length)]) + } + + } else { + z01.PrintRune('N') + z01.PrintRune('V') + } +} diff --git a/tests/go/solutions/printnbrinorder.go b/tests/go/solutions/printnbrinorder.go new file mode 100644 index 00000000..87db0e88 --- /dev/null +++ b/tests/go/solutions/printnbrinorder.go @@ -0,0 +1,40 @@ +package solutions + +import ( + "github.com/01-edu/z01" +) + +func sorting(arr []int) []int { + for run := true; run; { + run = false + for i := 1; i < len(arr); i++ { + if arr[i] < arr[i-1] { + arr[i], arr[i-1] = arr[i-1], arr[i] + run = true + } + } + } + return arr +} + +func intToDigits(n int) (digits []int) { + for n > 0 { + if n == 0 { + digits = append(digits, 0) + } else { + digits = append(digits, n%10) + } + n /= 10 + } + return +} + +func PrintNbrInOrder(n int) { + if n == 0 { + z01.PrintRune('0') + return + } + for _, c := range sorting(intToDigits(n)) { + z01.PrintRune(rune(c) + '0') + } +} diff --git a/tests/go/solutions/printparams/printparams.go b/tests/go/solutions/printparams/printparams.go new file mode 100644 index 00000000..4468610f --- /dev/null +++ b/tests/go/solutions/printparams/printparams.go @@ -0,0 +1,12 @@ +package main + +import ( + "fmt" + "os" +) + +func main() { + for _, a := range os.Args[1:] { + fmt.Println(a) + } +} diff --git a/tests/go/solutions/printprogramname/programname.go b/tests/go/solutions/printprogramname/programname.go new file mode 100644 index 00000000..50bbf255 --- /dev/null +++ b/tests/go/solutions/printprogramname/programname.go @@ -0,0 +1,10 @@ +package main + +import ( + "fmt" + "os" +) + +func main() { + fmt.Println(os.Args[0]) +} diff --git a/tests/go/solutions/printrevcombprog/main.go b/tests/go/solutions/printrevcombprog/main.go new file mode 100644 index 00000000..57906341 --- /dev/null +++ b/tests/go/solutions/printrevcombprog/main.go @@ -0,0 +1,25 @@ +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/printrevcombprog/printrevcombprog_test.go b/tests/go/solutions/printrevcombprog/printrevcombprog_test.go new file mode 100644 index 00000000..f70a7d70 --- /dev/null +++ b/tests/go/solutions/printrevcombprog/printrevcombprog_test.go @@ -0,0 +1,11 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestPrintRevCombProg(t *testing.T) { + z01.ChallengeMainExam(t) +} diff --git a/tests/go/solutions/printreversealphabet/printreversealphabet.go b/tests/go/solutions/printreversealphabet/printreversealphabet.go new file mode 100644 index 00000000..4db72f0d --- /dev/null +++ b/tests/go/solutions/printreversealphabet/printreversealphabet.go @@ -0,0 +1,12 @@ +package main + +import ( + "github.com/01-edu/z01" +) + +func main() { + for i := 'z'; i >= 'a'; i-- { + z01.PrintRune(i) + } + z01.PrintRune('\n') +} diff --git a/tests/go/solutions/printreversealphabetprog/main.go b/tests/go/solutions/printreversealphabetprog/main.go new file mode 100644 index 00000000..4db72f0d --- /dev/null +++ b/tests/go/solutions/printreversealphabetprog/main.go @@ -0,0 +1,12 @@ +package main + +import ( + "github.com/01-edu/z01" +) + +func main() { + for i := 'z'; i >= 'a'; i-- { + z01.PrintRune(i) + } + z01.PrintRune('\n') +} diff --git a/tests/go/solutions/printreversealphabetprog/printreversealphabetprog_test.go b/tests/go/solutions/printreversealphabetprog/printreversealphabetprog_test.go new file mode 100644 index 00000000..2cf56ef8 --- /dev/null +++ b/tests/go/solutions/printreversealphabetprog/printreversealphabetprog_test.go @@ -0,0 +1,11 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestPrintReverseAlphabetProg(t *testing.T) { + z01.ChallengeMainExam(t) +} diff --git a/tests/go/solutions/printstr.go b/tests/go/solutions/printstr.go new file mode 100644 index 00000000..7495ac60 --- /dev/null +++ b/tests/go/solutions/printstr.go @@ -0,0 +1,9 @@ +package solutions + +import ( + "fmt" +) + +func PrintStr(str string) { + fmt.Print(str) +} diff --git a/tests/go/solutions/printstrprog/main.go b/tests/go/solutions/printstrprog/main.go new file mode 100644 index 00000000..19995116 --- /dev/null +++ b/tests/go/solutions/printstrprog/main.go @@ -0,0 +1,14 @@ +package main + +import ( + "fmt" + "os" +) + +func main() { + if len(os.Args) != 2 { + return + } + + fmt.Println(os.Args[1]) +} diff --git a/tests/go/solutions/printstrprog/printstrprog_test.go b/tests/go/solutions/printstrprog/printstrprog_test.go new file mode 100644 index 00000000..04bc4e6c --- /dev/null +++ b/tests/go/solutions/printstrprog/printstrprog_test.go @@ -0,0 +1,15 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestPrintStrProg(t *testing.T) { + table := z01.MultRandASCII() + for _, arg := range table { + z01.ChallengeMainExam(t, arg) + } + z01.ChallengeMainExam(t, "Hello World!") +} diff --git a/tests/go/solutions/printwordstables.go b/tests/go/solutions/printwordstables.go new file mode 100644 index 00000000..29b85bfc --- /dev/null +++ b/tests/go/solutions/printwordstables.go @@ -0,0 +1,15 @@ +package solutions + +import ( + "fmt" +) + +func PrintWordsTables(table []string) { + for _, t := range table { + fmt.Println(t) + } +} + +func isSeparator(r rune) bool { + return r == ' ' || r == '\t' || r == '\n' +} diff --git a/tests/go/solutions/priorprime.go b/tests/go/solutions/priorprime.go new file mode 100644 index 00000000..4dc85fe5 --- /dev/null +++ b/tests/go/solutions/priorprime.go @@ -0,0 +1,25 @@ +package solutions + +//This solution is the comparing file of the staff +// Because the solution is a function, +// +//1) here the package is solutions +//2) it does not need an empty func main(){} +//3) its location is 1 level below the folder of the nauuo_test.go file + +func Priorprime(x int) int { + ans := 0 + ok := 0 + for i := 2; i < x; i++ { + ok = 1 + for j := 2; j*j <= i; j++ { + if i%j == 0 { + ok = 0 + } + } + if ok == 1 { + ans += i + } + } + return ans +} \ No newline at end of file diff --git a/tests/go/solutions/priorprime/main.go b/tests/go/solutions/priorprime/main.go new file mode 100644 index 00000000..2feda143 --- /dev/null +++ b/tests/go/solutions/priorprime/main.go @@ -0,0 +1,28 @@ +package main + +//This solution is the placeholder of the student solution +// for an exercise in the exam asking for a Function +//Remember the disclaimer!!!! +//1) here the package is main +//2) It does need an empty func main(){} + +func Priorprime(x int) int { + ans := 0 + ok := 0 + for i := 2; i < x; i++ { + ok = 1 + for j := 2; j*j <= i; j++ { + if i%j == 0 { + ok = 0 + } + } + if ok == 1 { + ans += i + } + } + return ans +} + +func main() { + +} diff --git a/tests/go/solutions/priorprime/priorprime_test.go b/tests/go/solutions/priorprime/priorprime_test.go new file mode 100644 index 00000000..40361455 --- /dev/null +++ b/tests/go/solutions/priorprime/priorprime_test.go @@ -0,0 +1,84 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" // This line is not necessary when testing an exercise with a program +) + +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) + + type node struct { + first int + } + + // Declaration of an empty array of type node{} + // note that in this case this is the easiest type of table to declare + // but a table can be of any other relevant type, (for example []string{}, []int{} if it + // were a single string tested or a single int) + + table := []node{} + // Initial filling of that array with the values I see in the examples of the subject + + table = append(table, + node{50}, + node{13}, + node{10}, + node{0}, + node{1}, + node{2}, + ) + + // If we were to leave the table as it is, a student could just do a program with 4 ifs and get + // "around" the goal of the exercise. We are now going to add 15 random tests using the z01 testing library + + for i := 0; i < 15; i++ { + value := node{ + first: z01.RandIntBetween(0, 1000), + //this z01.RandIntBetween function allows the randomization of + //the int for each value in a desired range. + //Note that they are many others of those functions for other types of data + //Do not hesitate to have a look at all of them https://github.com/01-edu/z01 + } + + //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" + //Because the exercise asks for a function we are now using the Challenge function (this function would + // be the ChallengeMainExam function) + + for _, arg := range table { + z01.Challenge(t, Priorprime, solutions.Priorprime, arg.first) + } + + // the z01.Challenge function is here applied to each argument of the table. It musts contains: + // 1) first, the t argument from the T structure imported from the package "testing" + // + // 2) second, the function from the student, in this case Nauuo + //(this disapears in the ChallengeMainExam function) + // 3) third, the function from the staff, in this case solutions.Nauuo + //(this disapears as well in the ChallengeMainExam function) + // 4) all the arguments to be tested, in this case it is the plus, minus and rand from each structure, + // notice that they are accessed with arg. (the arg notation comes from the way it was name in the + // range loop over the table) + + // Now that this is done. re-read the quickReadme (the test your test recap) and apply all the commands + // and intructions. We strongly advise to check that your error messages matches your subject. + // and that you ask a colleague to double check. + + //FINAL STEP: + // 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 new file mode 100644 index 00000000..1d260cfc --- /dev/null +++ b/tests/go/solutions/raid1a.go @@ -0,0 +1,44 @@ +package solutions + +import "github.com/01-edu/z01" + +func drawLine(x int, str string) { + strConverted := []rune(str) + beg := strConverted[0] + med := strConverted[1] + end := strConverted[2] + if x >= 1 { + z01.PrintRune(beg) + } + if x > 2 { + for i := 0; i < (x - 2); i++ { + z01.PrintRune(med) + } + } + if x > 1 { + z01.PrintRune(end) + } + z01.PrintRune('\n') +} + +func printTheLines(x, y int, strBeg, strMed, strEnd string) { + + if y >= 1 { + drawLine(x, strBeg) + } + if y > 2 { + for i := 0; i < y-2; i++ { + drawLine(x, strMed) + } + } + if y > 1 { + drawLine(x, strEnd) + } +} + +func Raid1a(x, y int) { + if x < 1 || y < 1 { + return + } + printTheLines(x, y, "o-o", "| |", "o-o") +} diff --git a/tests/go/solutions/raid1b.go b/tests/go/solutions/raid1b.go new file mode 100644 index 00000000..5c4fb958 --- /dev/null +++ b/tests/go/solutions/raid1b.go @@ -0,0 +1,44 @@ +package solutions + +import "github.com/01-edu/z01" + +func drawLineRaid1b(x int, str string) { + strConverted := []rune(str) + beg := strConverted[0] + med := strConverted[1] + end := strConverted[2] + if x >= 1 { + z01.PrintRune(beg) + } + if x > 2 { + for i := 0; i < (x - 2); i++ { + z01.PrintRune(med) + } + } + if x > 1 { + z01.PrintRune(end) + } + z01.PrintRune('\n') +} + +func Raid1b(x, y int) { + + if x < 1 || y < 1 { + return + } + strBeg := "/*\\" + strMed := "* *" + strEnd := "\\*/" + + if y >= 1 { + drawLineRaid1b(x, strBeg) + } + if y > 2 { + for i := 0; i < y-2; i++ { + drawLineRaid1b(x, strMed) + } + } + if y > 1 { + drawLineRaid1b(x, strEnd) + } +} diff --git a/tests/go/solutions/raid1c.go b/tests/go/solutions/raid1c.go new file mode 100644 index 00000000..5f598170 --- /dev/null +++ b/tests/go/solutions/raid1c.go @@ -0,0 +1,44 @@ +package solutions + +import "github.com/01-edu/z01" + +func drawLineRaid1c(x int, str string) { + strConverted := []rune(str) + beg := strConverted[0] + med := strConverted[1] + end := strConverted[2] + if x >= 1 { + z01.PrintRune(beg) + } + if x > 2 { + for i := 0; i < (x - 2); i++ { + z01.PrintRune(med) + } + } + if x > 1 { + z01.PrintRune(end) + } + z01.PrintRune('\n') +} + +func Raid1c(x, y int) { + + if x < 1 || y < 1 { + return + } + strBeg := "ABA" + strMed := "B B" + strEnd := "CBC" + + if y >= 1 { + drawLineRaid1c(x, strBeg) + } + if y > 2 { + for i := 0; i < y-2; i++ { + drawLineRaid1c(x, strMed) + } + } + if y > 1 { + drawLineRaid1c(x, strEnd) + } +} diff --git a/tests/go/solutions/raid1d.go b/tests/go/solutions/raid1d.go new file mode 100644 index 00000000..a7894bcd --- /dev/null +++ b/tests/go/solutions/raid1d.go @@ -0,0 +1,44 @@ +package solutions + +import "github.com/01-edu/z01" + +func drawLineRaid1d(x int, str string) { + strConverted := []rune(str) + beg := strConverted[0] + med := strConverted[1] + end := strConverted[2] + if x >= 1 { + z01.PrintRune(beg) + } + if x > 2 { + for i := 0; i < (x - 2); i++ { + z01.PrintRune(med) + } + } + if x > 1 { + z01.PrintRune(end) + } + z01.PrintRune('\n') +} + +func Raid1d(x, y int) { + + if x < 1 || y < 1 { + return + } + strBeg := "ABC" + strMed := "B B" + strEnd := "ABC" + + if y >= 1 { + drawLineRaid1d(x, strBeg) + } + if y > 2 { + for i := 0; i < y-2; i++ { + drawLineRaid1d(x, strMed) + } + } + if y > 1 { + drawLineRaid1d(x, strEnd) + } +} diff --git a/tests/go/solutions/raid1e.go b/tests/go/solutions/raid1e.go new file mode 100644 index 00000000..84ce8108 --- /dev/null +++ b/tests/go/solutions/raid1e.go @@ -0,0 +1,44 @@ +package solutions + +import "github.com/01-edu/z01" + +func drawLineRaid1e(x int, str string) { + strConverted := []rune(str) + beg := strConverted[0] + med := strConverted[1] + end := strConverted[2] + if x >= 1 { + z01.PrintRune(beg) + } + if x > 2 { + for i := 0; i < (x - 2); i++ { + z01.PrintRune(med) + } + } + if x > 1 { + z01.PrintRune(end) + } + z01.PrintRune('\n') +} + +func Raid1e(x, y int) { + + if x < 1 || y < 1 { + return + } + strBeg := "ABC" + strMed := "B B" + strEnd := "CBA" + + if y >= 1 { + drawLineRaid1e(x, strBeg) + } + if y > 2 { + for i := 0; i < y-2; i++ { + drawLineRaid1e(x, strMed) + } + } + if y > 1 { + drawLineRaid1e(x, strEnd) + } +} diff --git a/tests/go/solutions/raid2/sudoku.go b/tests/go/solutions/raid2/sudoku.go new file mode 100644 index 00000000..362b50b3 --- /dev/null +++ b/tests/go/solutions/raid2/sudoku.go @@ -0,0 +1,166 @@ +package main + +import ( + "fmt" + "os" + + "github.com/01-edu/z01" +) + +// Prints in standard output the sudoku board +func printBoard(board [][]rune) { + for _, row := range board { + for i, e := range row { + z01.PrintRune(e) + if i != len(row)-1 { + z01.PrintRune(' ') + } + } + z01.PrintRune('\n') + } +} + +// Return true if the value 'value' is in the row 'y' of the board 'board' +func isInRow(board [][]rune, value rune, x, y int) bool { + for i, v := range board[y] { + if i != x && v == value { + return true + } + } + return false +} + +// Returns true if the value 'value' is in the column 'x' of the board 'board' +func isInColumn(board [][]rune, value rune, x, y int) bool { + for i := 0; i < 9; i++ { + if i != y && board[i][x] == value { + return true + } + } + return false +} + +// Receives an int 'x' and returns the beginning and the end +// of the interval of consecutive pairs of multiples of three 'x' is in. +// Ex. for x = 2, x is in (0, 3) +// for x = 4, x is in (3, 6) +func intervalThree(x int, max int) (int, int) { + var i int + for i = 0; i < max; i += 3 { + if x >= i && x < i+3 { + break + } + } + endi := 3 + i + return i, endi +} + +// Returns true if the value 'value' is allowed in the possition (x,y) of the board 'board' +func isAllowedInBox(board [][]rune, value rune, x, y int) bool { + n := len(board) + begi, endi := intervalThree(x, n) + begj, endj := intervalThree(y, n) + for j := begj; j < endj; j++ { + for i := begi; i < endi; i++ { + if (j != y || i != i) && board[j][i] == value { + return false + } + } + } + return true +} + +// Returns true if the value 'val' is allowed in the position (x, y) of the board +func isAllowed(board [][]rune, val rune, x, y int) bool { + return !isInRow(board, val, x, y) && + !isInColumn(board, val, x, y) && + isAllowedInBox(board, val, x, y) +} + +// Returns true if the position doesn't have any value defined +// That is, if the character is a dot '.' +func isEmpty(board [][]rune, x, y int) bool { + return board[y][x] == '.' +} + +// Returns all the empty positions in the board +func availablePos(board [][]rune) [][]int { + var ava [][]int + for y, row := range board { + for x, e := range row { + if e == '.' { + ava = append(ava, []int{x, y}) + } + } + } + return ava +} + +func validBoard(board [][]rune) bool { + size := 9 + if len(board) != size { + return false + } + for y, row := range board { + if len(row) != size { + return false + } + for x, e := range row { + if (e < '1' || e > '9') && e != '.' { + return false + } + if e != '.' && !isAllowed(board, e, x, y) { + return false + } + } + } + return true +} + +// Returns true if the sudoku has a solution +func sudokuH(board [][]rune, available [][]int, i int) bool { + n := len(available) + + if i >= n { + return true + } + + x := available[i][0] + y := available[i][1] + + for c := '1'; c <= '9'; c++ { + if isAllowed(board, c, x, y) { + board[y][x] = c + if sudokuH(board, available, i+1) { + return true + } + board[y][x] = '.' + } + } + return false +} + +// Receives a board and fills the empty positions with the correct +// value +func solveSudoku(board [][]rune) { + available := availablePos(board) + if sudokuH(board, available, 0) { + printBoard(board) + } else { + fmt.Println("Error") + } +} + +func main() { + var board [][]rune + + for _, v := range os.Args[1:] { + board = append(board, []rune(v)) + } + + if validBoard(board) { + solveSudoku(board) + } else { + fmt.Println("Error") + } +} diff --git a/tests/go/solutions/raid3/main.go b/tests/go/solutions/raid3/main.go new file mode 100644 index 00000000..936ff0e7 --- /dev/null +++ b/tests/go/solutions/raid3/main.go @@ -0,0 +1,87 @@ +package main + +import ( + "bufio" + "fmt" + "os" + "strconv" + "strings" +) + +// counts in the Cartesian coordinates x and y +func countXY(output []rune) (x, y int) { + countX := 0 + countY := 0 + flag := false + for _, s := range output { + if s == '\n' { + countY++ + flag = true + } else if !flag { + countX++ + } + } + return countX, countY +} + +func determineInput(output []rune) { + x, y := countXY(output) + // the leftC and rightC -> position of the corners + // this will be to see what raid1 is being used + // for the lower left corner + leftC := ((x * y) + y - 1) - x + // for the lower right corner + rightC := (x * y) + y - 2 + // for the upper right corner + rightUpC := x - 1 + + X := strconv.Itoa(x) + Y := strconv.Itoa(y) + result := isPipedWith(output, leftC, rightC, rightUpC, X, Y) + fmt.Println(strings.Join(result, " || ")) +} + +func isPipedWith(output []rune, leftC, rightC, rightUpC int, x, y string) []string { + result := []string{} + + if output[0] == 'o' { + result = append(result, "[raid1a] ["+x+"] ["+y+"]") + } else if output[0] == '/' { + result = append(result, "[raid1b] ["+x+"] ["+y+"]") + } else if output[0] == 'A' { + if (output[rightUpC] == 'A' && output[rightC] == 'C') || + (output[rightUpC] == 'A' && y == "1") || + (x == "1" && y == "1") { + result = append(result, "[raid1c] ["+x+"] ["+y+"]") + } + if (output[rightUpC] == 'C' && output[leftC] == 'A') || + (output[leftC] == 'A' && x == "1") || + (x == "1" && y == "1") { + result = append(result, "[raid1d] ["+x+"] ["+y+"]") + } + if (output[leftC] == 'C' && x == "1") || + (output[rightUpC] == 'C' && y == "1") || + (output[rightUpC] == 'C' && output[leftC] == 'C') || + (x == "1" && y == "1") { + result = append(result, "[raid1e] ["+x+"] ["+y+"]") + } + } + return result +} + +func main() { + reader := bufio.NewReader(os.Stdin) + var output []rune + for { + input, _, err := reader.ReadRune() + if err != nil { + break + } + output = append(output, input) + } + if output[0] != 'o' && output[0] != '/' && output[0] != 'A' { + fmt.Println("Not a Raid function") + return + } + determineInput(output) +} diff --git a/tests/go/solutions/raid3/raid1aProg/raid1a.go b/tests/go/solutions/raid3/raid1aProg/raid1a.go new file mode 100644 index 00000000..c7a6919a --- /dev/null +++ b/tests/go/solutions/raid3/raid1aProg/raid1a.go @@ -0,0 +1,23 @@ +package main + +import ( + "fmt" + "os" + "strconv" + + solutions "../.." +) + +func main() { + if len(os.Args) == 3 { + firstArg, err := strconv.Atoi(os.Args[1]) + secundArg, err2 := strconv.Atoi(os.Args[2]) + + if err != nil || err2 != nil { + fmt.Println(err.Error()) + } + solutions.Raid1a(firstArg, secundArg) + } else { + fmt.Println("to much arguments") + } +} diff --git a/tests/go/solutions/raid3/raid1bProg/raid1b.go b/tests/go/solutions/raid3/raid1bProg/raid1b.go new file mode 100644 index 00000000..87979317 --- /dev/null +++ b/tests/go/solutions/raid3/raid1bProg/raid1b.go @@ -0,0 +1,23 @@ +package main + +import ( + "fmt" + "os" + "strconv" + + solutions "../.." +) + +func main() { + if len(os.Args) == 3 { + firstArg, err := strconv.Atoi(os.Args[1]) + secundArg, err2 := strconv.Atoi(os.Args[2]) + + if err != nil || err2 != nil { + fmt.Println(err.Error()) + } + solutions.Raid1b(firstArg, secundArg) + } else { + fmt.Println("to much arguments") + } +} diff --git a/tests/go/solutions/raid3/raid1cProg/raid1c.go b/tests/go/solutions/raid3/raid1cProg/raid1c.go new file mode 100644 index 00000000..59ad18f2 --- /dev/null +++ b/tests/go/solutions/raid3/raid1cProg/raid1c.go @@ -0,0 +1,23 @@ +package main + +import ( + "fmt" + "os" + "strconv" + + solutions "../.." +) + +func main() { + if len(os.Args) == 3 { + firstArg, err := strconv.Atoi(os.Args[1]) + secundArg, err2 := strconv.Atoi(os.Args[2]) + + if err != nil || err2 != nil { + fmt.Println(err.Error()) + } + solutions.Raid1c(firstArg, secundArg) + } else { + fmt.Println("to much arguments") + } +} diff --git a/tests/go/solutions/raid3/raid1dProg/raid1d.go b/tests/go/solutions/raid3/raid1dProg/raid1d.go new file mode 100644 index 00000000..7daf0d68 --- /dev/null +++ b/tests/go/solutions/raid3/raid1dProg/raid1d.go @@ -0,0 +1,23 @@ +package main + +import ( + "fmt" + "os" + "strconv" + + solutions "../.." +) + +func main() { + if len(os.Args) == 3 { + firstArg, err := strconv.Atoi(os.Args[1]) + secundArg, err2 := strconv.Atoi(os.Args[2]) + + if err != nil || err2 != nil { + fmt.Println(err.Error()) + } + solutions.Raid1d(firstArg, secundArg) + } else { + fmt.Println("to much arguments") + } +} diff --git a/tests/go/solutions/raid3/raid1eProg/raid1e.go b/tests/go/solutions/raid3/raid1eProg/raid1e.go new file mode 100644 index 00000000..c483a88c --- /dev/null +++ b/tests/go/solutions/raid3/raid1eProg/raid1e.go @@ -0,0 +1,23 @@ +package main + +import ( + "fmt" + "os" + "strconv" + + solutions "../.." +) + +func main() { + if len(os.Args) == 3 { + firstArg, err := strconv.Atoi(os.Args[1]) + secundArg, err2 := strconv.Atoi(os.Args[2]) + + if err != nil || err2 != nil { + fmt.Println(err.Error()) + } + solutions.Raid1e(firstArg, secundArg) + } else { + fmt.Println("to much arguments") + } +} diff --git a/tests/go/solutions/range/main.go b/tests/go/solutions/range/main.go new file mode 100644 index 00000000..ed79967e --- /dev/null +++ b/tests/go/solutions/range/main.go @@ -0,0 +1,40 @@ +package main + +import ( + "fmt" + "os" + "strconv" +) + +func main() { + if len(os.Args) == 3 { + secondArg := 0 + firstArg, err := strconv.Atoi(os.Args[1]) + if err == nil { + secondArg, err = strconv.Atoi(os.Args[2]) + } + if err != nil { + fmt.Println(err.Error()) + return + } + fmt.Println(rangeOf(firstArg, secondArg)) + + } else { + fmt.Println() + } +} + +func rangeOf(start, end int) []int { + var ran []int + if start >= end { + for i := start; i >= end; i-- { + ran = append(ran, i) + } + return ran + } else { + for i := start; i <= end; i++ { + ran = append(ran, i) + } + return ran + } +} diff --git a/tests/go/solutions/range/range_test.go b/tests/go/solutions/range/range_test.go new file mode 100644 index 00000000..1aa3d1d6 --- /dev/null +++ b/tests/go/solutions/range/range_test.go @@ -0,0 +1,23 @@ +package main + +import ( + "strconv" + "testing" + + "github.com/01-edu/z01" +) + +func TestRange(t *testing.T) { + + 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.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) +} diff --git a/tests/go/solutions/reachablenumber.go b/tests/go/solutions/reachablenumber.go new file mode 100644 index 00000000..26637924 --- /dev/null +++ b/tests/go/solutions/reachablenumber.go @@ -0,0 +1,18 @@ +package solutions + +func Reachablenumber(n int) int { + cnt := 0 + for n > 0 { + cnt++ + if n < 10 { + cnt += 8 + break + } else { + n++ + } + for n%10 == 0 { + n /= 10 + } + } + return cnt +} diff --git a/tests/go/solutions/reachablenumberprog/main.go b/tests/go/solutions/reachablenumberprog/main.go new file mode 100644 index 00000000..79c3dc46 --- /dev/null +++ b/tests/go/solutions/reachablenumberprog/main.go @@ -0,0 +1,22 @@ +package main + +func Reachablenumber(n int) int { + cnt := 0 + for n > 0 { + cnt++ + if n < 10 { + cnt += 8 + break + } else { + n++ + } + for n%10 == 0 { + n /= 10 + } + } + return cnt +} + +func main() { + +} diff --git a/tests/go/solutions/reachablenumberprog/reachablenumber_test.go b/tests/go/solutions/reachablenumberprog/reachablenumber_test.go new file mode 100644 index 00000000..aa261635 --- /dev/null +++ b/tests/go/solutions/reachablenumberprog/reachablenumber_test.go @@ -0,0 +1,47 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" // This line is not necessary when testing an exercise with a program +) + +func TestReachableNumber(t *testing.T) { + type node struct { + n int + } + + table := []node{} + // Initial filling of that array with the values I see in the examples of the subject + + table = append(table, + node{20}, + node{1}, + node{9}, + node{2}, + ) + + // If we were to leave the table as it is, a student could just do a program with 4 ifs and get + // "around" the goal of the exercise. We are now going to add 15 random tests using the z01 testing library + + for i := 0; i < 25; i++ { + value := node{ + n: z01.RandIntBetween(1, 877), + } + + //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" + //Because the exercise asks for a function we are now using the Challenge function (this function would + // be the ChallengeMainExam function) + + for _, arg := range table { + z01.Challenge(t, Reachablenumber, solutions.Reachablenumber, arg.n) + } +} diff --git a/tests/go/solutions/rectangle/main.go b/tests/go/solutions/rectangle/main.go new file mode 100644 index 00000000..bf222ffa --- /dev/null +++ b/tests/go/solutions/rectangle/main.go @@ -0,0 +1,66 @@ +package main + +import ( + "fmt" +) + +type point struct { + x int + y int +} + +type rectangle struct { + upLeft point + downRight point +} + +func defineRectangle(vPoint []point, n int) *rectangle { + xmin := vPoint[0].x + xmax := vPoint[0].x + ymin := vPoint[0].y + ymax := vPoint[0].y + + ptr := &rectangle{} + + for i := 0; i < n; i++ { + if vPoint[i].x < xmin { + xmin = vPoint[i].x + } + if vPoint[i].x > xmax { + xmax = vPoint[i].x + } + if vPoint[i].y < ymin { + ymin = vPoint[i].y + } + if vPoint[i].y > ymax { + ymax = vPoint[i].y + } + } + ptr.upLeft.x = xmin + ptr.upLeft.y = ymax + ptr.downRight.x = xmax + ptr.downRight.y = ymin + + return ptr +} + +func calArea(ptr *rectangle) int { + return (ptr.upLeft.x - ptr.downRight.x) * (ptr.downRight.y - ptr.upLeft.y) +} + +func main() { + vPoint := []point{} + rectangle := &rectangle{} + n := 7 + + for i := 0; i < n; i++ { + val := point{ + x: i%2 + 1, + y: i + 2, + } + vPoint = append(vPoint, val) + } + + rectangle = defineRectangle(vPoint, n) + fmt.Println("area of the rectangle:", calArea(rectangle)) +} diff --git a/tests/go/solutions/recursivefactorial.go b/tests/go/solutions/recursivefactorial.go new file mode 100644 index 00000000..fb32c919 --- /dev/null +++ b/tests/go/solutions/recursivefactorial.go @@ -0,0 +1,17 @@ +package solutions + +import "math/bits" + +func RecursiveFactorial(nb int) int { + limit := 12 + if bits.UintSize == 64 { + limit = 20 + } + if nb < 0 || nb > limit { + return 0 + } + if nb == 0 { + return 1 + } + return nb * RecursiveFactorial(nb-1) +} diff --git a/tests/go/solutions/recursivepower.go b/tests/go/solutions/recursivepower.go new file mode 100644 index 00000000..0fa5fdd8 --- /dev/null +++ b/tests/go/solutions/recursivepower.go @@ -0,0 +1,12 @@ +package solutions + +import ( + "math" +) + +func RecursivePower(nb, power int) int { + if power < 0 { + return 0 + } + return int(math.Pow(float64(nb), float64(power))) +} diff --git a/tests/go/solutions/reduceint.go b/tests/go/solutions/reduceint.go new file mode 100644 index 00000000..e0c78b14 --- /dev/null +++ b/tests/go/solutions/reduceint.go @@ -0,0 +1,11 @@ +package solutions + +import "fmt" + +func ReduceInt(f func(int, int) int, arr []int) { + acc := arr[0] + for i := 1; i < len(arr); i++ { + acc = f(acc, arr[i]) + } + fmt.Println(acc) +} diff --git a/tests/go/solutions/reduceint/main.go b/tests/go/solutions/reduceint/main.go new file mode 100644 index 00000000..116eed1c --- /dev/null +++ b/tests/go/solutions/reduceint/main.go @@ -0,0 +1,15 @@ +package main + +import "fmt" + +func ReduceInt(f func(int, int) int, arr []int) { + acc := arr[0] + for i := 1; i < len(arr); i++ { + acc = f(acc, arr[i]) + } + fmt.Println(acc) +} + +func main() { + +} diff --git a/tests/go/solutions/reduceint/reduceint_test.go b/tests/go/solutions/reduceint/reduceint_test.go new file mode 100644 index 00000000..1120a429 --- /dev/null +++ b/tests/go/solutions/reduceint/reduceint_test.go @@ -0,0 +1,46 @@ +package main + +import ( + "testing" + + solutions "../../solutions" + "github.com/01-edu/z01" +) + +func TestReduceInt(t *testing.T) { + f := []func(int, int) int{Add, Sub, Mul} + argInt := []int{} + + type node struct { + arr []int + functions []func(int, int) int + } + + table := []node{} + for i := 0; i < 4; i++ { + argInt = z01.MultRandIntBetween(0, 50) + val := node{ + arr: argInt, + functions: f, + } + table = append(table, val) + } + + for _, v := range table { + for _, f := range v.functions { + z01.Challenge(t, ReduceInt, solutions.ReduceInt, f, v.arr) + } + } +} + +func Add(accumulator, currentValue int) int { + return accumulator + currentValue +} + +func Sub(accumulator, currentValue int) int { + return accumulator - currentValue +} + +func Mul(accumulator, currentValue int) int { + return currentValue * accumulator +} diff --git a/tests/go/solutions/repeatalpha/main.go b/tests/go/solutions/repeatalpha/main.go new file mode 100644 index 00000000..93a477db --- /dev/null +++ b/tests/go/solutions/repeatalpha/main.go @@ -0,0 +1,30 @@ +package main + +import ( + "github.com/01-edu/z01" + "os" +) + +func toLowerCase(a rune) rune { + if a >= 'A' && a <= 'Z' { + dif := 'a' - 'A' + return a + dif + } + return a +} + +func main() { + + if len(os.Args) > 1 { + arg := []rune(os.Args[1]) + for _, c := range arg { + z01.PrintRune(c) + rep := int(toLowerCase(c) - 'a') + for i := 0; i < rep; i++ { + z01.PrintRune(c) + } + } + } + + z01.PrintRune('\n') +} diff --git a/tests/go/solutions/repeatalpha/repeatalpha_test.go b/tests/go/solutions/repeatalpha/repeatalpha_test.go new file mode 100644 index 00000000..ccd46dc7 --- /dev/null +++ b/tests/go/solutions/repeatalpha/repeatalpha_test.go @@ -0,0 +1,26 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestRepeatAlpha(t *testing.T) { + args := []string{"Hello", + "World", + "Home", + "Theorem", + "Choumi is the best cat", + "abracadaba 01!", + "abc", + "MaTheMatiCs"} + + for i := 0; i < 5; i++ { + args = append(args, z01.RandAlnum()) + } + + for _, v := range args { + z01.ChallengeMainExam(t, v) + } +} diff --git a/tests/go/solutions/reverse.go b/tests/go/solutions/reverse.go new file mode 100644 index 00000000..f4cb8b67 --- /dev/null +++ b/tests/go/solutions/reverse.go @@ -0,0 +1,19 @@ +package solutions + +//This solution is the comparing file of the staff +// Because the solution is a function, +// +//1) here the package is solutions +//2) it does not need an empty func main(){} +//3) its location is 1 level below the folder of the nauuo_test.go file + +func Reverse(node *NodeAddL) *NodeAddL { + if node == nil { + return node + } + ans := &NodeAddL{Num: node.Num} + for tmp := node.Next; tmp != nil; tmp = tmp.Next { + ans = pushFront(ans, tmp.Num) + } + return ans +} diff --git a/tests/go/solutions/reverse/main.go b/tests/go/solutions/reverse/main.go new file mode 100644 index 00000000..396e0109 --- /dev/null +++ b/tests/go/solutions/reverse/main.go @@ -0,0 +1,36 @@ +package main + +//This solution is the placeholder of the student solution +// for an exercise in the exam asking for a Function +//Remember the disclaimer!!!! +//1) here the package is main +//2) It does need an empty func main(){} + +type NodeAddL struct { + Next *NodeAddL + Num int +} + +func pushFront(node *NodeAddL, num int) *NodeAddL { + tmp := &NodeAddL{Num: num} + if node == nil { + return tmp + } + tmp.Next = node + return tmp +} + +func Reverse(node *NodeAddL) *NodeAddL { + if node == nil { + return node + } + ans := &NodeAddL{Num: node.Num} + for tmp := node.Next; tmp != nil; tmp = tmp.Next { + ans = pushFront(ans, tmp.Num) + } + return ans +} + +func main() { + +} diff --git a/tests/go/solutions/reverse/reverse_test.go b/tests/go/solutions/reverse/reverse_test.go new file mode 100644 index 00000000..0404b261 --- /dev/null +++ b/tests/go/solutions/reverse/reverse_test.go @@ -0,0 +1,154 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" // This line is not necessary when testing an exercise with a program +) + +type stuNode = NodeAddL +type solNode = solutions.NodeAddL + +func stuPushFront(node *stuNode, num int) *stuNode { + tmp := &stuNode{Num: num} + tmp.Next = node + return tmp +} + +func stuNumToList(num int) *stuNode { + var res *stuNode + for num > 0 { + res = stuPushFront(res, num%10) + num /= 10 + } + return res +} + +func stuListToNum(node *stuNode) int { + var n int + + for tmp := node; tmp != nil; tmp = tmp.Next { + n = n*10 + tmp.Num + } + return n +} + +func solPushFront(node *solNode, num int) *solNode { + tmp := &solNode{Num: num} + tmp.Next = node + return tmp +} + +func solNumToList(num int) *solNode { + var res *solNode + for num > 0 { + res = solPushFront(res, num%10) + num /= 10 + } + return res +} + +func solListToNum(node *solNode) int { + var n int + + for tmp := node; tmp != nil; tmp = tmp.Next { + n = n*10 + tmp.Num + } + return n +} + +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.Errorf("\nReverse(%d) == %v instead of %v\n\n", + num1, stuNum, "") + } else if stuResult == nil && solResult != nil { + solNum := solListToNum(solResult) + t.Errorf("\nReverse(%d) == %v instead of %v\n\n", + num1, "", solNum) + } else { + stuNum := stuListToNum(stuResult) + solNum := solListToNum(solResult) + if stuNum != solNum { + t.Errorf("\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) + + type node struct { + num1 int + } + + // Declaration of an empty array of type node{} + // note that in this case this is the easiest type of table to declare + // but a table can be of any other relevant type, (for example []string{}, []int{} if it + // were a single string tested or a single int) + + table := []node{} + // Initial filling of that array with the values I see in the examples of the subject + + table = append(table, + node{123456543}, + ) + + // If we were to leave the table as it is, a student could just do a program with 4 ifs and get + // "around" the goal of the exercise. We are now going to add 15 random tests using the z01 testing library + + for i := 0; i < 15; i++ { + value := node{ + num1: z01.RandIntBetween(0, 1000000000), + //this z01.RandIntBetween function allows the randomization of + //the int for each value in a desired range. + //Note that they are many others of those functions for other types of data + //Do not hesitate to have a look at all of them https://github.com/01-edu/z01 + } + + //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" + //Because the exercise asks for a function we are now using the Challenge function (this function would + // be the ChallengeMainExam function) + + for _, arg := range table { + stuResult := Reverse(stuNumToList(arg.num1)) + solResult := solutions.Reverse(solNumToList(arg.num1)) + + compareNodes(t, stuResult, solResult, arg.num1) + } + + // the z01.Challenge function is here applied to each argument of the table. It musts contains: + // 1) first, the t argument from the T structure imported from the package "testing" + // + // 2) second, the function from the student, in this case Nauuo + //(this disapears in the ChallengeMainExam function) + // 3) third, the function from the staff, in this case solutions.Nauuo + //(this disapears as well in the ChallengeMainExam function) + // 4) all the arguments to be tested, in this case it is the plus, minus and rand from each structure, + // notice that they are accessed with arg. (the arg notation comes from the way it was name in the + // range loop over the table) + + // Now that this is done. re-read the quickReadme (the test your test recap) and apply all the commands + // and intructions. We strongly advise to check that your error messages matches your subject. + // and that you ask a colleague to double check. + + //FINAL STEP: + // 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/reversebits.go b/tests/go/solutions/reversebits.go new file mode 100644 index 00000000..8dd2eff6 --- /dev/null +++ b/tests/go/solutions/reversebits.go @@ -0,0 +1,9 @@ +package solutions + +import ( + "math/bits" +) + +func ReverseBits(by byte) byte { + return bits.Reverse8(uint8(by)) +} diff --git a/tests/go/solutions/reversebits/main.go b/tests/go/solutions/reversebits/main.go new file mode 100644 index 00000000..6b613ce4 --- /dev/null +++ b/tests/go/solutions/reversebits/main.go @@ -0,0 +1,16 @@ +package main + +import ( + "math/bits" +) + +func ReverseBits(by byte) byte { + return bits.Reverse8(uint8(by)) +} + +func main() { + // this main is for testing purposes only, uncomment if needed + // a := byte(0x26) + // fmt.Printf("%08b\n", a) + // fmt.Printf("%08b\n", ReverseBits(a)) +} diff --git a/tests/go/solutions/reversebits/reversebits_test.go b/tests/go/solutions/reversebits/reversebits_test.go new file mode 100644 index 00000000..e10083db --- /dev/null +++ b/tests/go/solutions/reversebits/reversebits_test.go @@ -0,0 +1,38 @@ +package main + +import ( + "reflect" + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" +) + +func challengeBytes(t *testing.T, + fn1, fn2 interface{}, args ...interface{}) { + st1 := z01.Monitor(fn1, args) + st2 := z01.Monitor(fn2, args) + if !reflect.DeepEqual(st1.Results, st2.Results) { + t.Errorf("%s(%08b) == %08b instead of %08b\n", + z01.NameOfFunc(fn1), + args[0].(byte), + st1.Results[0].(byte), + st2.Results[0].(byte), + ) + } +} + +func TestReverseBits(t *testing.T) { + args := []byte{byte(0x26), byte(0x27), byte(0x28), + byte(0x29), byte(0xAA), byte(0xBB)} + + for i := 0; i < 10; i++ { + n := z01.RandIntBetween(0, 255) + args = append(args, byte(n)) + } + + for _, v := range args { + challengeBytes(t, ReverseBits, solutions.ReverseBits, v) + } +} diff --git a/tests/go/solutions/reverserange/main.go b/tests/go/solutions/reverserange/main.go new file mode 100644 index 00000000..856a0a4e --- /dev/null +++ b/tests/go/solutions/reverserange/main.go @@ -0,0 +1,39 @@ +package main + +import ( + "fmt" + "os" + "strconv" +) + +func main() { + if len(os.Args) == 3 { + secondArg := 0 + firstArg, err := strconv.Atoi(os.Args[1]) + if err == nil { + secondArg, err = strconv.Atoi(os.Args[2]) + } + if err != nil { + fmt.Println(err.Error()) + return + } + fmt.Println(reverseRange(firstArg, secondArg)) + + } else { + fmt.Println() + } +} + +func reverseRange(start, end int) []int { + var rran []int + if end >= start { + for i := end; i >= start; i-- { + rran = append(rran, i) + } + return rran + } + for i := end; i <= start; i++ { + rran = append(rran, i) + } + return rran +} diff --git a/tests/go/solutions/reverserange/reverserange_test.go b/tests/go/solutions/reverserange/reverserange_test.go new file mode 100644 index 00000000..066032fb --- /dev/null +++ b/tests/go/solutions/reverserange/reverserange_test.go @@ -0,0 +1,22 @@ +package main + +import ( + "strconv" + "testing" + + "github.com/01-edu/z01" +) + +func TestReverseRange(t *testing.T) { + 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.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) +} diff --git a/tests/go/solutions/reversestrcap/main.go b/tests/go/solutions/reversestrcap/main.go new file mode 100644 index 00000000..e4ae86fb --- /dev/null +++ b/tests/go/solutions/reversestrcap/main.go @@ -0,0 +1,41 @@ +package main + +import ( + "fmt" + "os" +) + +func upperCase(ch rune) rune { + if ch >= 'a' && ch <= 'z' { + return ch - ('a' - 'A') + } + return ch +} + +func lowerCase(ch rune) rune { + if ch >= 'A' && ch <= 'Z' { + return ch + ('a' - 'A') + } + return ch +} + +func main() { + if len(os.Args) < 2 { + fmt.Println() + os.Exit(0) + } + + for i := 1; i < len(os.Args); i++ { + arg := []rune(os.Args[i]) + for j, c := range arg { + if j+1 < len(arg) && arg[j+1] == ' ' { + arg[j] = upperCase(c) + } else if j+1 == len(arg) { + arg[j] = upperCase(c) + } else { + arg[j] = lowerCase(c) + } + } + fmt.Println(string(arg)) + } +} diff --git a/tests/go/solutions/reversestrcap/reversestrcap_test.go b/tests/go/solutions/reversestrcap/reversestrcap_test.go new file mode 100644 index 00000000..dbc2460a --- /dev/null +++ b/tests/go/solutions/reversestrcap/reversestrcap_test.go @@ -0,0 +1,24 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestReverseStrCap(t *testing.T) { + 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} + + for i := 0; i < 15; i++ { + args = append(args, z01.MultRandAlnum()) + } + + args = append(args, []string{""}) + + for _, v := range args { + z01.ChallengeMainExam(t, v...) + } + z01.ChallengeMainExam(t) +} diff --git a/tests/go/solutions/revivethreenums.go b/tests/go/solutions/revivethreenums.go new file mode 100644 index 00000000..5f6dab62 --- /dev/null +++ b/tests/go/solutions/revivethreenums.go @@ -0,0 +1,41 @@ +package solutions + +func more(a, b int) int { + if a < b { + return b + } + return a +} + +func max(a, b, c, d int) int { + if a >= b && a >= c && a >= d { + return a + } + if b >= a && b >= c && b >= d { + return b + } + if c >= a && c >= b && c >= d { + return c + } + if d >= a && d >= b && d >= c { + return d + } + return -1 +} + +func Revive_three_nums(a, b, c, d int) int { + maxi := -111 + if a != max(a, b, c, d) { + maxi = more(maxi, max(a, b, c, d)-a) + } + if b != max(a, b, c, d) { + maxi = more(maxi, max(a, b, c, d)-b) + } + if c != max(a, b, c, d) { + maxi = more(maxi, max(a, b, c, d)-c) + } + if d != max(a, b, c, d) { + maxi = more(maxi, max(a, b, c, d)-d) + } + return maxi +} diff --git a/tests/go/solutions/revivethreenums/main.go b/tests/go/solutions/revivethreenums/main.go new file mode 100644 index 00000000..84dac479 --- /dev/null +++ b/tests/go/solutions/revivethreenums/main.go @@ -0,0 +1,45 @@ +package main + +func more(a, b int) int { + if a < b { + return b + } + return a +} + +func max(a, b, c, d int) int { + if a >= b && a >= c && a >= d { + return a + } + if b >= a && b >= c && b >= d { + return b + } + if c >= a && c >= b && c >= d { + return c + } + if d >= a && d >= b && d >= c { + return d + } + return -1 +} + +func Revive_three_nums(a, b, c, d int) int { + maxi := -111 + if a != max(a, b, c, d) { + maxi = more(maxi, max(a, b, c, d)-a) + } + if b != max(a, b, c, d) { + maxi = more(maxi, max(a, b, c, d)-b) + } + if c != max(a, b, c, d) { + maxi = more(maxi, max(a, b, c, d)-c) + } + if d != max(a, b, c, d) { + maxi = more(maxi, max(a, b, c, d)-d) + } + return maxi +} + +func main() { + +} diff --git a/tests/go/solutions/revivethreenums/revivethreenums_test.go b/tests/go/solutions/revivethreenums/revivethreenums_test.go new file mode 100644 index 00000000..3236c79d --- /dev/null +++ b/tests/go/solutions/revivethreenums/revivethreenums_test.go @@ -0,0 +1,54 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" // This line is not necessary when testing an exercise with a program +) + +func TestRevivethreenums(t *testing.T) { + type node struct { + a int + b int + c int + d int + } + table := []node{} + // Initial filling of that array with the values I see in the examples of the subject + + table = append(table, + node{3, 6, 5, 4}, + node{40, 40, 40, 60}, + node{201, 101, 101, 200}, + ) + + // If we were to leave the table as it is, a student could just do a program with 4 ifs and get + // "around" the goal of the exercise. We are now going to add 15 random tests using the z01 testing library + + for i := 0; i < 25; i++ { + first := z01.RandIntBetween(0, 877) + second := z01.RandIntBetween(0, 877) + third := z01.RandIntBetween(0, 877) + value := node{ + a: first + second, + b: second + third, + c: first + third, + d: first + second + third, + } + + //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" + //Because the exercise asks for a function we are now using the Challenge function (this function would + // be the ChallengeMainExam function) + + for _, arg := range table { + z01.Challenge(t, Revive_three_nums, solutions.Revive_three_nums, arg.a, arg.b, arg.c, arg.d) + } +} diff --git a/tests/go/solutions/revparams/revparams.go b/tests/go/solutions/revparams/revparams.go new file mode 100644 index 00000000..722d8a36 --- /dev/null +++ b/tests/go/solutions/revparams/revparams.go @@ -0,0 +1,12 @@ +package main + +import ( + "fmt" + "os" +) + +func main() { + for i := len(os.Args) - 1; i >= 1; i-- { + fmt.Println(os.Args[i]) + } +} diff --git a/tests/go/solutions/revwstr/main.go b/tests/go/solutions/revwstr/main.go new file mode 100644 index 00000000..62d1534b --- /dev/null +++ b/tests/go/solutions/revwstr/main.go @@ -0,0 +1,22 @@ +package main + +import ( + "fmt" + "os" + "strings" +) + +func main() { + if len(os.Args) != 2 { + fmt.Println() + } else { + arrString := strings.Split(os.Args[1], " ") + for i := len(arrString) - 1; i >= 0; i-- { + fmt.Print(arrString[i]) + if i != 0 { + fmt.Print(" ") + } + } + fmt.Println() + } +} diff --git a/tests/go/solutions/revwstr/revwstr_test.go b/tests/go/solutions/revwstr/revwstr_test.go new file mode 100644 index 00000000..2346e83b --- /dev/null +++ b/tests/go/solutions/revwstr/revwstr_test.go @@ -0,0 +1,37 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestRevWstr(t *testing.T) { + table := []string{} + + table = append(table, + "", + "abcdefghijklm", + "the time of contempt precedes that of indifference", + "he stared at the mountain", + "qw qw e qwsa d") + + //3 valid random sentences with no spaces at the beginning nor the end and only one space for separator. + for i := 0; i < 3; i++ { + numberOfWords := z01.RandIntBetween(1, 6) + sentence := z01.RandAlnum() + for j := 0; j < numberOfWords; j++ { + sentence = sentence + " " + z01.RandAlnum() + } + sentence = sentence + z01.RandAlnum() + table = append(table, sentence) + } + + for _, s := range table { + z01.ChallengeMainExam(t, s) + } + + z01.ChallengeMainExam(t) + z01.ChallengeMainExam(t, "1param", "2param", "3param", "4param") + +} diff --git a/tests/go/solutions/robottoorigin/main.go b/tests/go/solutions/robottoorigin/main.go new file mode 100644 index 00000000..3b83f849 --- /dev/null +++ b/tests/go/solutions/robottoorigin/main.go @@ -0,0 +1,47 @@ +package main + +import ( + "github.com/01-edu/z01" + "os" +) + +func solve(str string) bool { + x := 0 + y := 0 + + for _, c := range str { + if c == 'L' { + x-- + } else if c == 'R' { + x++ + } else if c == 'U' { + y++ + } else if c == 'D' { + y-- + } + } + if x == 0 && y == 0 { + return true + } + return false +} + +func print(str string) { + for _, v := range str { + z01.PrintRune(v) + } +} + +func main() { + args := os.Args[1:] + if len(args) != 1 { + z01.PrintRune('\n') + return + } + result := solve(args[0]) + if result { + print("true\n") + } else { + print("false\n") + } +} diff --git a/tests/go/solutions/robottoorigin/robottoorigin_test.go b/tests/go/solutions/robottoorigin/robottoorigin_test.go new file mode 100644 index 00000000..0bbae6f4 --- /dev/null +++ b/tests/go/solutions/robottoorigin/robottoorigin_test.go @@ -0,0 +1,24 @@ +package main + +import ( + "testing" + "github.com/01-edu/z01" +) + +func TestRobotToOrigin(t *testing.T) { + table := []string{} + + table = append(table, + "UD", + "LL", + ) + + for i := 0; i < 15; i++ { + value := z01.RandStr(z01.RandIntBetween(5, 1000), "UDLR") + table = append(table, value) + } + + for _, arg := range table { + z01.ChallengeMainExam(t, arg) + } +} \ No newline at end of file diff --git a/tests/go/solutions/romannumbers/main.go b/tests/go/solutions/romannumbers/main.go new file mode 100644 index 00000000..604a0d6f --- /dev/null +++ b/tests/go/solutions/romannumbers/main.go @@ -0,0 +1,66 @@ +package main + +import ( + "fmt" + "os" + "strconv" + "strings" +) + +type roman struct { + num int + romanDigit string +} + +func main() { + if len(os.Args) == 2 { + nbr, err := strconv.Atoi(os.Args[1]) + if err != nil || nbr >= 4000 || nbr == 0 { + fmt.Println("ERROR: can not convert to roman digit") + os.Exit(0) + } + patter := []roman{ + {num: 1000, romanDigit: "M"}, + {num: 900, romanDigit: "CM"}, + {num: 500, romanDigit: "D"}, + {num: 400, romanDigit: "CD"}, + {num: 100, romanDigit: "C"}, + {num: 90, romanDigit: "XC"}, + {num: 50, romanDigit: "L"}, + {num: 40, romanDigit: "XL"}, + {num: 10, romanDigit: "X"}, + {num: 9, romanDigit: "IX"}, + {num: 5, romanDigit: "V"}, + {num: 4, romanDigit: "IV"}, + {num: 1, romanDigit: "I"}, + } + sumRoman, romandigit := print(nbr, patter) + fmt.Println(strings.TrimSuffix(sumRoman, "+")) + fmt.Println(romandigit) + } +} + +func print(nbr int, patter []roman) (string, string) { + var sumRomanDigit, result string + for _, v := range patter { + for nbr >= v.num { + sumRomanDigit += v.romanDigit + "+" + result += v.romanDigit + nbr -= v.num + } + } + sumRomanDigit = formatsum(sumRomanDigit, patter) + return sumRomanDigit, result +} + +func formatsum(a string, patter []roman) string { + result2 := strings.Split(a, "+") + + for i, v := range result2 { + if len(v) == 2 { + result2[i] = fmt.Sprintf("(%s-%s)", string(result2[i][1]), string(result2[i][0])) + } + } + a = strings.Join(result2, "+") + return a +} diff --git a/tests/go/solutions/romannumbers/romannumbers_test.go b/tests/go/solutions/romannumbers/romannumbers_test.go new file mode 100644 index 00000000..39d46d31 --- /dev/null +++ b/tests/go/solutions/romannumbers/romannumbers_test.go @@ -0,0 +1,25 @@ +package main + +import ( + "strconv" + "testing" + + "github.com/01-edu/z01" +) + +func TestRomanNumbers(t *testing.T) { + rand := []string{ + "0", + "4000", + "5000", + "12433", + "hello", + "good luck", + } + for i := 0; i < 7; i++ { + rand = append(rand, strconv.Itoa(z01.RandIntBetween(0, 4000))) + } + for _, v := range rand { + z01.ChallengeMainExam(t, v) + } +} diff --git a/tests/go/solutions/rostring/main.go b/tests/go/solutions/rostring/main.go new file mode 100644 index 00000000..7c37e877 --- /dev/null +++ b/tests/go/solutions/rostring/main.go @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "os" + "strings" +) + +func deleteExtraSpaces(arr []string) []string { + var res []string + for _, v := range arr { + if v != "" { + res = append(res, v) + } + } + return res +} + +func main() { + if len(os.Args) == 2 { + words := strings.Split(os.Args[1], " ") + words = deleteExtraSpaces(words) + if len(words) >= 1 { + for _, v := range words[1:] { + fmt.Print(v, " ") + } + fmt.Print(words[0]) + } + } + fmt.Println() +} diff --git a/tests/go/solutions/rostring/rostring_test.go b/tests/go/solutions/rostring/rostring_test.go new file mode 100644 index 00000000..921ed278 --- /dev/null +++ b/tests/go/solutions/rostring/rostring_test.go @@ -0,0 +1,31 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestRoString(t *testing.T) { + corrArgs := []string{"abc ", + "Let there be light", + " AkjhZ zLKIJz , 23y", + "", + } + + // some random valid parameter + for i := 0; i < 5; i++ { + corrArgs = append(corrArgs, z01.RandWords()) + } + + for _, v := range corrArgs { + z01.ChallengeMainExam(t, v) + } + + //without parameter + z01.ChallengeMainExam(t) + + //with more than one parameter + z01.ChallengeMainExam(t, "this", "is") + z01.ChallengeMainExam(t, "not", "good", "for you") +} diff --git a/tests/go/solutions/rot13/main.go b/tests/go/solutions/rot13/main.go new file mode 100644 index 00000000..09d4e2ff --- /dev/null +++ b/tests/go/solutions/rot13/main.go @@ -0,0 +1,33 @@ +package main + +import ( + "os" + + "github.com/01-edu/z01" +) + +func main() { + if len(os.Args) != 2 { + z01.PrintRune('\n') + } else { + arrayRune := []byte(os.Args[1]) + + for i := 0; i < len(arrayRune); i++ { + if arrayRune[i] >= 'a' && arrayRune[i] <= 'z' { + if arrayRune[i] >= ('a' + 13) { + arrayRune[i] = arrayRune[i] - 13 + } else { + arrayRune[i] = arrayRune[i] + 13 + } + } else if arrayRune[i] >= 'A' && arrayRune[i] <= 'Z' { + if arrayRune[i] >= ('A' + 13) { + arrayRune[i] = arrayRune[i] - 13 + } else { + arrayRune[i] = arrayRune[i] + 13 + } + } + z01.PrintRune(rune(arrayRune[i])) + } + z01.PrintRune('\n') + } +} diff --git a/tests/go/solutions/rot13/rot13_test.go b/tests/go/solutions/rot13/rot13_test.go new file mode 100644 index 00000000..1fbf0bea --- /dev/null +++ b/tests/go/solutions/rot13/rot13_test.go @@ -0,0 +1,19 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestRot13(t *testing.T) { + 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.ChallengeMainExam(t, "1 argument", "2 arguments") + z01.ChallengeMainExam(t, "1 argument", "2 arguments", "3 arguments") +} diff --git a/tests/go/solutions/rot14.go b/tests/go/solutions/rot14.go new file mode 100644 index 00000000..9e31f166 --- /dev/null +++ b/tests/go/solutions/rot14.go @@ -0,0 +1,24 @@ +package solutions + +func Rot14(str string) string { + arrayRune := []rune(str) + var result string + + for i := 0; i < len(arrayRune); i++ { + if arrayRune[i] >= 'a' && arrayRune[i] <= 'z' { + if arrayRune[i] >= 'm' { + arrayRune[i] = arrayRune[i] - 12 + } else { + arrayRune[i] = arrayRune[i] + 14 + } + } else if arrayRune[i] >= 'A' && arrayRune[i] <= 'Z' { + if arrayRune[i] >= 'M' { + arrayRune[i] = arrayRune[i] - 12 + } else { + arrayRune[i] = arrayRune[i] + 14 + } + } + result += string(arrayRune[i]) + } + return result +} diff --git a/tests/go/solutions/rot14prog/main.go b/tests/go/solutions/rot14prog/main.go new file mode 100644 index 00000000..2a1d55ba --- /dev/null +++ b/tests/go/solutions/rot14prog/main.go @@ -0,0 +1,34 @@ +package main + +import ( + "fmt" + "os" +) + +func main() { + if len(os.Args) < 2 || len(os.Args) > 2 { + fmt.Println() + return + } + + arrayRune := []rune(os.Args[1]) + var result string + + for i := 0; i < len(arrayRune); i++ { + if arrayRune[i] >= 'a' && arrayRune[i] <= 'z' { + if arrayRune[i] >= 'm' { + arrayRune[i] = arrayRune[i] - 12 + } else { + arrayRune[i] = arrayRune[i] + 14 + } + } else if arrayRune[i] >= 'A' && arrayRune[i] <= 'Z' { + if arrayRune[i] >= 'M' { + arrayRune[i] = arrayRune[i] - 12 + } else { + arrayRune[i] = arrayRune[i] + 14 + } + } + result += string(arrayRune[i]) + } + fmt.Println(result) +} diff --git a/tests/go/solutions/rot14prog/rot14prog_test.go b/tests/go/solutions/rot14prog/rot14prog_test.go new file mode 100644 index 00000000..93448310 --- /dev/null +++ b/tests/go/solutions/rot14prog/rot14prog_test.go @@ -0,0 +1,28 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestRot14Prog(t *testing.T) { + type nodeTest struct { + data []string + } + + table := []nodeTest{} + for i := 0; i < 2; i++ { + val := nodeTest{ + data: z01.MultRandWords(), + } + table = append(table, val) + } + + for _, arg := range table { + for _, s := range arg.data { + z01.ChallengeMainExam(t, ""+s+"") + } + } + z01.ChallengeMainExam(t, "", "something", "something1") +} diff --git a/tests/go/solutions/rotatevowels/main.go b/tests/go/solutions/rotatevowels/main.go new file mode 100644 index 00000000..04a555cf --- /dev/null +++ b/tests/go/solutions/rotatevowels/main.go @@ -0,0 +1,43 @@ +package main + +import ( + "fmt" + "os" + "regexp" +) + +func main() { + var arr []rune + var revarr []rune + vowels := regexp.MustCompile(`[aeiouAEIOU]`) + for i := 1; i < len(os.Args); i++ { + for _, k := range os.Args[i] { + mached := vowels.MatchString(string(k)) + + if mached { + arr = append(arr, rune(k)) + } + } + } + for i := len(arr) - 1; i >= 0; i-- { + revarr = append(revarr, arr[i]) + } + arr2 := []rune{} + + m := 0 + for i := 1; i < len(os.Args); i++ { + for _, j := range os.Args[i] { + mached := vowels.MatchString(string(j)) + if mached { + arr2 = append(arr2, rune(revarr[m])) + m++ + } else { + arr2 = append(arr2, rune(j)) + } + } + if i != len(os.Args)-1 { + arr2 = append(arr2, ' ') + } + } + fmt.Println(string(arr2)) +} diff --git a/tests/go/solutions/rpncalc/main.go b/tests/go/solutions/rpncalc/main.go new file mode 100644 index 00000000..7a21a9d3 --- /dev/null +++ b/tests/go/solutions/rpncalc/main.go @@ -0,0 +1,77 @@ +package main + +import ( + "fmt" + "os" + "strconv" + "strings" +) + +func isOp(s string) bool { + return s == "+" || + s == "-" || + s == "*" || + s == "/" || + s == "%" +} + +func deleteExtraSpaces(arr []string) []string { + var res []string + for _, v := range arr { + if v != "" { + res = append(res, v) + } + } + return res +} + +func main() { + if len(os.Args) == 2 { + var values []int + var n int + op := strings.Split(os.Args[1], " ") + op = deleteExtraSpaces(op) + for _, v := range op { + val, err := strconv.Atoi(v) + + if err == nil { + values = append(values, val) + continue + } + + n = len(values) + if isOp(v) && n < 2 { + fmt.Println("Error") + os.Exit(0) + } + + switch v { + case "+": + values[n-2] += values[n-1] + values = values[:n-1] + case "-": + values[n-2] -= values[n-1] + values = values[:n-1] + case "*": + values[n-2] *= values[n-1] + values = values[:n-1] + case "/": + values[n-2] /= values[n-1] + values = values[:n-1] + case "%": + values[n-2] %= values[n-1] + values = values[:n-1] + default: + fmt.Println("Error") + os.Exit(0) + } + } + if len(values) == 1 { + fmt.Println(values[0]) + } else { + fmt.Println("Error") + } + } else { + fmt.Println("Error") + } +} diff --git a/tests/go/solutions/rpncalc/rpncalc_test.go b/tests/go/solutions/rpncalc/rpncalc_test.go new file mode 100644 index 00000000..f4f2d705 --- /dev/null +++ b/tests/go/solutions/rpncalc/rpncalc_test.go @@ -0,0 +1,32 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestRpnCalc(t *testing.T) { + args := []string{ + "1 2 * 3 * 4 +", + "3 1 2 * * 4 %", + "5 10 9 / - 50 *", + "21 3 2 % 2 3 2 *", + "1 2 3 4 +", + "324 + 1 - 23 ", + "32 / 22", + "11 22 +", + "23491234 102030932 -", + "123 2222 /", + "299 255 %", + "15 76 *", + "88 67 dks -", + " 1 3 * 2 -", + } + + for _, v := range args { + z01.ChallengeMainExam(t, v) + } + z01.ChallengeMainExam(t) + z01.ChallengeMainExam(t, "1 2 * 3 * 4 +", "10 33 - 12 %") +} diff --git a/tests/go/solutions/sametree.go b/tests/go/solutions/sametree.go new file mode 100644 index 00000000..9b3cb742 --- /dev/null +++ b/tests/go/solutions/sametree.go @@ -0,0 +1,27 @@ +package solutions + +type TreeNodeL struct { + Left *TreeNodeL + Val int + Right *TreeNodeL +} + +func IsSameTree(p *TreeNodeL, q *TreeNodeL) bool { + if (p == nil && q == nil) { + return true + } + if (checkIfEq(p, q) == true) { + return true + } + return false +} + +func checkIfEq(t1 *TreeNodeL, t2 *TreeNodeL) bool { + if (t1 == nil && t2 == nil) { + return true + } + if (t1 == nil || t2 == nil) { + return false; + } + return (t1.Val == t2.Val && checkIfEq(t1.Right, t2.Right) && checkIfEq(t1.Left, t2.Left)) +} diff --git a/tests/go/solutions/sametree/main.go b/tests/go/solutions/sametree/main.go new file mode 100644 index 00000000..f56483bc --- /dev/null +++ b/tests/go/solutions/sametree/main.go @@ -0,0 +1,31 @@ +package main + +type TreeNodeL struct { + Left *TreeNodeL + Val int + Right *TreeNodeL +} + +func IsSameTree(p *TreeNodeL, q *TreeNodeL) bool { + if (p == nil && q == nil) { + return true + } + if (checkIfEq(p, q) == true) { + return true + } + return false +} + +func checkIfEq(t1 *TreeNodeL, t2 *TreeNodeL) bool { + if (t1 == nil && t2 == nil) { + return true + } + if (t1 == nil || t2 == nil) { + return false; + } + return (t1.Val == t2.Val && checkIfEq(t1.Right, t2.Right) && checkIfEq(t1.Left, t2.Left)) +} + +func main() { + +} \ No newline at end of file diff --git a/tests/go/solutions/sametree/sametree_test.go b/tests/go/solutions/sametree/sametree_test.go new file mode 100644 index 00000000..4b7daa1d --- /dev/null +++ b/tests/go/solutions/sametree/sametree_test.go @@ -0,0 +1,124 @@ +package main + +import ( + "testing" + "math/rand" + "strconv" + "github.com/01-edu/z01" + solutions "../../solutions" +) + +type stuTreeNode = TreeNodeL +type solTreeNode = solutions.TreeNodeL + +func insertStu(t *stuTreeNode, v int) *stuTreeNode { + if t == nil { + return &stuTreeNode{Left: nil, Val: v, Right: nil} + } + if v < t.Val { + t.Left = insertStu(t.Left, v) + return t + } + t.Right = insertStu(t.Right, v) + return t +} + +func insertSol(t *solTreeNode, v int) *solTreeNode { + if t == nil { + return &solTreeNode{Left: nil, Val: v, Right: nil} + } + if v < t.Val { + t.Left = insertSol(t.Left, v) + return t + } + t.Right = insertSol(t.Right, v) + return t +} + +func New(n, k int) (*solTreeNode, *stuTreeNode, *solTreeNode) { + var cop *solTreeNode + var stu *stuTreeNode + var sol *solTreeNode + for _, v := range rand.Perm(n) { + cop = insertSol(cop, (1+v)*k) + stu = insertStu(stu, (1+v)*k) + sol = insertSol(sol, (1+v)*k) + } + return cop, stu, sol +} + +func returnSolTree(root *solTreeNode) string{ + if (root == nil) { + return "" + } + ans := strconv.Itoa(root.Val) + if (root.Left == nil && root.Right == nil) { + return ans + } + if (root.Left != nil) { + ans += " " + returnSolTree(root.Left) + } + if (root.Right != nil) { + ans += " " + returnSolTree(root.Right) + } + return ans +} + +func returnStuTree(root *stuTreeNode) string { + if (root == nil) { + return "" + } + ans := strconv.Itoa(root.Val) + if (root.Left == nil && root.Right == nil) { + return ans + } + if (root.Left != nil) { + ans += " " + returnStuTree(root.Left) + } + if (root.Right != nil) { + ans += " " + returnStuTree(root.Right) + } + return ans +} + + +func compareResults(t *testing.T, stuResult, solResult bool, solTree1, solTree2 *solTreeNode) { + if stuResult != solResult { + tree1 := returnSolTree(solTree1) + tree2 := returnSolTree(solTree2) + t.Errorf("\nIsSameTree(\"%v\", \"%v\") == \"%v\" instead of \"%v\"\n\n", tree1, tree2, stuResult, solResult) + } +} + +func TestMerge(t *testing.T) { + type node struct { + n int + k int + } + + table := []node{} + for i := 0; i < 15; i++ { + value := node{z01.RandIntBetween(10, 15), z01.RandIntBetween(1, 10)} + table = append(table, value) + } + + // Check for different trees + for _, arg := range table { + cop1, stuTree1, solTree1 := New(arg.n, arg.k) + cop2, stuTree2, solTree2 := New(arg.n, arg.k) + stuResult := IsSameTree(stuTree1, stuTree2) + solResult := solutions.IsSameTree(solTree1, solTree2) + + compareResults(t, stuResult, solResult, cop1, cop2) + } + + // Check for same trees + for _, arg := range table { + cop1, stuTree1, solTree1 := New(arg.n, arg.k) + stuResult := IsSameTree(stuTree1, stuTree1) + solResult := solutions.IsSameTree(solTree1, solTree1) + + compareResults(t, stuResult, solResult, cop1, cop1) + } +} + diff --git a/tests/go/solutions/searchreplace/main.go b/tests/go/solutions/searchreplace/main.go new file mode 100644 index 00000000..add14b57 --- /dev/null +++ b/tests/go/solutions/searchreplace/main.go @@ -0,0 +1,24 @@ +package main + +import ( + "github.com/01-edu/z01" + "os" +) + +func main() { + if len(os.Args) <= 1 || len(os.Args) > 4 { + z01.PrintRune('\n') + } else if len(os.Args) == 4 { + array := []rune(os.Args[1]) + search := []rune(os.Args[2]) + replace := []rune(os.Args[3]) + for _, val := range array { + if val == search[0] { + z01.PrintRune(replace[0]) + } else { + z01.PrintRune(val) + } + } + z01.PrintRune('\n') + } +} diff --git a/tests/go/solutions/searchreplace/searchreplace_test.go b/tests/go/solutions/searchreplace/searchreplace_test.go new file mode 100644 index 00000000..7a6bc0bb --- /dev/null +++ b/tests/go/solutions/searchreplace/searchreplace_test.go @@ -0,0 +1,54 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestSearchReplace(t *testing.T) { + + type nodeTest struct { + dataSearched string + letterLookedFor string + letterReplacing string + } + + table := []nodeTest{} + + for i := 0; i < 20; i++ { + + letter1 := []rune(z01.RandAlnum()) + letter2 := []rune(z01.RandAlnum()) + + table = append(table, + nodeTest{ + dataSearched: z01.RandWords(), + letterLookedFor: string(letter1[0]), + letterReplacing: string(letter2[0]), + }) + + } + + table = append(table, + nodeTest{ + dataSearched: "hélla", + letterLookedFor: "é", + letterReplacing: "o", + }, + nodeTest{ + dataSearched: "hella", + letterLookedFor: "z", + letterReplacing: "o", + }, + nodeTest{ + dataSearched: "hella", + letterLookedFor: "h", + letterReplacing: "o", + }, + ) + + for _, arg := range table { + z01.ChallengeMainExam(t, arg.dataSearched, arg.letterLookedFor, arg.letterReplacing) + } +} diff --git a/tests/go/solutions/slice.go b/tests/go/solutions/slice.go new file mode 100644 index 00000000..b342eec0 --- /dev/null +++ b/tests/go/solutions/slice.go @@ -0,0 +1,44 @@ +package solutions + +func Slice(arr []string, nbr ...int) []string { + + if len(nbr) == 0 { + return arr + } + + first := nbr[0] + if len(nbr) == 1 { + if first < 0 { + first = len(arr) + first + if first < 0 { + return arr + } + } + return arr[first:] + } else { + second := nbr[1] + + first = ifNegative(arr, first) + second = ifNegative(arr, second) + + if first > second { + return []string{} + } + + return arr[first:second] + } +} + +func ifNegative(arr []string, n int) int { + if n < 0 { + n = len(arr) + n + } + + if n < 0 { + n = 0 + } else if n > len(arr) { + n = len(arr) + } + + return n +} diff --git a/tests/go/solutions/sliceprog/main.go b/tests/go/solutions/sliceprog/main.go new file mode 100644 index 00000000..223d4ec2 --- /dev/null +++ b/tests/go/solutions/sliceprog/main.go @@ -0,0 +1,47 @@ +package main + +func main() { +} + +func Slice(arr []string, nbr ...int) []string { + + if len(nbr) == 0 { + return arr + } + + first := nbr[0] + if len(nbr) == 1 { + if first < 0 { + first = len(arr) + first + if first < 0 { + return arr + } + } + return arr[first:] + } else { + second := nbr[1] + + first = ifNegative(arr, first) + second = ifNegative(arr, second) + + if first > second { + return []string{} + } + + return arr[first:second] + } +} + +func ifNegative(arr []string, n int) int { + if n < 0 { + n = len(arr) + n + } + + if n < 0 { + n = 0 + } else if n > len(arr) { + n = len(arr) + } + + return n +} diff --git a/tests/go/solutions/sliceprog/sliceprog_test.go b/tests/go/solutions/sliceprog/sliceprog_test.go new file mode 100644 index 00000000..6eb228b2 --- /dev/null +++ b/tests/go/solutions/sliceprog/sliceprog_test.go @@ -0,0 +1,48 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" +) + +func TestSlice(t *testing.T) { + + arr := [][]interface{}{ + { + []string{"coding", "algorithm", "ascii", "package", "golang"}, + 1, + }, + { + []string{"coding", "algorithm", "ascii", "package", "golang"}, + -3, + }, + { + []string{"coding", "algorithm", "ascii", "package", "golang"}, + 2, 4, + }, + { + []string{"coding", "algorithm", "ascii", "package", "golang"}, + -2, -1, + }, + { + []string{"coding", "algorithm", "ascii", "package", "golang"}, + 2, 0, + }, + } + + s := z01.MultRandWords() + + arr = append(arr, []interface{}{s, -len(s) - 10, -len(s) - 5}) + + for i := 0; i < 3; i++ { + s = z01.MultRandWords() + arr = append(arr, []interface{}{s, z01.RandIntBetween(-len(s)-10, len(s)+10), z01.RandIntBetween(-len(s)-8, len(s)+10)}) + } + + for _, a := range arr { + z01.Challenge(t, Slice, solutions.Slice, a...) + } +} diff --git a/tests/go/solutions/sortedlistmerge.go b/tests/go/solutions/sortedlistmerge.go new file mode 100644 index 00000000..68ecbbf2 --- /dev/null +++ b/tests/go/solutions/sortedlistmerge.go @@ -0,0 +1,17 @@ +package solutions + +func SortedListMerge(l1 *NodeI, l2 *NodeI) *NodeI { + if l1 == nil { + return l2 + } + if l2 == nil { + return l1 + } + if l1.Data <= l2.Data { + l1.Next = SortedListMerge(l1.Next, l2) + return l1 + } + l2.Next = SortedListMerge(l1, l2.Next) + return l2 + +} diff --git a/tests/go/solutions/sortintegertable.go b/tests/go/solutions/sortintegertable.go new file mode 100644 index 00000000..4020d486 --- /dev/null +++ b/tests/go/solutions/sortintegertable.go @@ -0,0 +1,9 @@ +package solutions + +import ( + "sort" +) + +func SortIntegerTable(table []int) { + sort.Ints(table) +} diff --git a/tests/go/solutions/sortlist.go b/tests/go/solutions/sortlist.go new file mode 100644 index 00000000..af5448db --- /dev/null +++ b/tests/go/solutions/sortlist.go @@ -0,0 +1,34 @@ +package solutions + +type Nodelist struct { + Data int + Next *Nodelist +} + +func SortList(l *Nodelist, cmp func(a, b int) bool) *Nodelist { + + head := l + if head == nil { + return nil + } + head.Next = SortList(head.Next, cmp) + + if head.Next != nil && cmp(head.Data, head.Next.Data) { + head = moveValue(head, cmp) + } + return head +} + +func moveValue(l *Nodelist, cmp func(a, b int) bool) *Nodelist { + p := l + n := l.Next + ret := n + + for n != nil && cmp(l.Data, n.Data) { + p = n + n = n.Next + } + p.Next = l + l.Next = n + return ret +} diff --git a/tests/go/solutions/sortlistinsert.go b/tests/go/solutions/sortlistinsert.go new file mode 100644 index 00000000..d5afcbe4 --- /dev/null +++ b/tests/go/solutions/sortlistinsert.go @@ -0,0 +1,25 @@ +package solutions + +//structures for the linked lists +type NodeI struct { + Data int + Next *NodeI +} + +func SortListInsert(l *NodeI, data_ref int) *NodeI { + n := &NodeI{Data: data_ref} + n.Next = nil + + if l == nil || l.Data >= n.Data { + n.Next = l + return n + } + temp := l + for temp.Next != nil && temp.Next.Data < n.Data { + temp = temp.Next + } + n.Next = temp.Next + temp.Next = n + + return l +} diff --git a/tests/go/solutions/sortll.go b/tests/go/solutions/sortll.go new file mode 100644 index 00000000..5319ad86 --- /dev/null +++ b/tests/go/solutions/sortll.go @@ -0,0 +1,25 @@ +package solutions + +//This solution is the comparing file of the staff +// Because the solution is a function, +// +//1) here the package is solutions +//2) it does not need an empty func main(){} +//3) its location is 1 level below the folder of the nauuo_test.go file + +func Sortll(node *NodeAddL) *NodeAddL { + if node == nil { + return node + } + + for first := node; first != nil; first = first.Next { + for second := first.Next; second != nil; second = second.Next { + if first.Num < second.Num { + tmp := first.Num + first.Num = second.Num + second.Num = tmp + } + } + } + return node +} diff --git a/tests/go/solutions/sortll/main.go b/tests/go/solutions/sortll/main.go new file mode 100644 index 00000000..4a39a8a2 --- /dev/null +++ b/tests/go/solutions/sortll/main.go @@ -0,0 +1,46 @@ +package main + +//This solution is the placeholder of the student solution +// for an exercise in the exam asking for a Function +//Remember the disclaimer!!!! +//1) here the package is main +//2) It does need an empty func main(){} + +type NodeAddL struct { + Next *NodeAddL + Num int +} + +func pushBack(node *NodeAddL, num int) *NodeAddL { + nw := &NodeAddL{Num: num} + if node == nil { + return nw + } + for tmp := node; tmp != nil; tmp = tmp.Next { + if tmp.Next == nil { + tmp.Next = nw + return node + } + } + return node +} + +func Sortll(node *NodeAddL) *NodeAddL { + if node == nil { + return node + } + + for first := node; first != nil; first = first.Next { + for second := first.Next; second != nil; second = second.Next { + if first.Num < second.Num { + tmp := first.Num + first.Num = second.Num + second.Num = tmp + } + } + } + return node +} +func main() { + +} diff --git a/tests/go/solutions/sortll/sortll_test.go b/tests/go/solutions/sortll/sortll_test.go new file mode 100644 index 00000000..4079ffcb --- /dev/null +++ b/tests/go/solutions/sortll/sortll_test.go @@ -0,0 +1,154 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" // This line is not necessary when testing an exercise with a program +) + +type stuNode = NodeAddL +type solNode = solutions.NodeAddL + +func stuPushFront(node *stuNode, num int) *stuNode { + tmp := &stuNode{Num: num} + tmp.Next = node + return tmp +} + +func stuNumToList(num int) *stuNode { + var res *stuNode + for num > 0 { + res = stuPushFront(res, num%10) + num /= 10 + } + return res +} + +func stuListToNum(node *stuNode) int { + var n int + + for tmp := node; tmp != nil; tmp = tmp.Next { + n = n*10 + tmp.Num + } + return n +} + +func solPushFront(node *solNode, num int) *solNode { + tmp := &solNode{Num: num} + tmp.Next = node + return tmp +} + +func solNumToList(num int) *solNode { + var res *solNode + for num > 0 { + res = solPushFront(res, num%10) + num /= 10 + } + return res +} + +func solListToNum(node *solNode) int { + var n int + + for tmp := node; tmp != nil; tmp = tmp.Next { + n = n*10 + tmp.Num + } + return n +} + +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.Errorf("\nSortll(%d) == %v instead of %v\n\n", + num1, stuNum, "") + } else if stuResult == nil && solResult != nil { + solNum := solListToNum(solResult) + t.Errorf("\nSortll(%d) == %v instead of %v\n\n", + num1, "", solNum) + } else { + stuNum := stuListToNum(stuResult) + solNum := solListToNum(solResult) + if stuNum != solNum { + t.Errorf("\nSortll(%d) == %v instead of %v\n\n", + num1, stuNum, solNum) + } + } +} + +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) + + type node struct { + num1 int + } + + // Declaration of an empty array of type node{} + // note that in this case this is the easiest type of table to declare + // but a table can be of any other relevant type, (for example []string{}, []int{} if it + // were a single string tested or a single int) + + table := []node{} + // Initial filling of that array with the values I see in the examples of the subject + + table = append(table, + node{123456}, + ) + + // If we were to leave the table as it is, a student could just do a program with 4 ifs and get + // "around" the goal of the exercise. We are now going to add 15 random tests using the z01 testing library + + for i := 0; i < 15; i++ { + value := node{ + num1: z01.RandIntBetween(0, 1000000000), + //this z01.RandIntBetween function allows the randomization of + //the int for each value in a desired range. + //Note that they are many others of those functions for other types of data + //Do not hesitate to have a look at all of them https://github.com/01-edu/z01 + } + + //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" + //Because the exercise asks for a function we are now using the Challenge function (this function would + // be the ChallengeMainExam function) + + for _, arg := range table { + stuResult := Sortll(stuNumToList(arg.num1)) + solResult := solutions.Sortll(solNumToList(arg.num1)) + + compareNodes(t, stuResult, solResult, arg.num1) + } + + // the z01.Challenge function is here applied to each argument of the table. It musts contains: + // 1) first, the t argument from the T structure imported from the package "testing" + // + // 2) second, the function from the student, in this case Nauuo + //(this disapears in the ChallengeMainExam function) + // 3) third, the function from the staff, in this case solutions.Nauuo + //(this disapears as well in the ChallengeMainExam function) + // 4) all the arguments to be tested, in this case it is the plus, minus and rand from each structure, + // notice that they are accessed with arg. (the arg notation comes from the way it was name in the + // range loop over the table) + + // Now that this is done. re-read the quickReadme (the test your test recap) and apply all the commands + // and intructions. We strongly advise to check that your error messages matches your subject. + // and that you ask a colleague to double check. + + //FINAL STEP: + // 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/sortparams/sortparams.go b/tests/go/solutions/sortparams/sortparams.go new file mode 100644 index 00000000..7f805b5f --- /dev/null +++ b/tests/go/solutions/sortparams/sortparams.go @@ -0,0 +1,15 @@ +package main + +import ( + "fmt" + "os" + "sort" +) + +func main() { + args := os.Args[1:] + sort.Sort(sort.StringSlice(args)) + for _, v := range args { + fmt.Println(v) + } +} diff --git a/tests/go/solutions/sortwordarr.go b/tests/go/solutions/sortwordarr.go new file mode 100644 index 00000000..2414c181 --- /dev/null +++ b/tests/go/solutions/sortwordarr.go @@ -0,0 +1,9 @@ +package solutions + +import ( + "sort" +) + +func SortWordArr(array []string) { + sort.Sort(sort.StringSlice(array)) +} diff --git a/tests/go/solutions/sortwordarrprog/main.go b/tests/go/solutions/sortwordarrprog/main.go new file mode 100644 index 00000000..b7bb48c9 --- /dev/null +++ b/tests/go/solutions/sortwordarrprog/main.go @@ -0,0 +1,13 @@ +package main + +import ( + "sort" +) + +func SortWordArr(array []string) { + sort.Sort(sort.StringSlice(array)) +} + +func main() { + +} diff --git a/tests/go/solutions/sortwordarrprog/sortwordarrprog_test.go b/tests/go/solutions/sortwordarrprog/sortwordarrprog_test.go new file mode 100644 index 00000000..27f472be --- /dev/null +++ b/tests/go/solutions/sortwordarrprog/sortwordarrprog_test.go @@ -0,0 +1,42 @@ +package main + +import ( + "reflect" + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" +) + +func TestSortWordArrProg(t *testing.T) { + var table [][]string + + table = append(table, []string{"a", "A", "1", "b", "B", "2", "c", "C", "3"}) + + for i := 0; i < 15; i++ { + table = append(table, z01.MultRandWords()) + } + + for _, org := range table { + //copy for using the solution function + cp_sol := make([]string, len(org)) + //copy for using the student function + cp_stu := make([]string, len(org)) + + copy(cp_sol, org) + copy(cp_stu, org) + + solutions.SortWordArr(cp_sol) + SortWordArr(cp_stu) + + if !reflect.DeepEqual(cp_stu, cp_sol) { + t.Errorf("%s(%v) == %v instead of %v\n", + "SortWordArr", + org, + cp_stu, + cp_sol, + ) + } + } +} diff --git a/tests/go/solutions/split.go b/tests/go/solutions/split.go new file mode 100644 index 00000000..cf354b5e --- /dev/null +++ b/tests/go/solutions/split.go @@ -0,0 +1,9 @@ +package solutions + +import ( + "strings" +) + +func Split(str, charset string) []string { + return strings.Split(str, charset) +} diff --git a/tests/go/solutions/splitprog/main.go b/tests/go/solutions/splitprog/main.go new file mode 100644 index 00000000..1304b863 --- /dev/null +++ b/tests/go/solutions/splitprog/main.go @@ -0,0 +1,12 @@ +package main + +import ( + "strings" +) + +func Split(str, charset string) []string { + return strings.Split(str, charset) +} + +func main() { +} diff --git a/tests/go/solutions/splitprog/splitprog_test.go b/tests/go/solutions/splitprog/splitprog_test.go new file mode 100644 index 00000000..ac228f99 --- /dev/null +++ b/tests/go/solutions/splitprog/splitprog_test.go @@ -0,0 +1,46 @@ +package main + +import ( + "math/rand" + "strings" + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" +) + +func TestSplitProg(t *testing.T) { + + separators := []string{"!=HA=!", + "!==!", + " ", + "|=choumi=|", + "|<=>|", + z01.RandStr(3, z01.RuneRange('A', 'Z')), + "<<==123==>>", + "[<>abc<>]"} + + type node struct { + str string + sep string + } + table := []node{} + //15 random slice of strings + + for i := 0; i < 15; i++ { + separator := separators[rand.Intn(len(separators))] + val := node{ + str: strings.Join(z01.MultRandAlnum(), separator), + sep: separator, + } + table = append(table, val) + } + + table = append(table, + node{str: "HelloHAhowHAareHAyou?", sep: "HA"}) + + for _, arg := range table { + z01.Challenge(t, Split, solutions.Split, arg.str, arg.sep) + } +} diff --git a/tests/go/solutions/splitwhitespaces.go b/tests/go/solutions/splitwhitespaces.go new file mode 100644 index 00000000..a7e6d674 --- /dev/null +++ b/tests/go/solutions/splitwhitespaces.go @@ -0,0 +1,21 @@ +package solutions + +func SplitWhiteSpaces(str string) []string { + + answer := []string{} + word := "" + for _, r := range str { + if isSeparator(r) { + if word != "" { + answer = append(answer, word) + word = "" + } + } else { + word = word + string(r) + } + } + if word != "" { + answer = append(answer, word) + } + return answer +} diff --git a/tests/go/solutions/sqrt.go b/tests/go/solutions/sqrt.go new file mode 100644 index 00000000..b229bef1 --- /dev/null +++ b/tests/go/solutions/sqrt.go @@ -0,0 +1,13 @@ +package solutions + +import ( + "math" +) + +func Sqrt(value int) int { + sr := math.Sqrt(float64(value)) + if math.Mod(sr, 1) == 0 { + return int(sr) + } + return 0 +} diff --git a/tests/go/solutions/strlen.go b/tests/go/solutions/strlen.go new file mode 100644 index 00000000..e8240138 --- /dev/null +++ b/tests/go/solutions/strlen.go @@ -0,0 +1,11 @@ +package solutions + +func StrLen(str string) int { + len := 0 + + strConverted := []rune(str) + for i, _ := range strConverted { + len = i + 1 + } + return len +} diff --git a/tests/go/solutions/strlenprog/main.go b/tests/go/solutions/strlenprog/main.go new file mode 100644 index 00000000..a6d33e79 --- /dev/null +++ b/tests/go/solutions/strlenprog/main.go @@ -0,0 +1,14 @@ +package main + +func StrLen(str string) int { + len := 0 + + strConverted := []rune(str) + for i := range strConverted { + len = i + 1 + } + return len +} + +func main() { +} diff --git a/tests/go/solutions/strlenprog/strlenprog_test.go b/tests/go/solutions/strlenprog/strlenprog_test.go new file mode 100644 index 00000000..3287cc79 --- /dev/null +++ b/tests/go/solutions/strlenprog/strlenprog_test.go @@ -0,0 +1,26 @@ +package main + +import ( + "testing" + + solutions "../../solutions" + "github.com/01-edu/z01" +) + +func TestStrLenProg(t *testing.T) { + + randomStringCharset := "a b c d e f g h ijklmnopqrstuvwxyz A B C D E FGHIJKLMNOPRSTUVWXYZ" + + table := []string{} + for i := 0; i < 10; i++ { + randomLenghtOfWord := z01.RandIntBetween(1, 20) + randomStrRandomLenght := z01.RandStr(randomLenghtOfWord, randomStringCharset) + table = append(table, randomStrRandomLenght) + } + table = append(table, "Héllo!") + table = append(table, randomStringCharset) + + for _, s := range table { + z01.Challenge(t, StrLen, solutions.StrLen, s) + } +} diff --git a/tests/go/solutions/strrev.go b/tests/go/solutions/strrev.go new file mode 100644 index 00000000..977cfd40 --- /dev/null +++ b/tests/go/solutions/strrev.go @@ -0,0 +1,13 @@ +package solutions + +func StrRev(s string) string { + runes := []rune(s) + i := 0 + j := len(runes) - 1 + for i < j { + runes[i], runes[j] = runes[j], runes[i] + i++ + j-- + } + return string(runes) +} diff --git a/tests/go/solutions/strrevprog/main.go b/tests/go/solutions/strrevprog/main.go new file mode 100644 index 00000000..9f29cd8d --- /dev/null +++ b/tests/go/solutions/strrevprog/main.go @@ -0,0 +1,15 @@ +package main + +import ( + solutions ".." + "fmt" + "os" +) + +func main() { + if len(os.Args) != 2 { + return + } + + fmt.Println(solutions.StrRev(os.Args[1])) +} diff --git a/tests/go/solutions/strrevprog/strrevprog_test.go b/tests/go/solutions/strrevprog/strrevprog_test.go new file mode 100644 index 00000000..4c048ab4 --- /dev/null +++ b/tests/go/solutions/strrevprog/strrevprog_test.go @@ -0,0 +1,19 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestStrRevProg(t *testing.T) { + table := append( + z01.MultRandASCII(), + "Hello!", + "Bonjour!", + "Hola!", + ) + for _, arg := range table { + z01.ChallengeMainExam(t, arg) + } +} diff --git a/tests/go/solutions/swap.go b/tests/go/solutions/swap.go new file mode 100644 index 00000000..46355761 --- /dev/null +++ b/tests/go/solutions/swap.go @@ -0,0 +1,7 @@ +package solutions + +func Swap(a, b *int) { + temp := *a + *a = *b + *b = temp +} diff --git a/tests/go/solutions/swapbits.go b/tests/go/solutions/swapbits.go new file mode 100644 index 00000000..2bcdf5c8 --- /dev/null +++ b/tests/go/solutions/swapbits.go @@ -0,0 +1,5 @@ +package solutions + +func SwapBits(n byte) byte { + return ((n >> 4) | (n << 4)) +} diff --git a/tests/go/solutions/swapbits/main.go b/tests/go/solutions/swapbits/main.go new file mode 100644 index 00000000..872f11e8 --- /dev/null +++ b/tests/go/solutions/swapbits/main.go @@ -0,0 +1,9 @@ +package main + +func SwapBits(n byte) byte { + return ((n >> 4) | (n << 4)) +} + +func main() { + +} diff --git a/tests/go/solutions/swapbits/swapbits_test.go b/tests/go/solutions/swapbits/swapbits_test.go new file mode 100644 index 00000000..ae7dbb04 --- /dev/null +++ b/tests/go/solutions/swapbits/swapbits_test.go @@ -0,0 +1,35 @@ +package main + +import ( + "github.com/01-edu/z01" + "reflect" + "testing" + + solutions "../../solutions" +) + +func challengeBytes(t *testing.T, fn1, fn2 interface{}, args ...interface{}) { + st1 := z01.Monitor(fn1, args) + st2 := z01.Monitor(fn2, args) + if !reflect.DeepEqual(st1.Results, st2.Results) { + t.Errorf("%s(%08b) == %08b instead of %08b\n", + z01.NameOfFunc(fn1), + args[0].(byte), + st1.Results[0].(byte), + st2.Results[0].(byte), + ) + } +} + +func TestSwapBits(t *testing.T) { + args := []byte{0x24, 0x14, 0x11, 0x22, 0xd2, 0x15, 0xff, 0x0, 0x35, 0x58, 0x43} + + for i := 0; i < 10; i++ { + n := z01.RandIntBetween(0, 255) + args = append(args, byte(n)) + } + + for _, v := range args { + challengeBytes(t, SwapBits, solutions.SwapBits, v) + } +} diff --git a/tests/go/solutions/swapprog/main.go b/tests/go/solutions/swapprog/main.go new file mode 100644 index 00000000..594185c3 --- /dev/null +++ b/tests/go/solutions/swapprog/main.go @@ -0,0 +1,11 @@ +package main + +func Swap(a, b *int) { + temp := *a + *a = *b + *b = temp +} + +func main() { + +} diff --git a/tests/go/solutions/swapprog/swapprog_test.go b/tests/go/solutions/swapprog/swapprog_test.go new file mode 100644 index 00000000..c9da1fa0 --- /dev/null +++ b/tests/go/solutions/swapprog/swapprog_test.go @@ -0,0 +1,25 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestSwapProg(t *testing.T) { + i := 0 + for i < 30 { + a := z01.RandInt() + b := z01.RandInt() + aCopy := a + bCopy := b + Swap(&a, &b) + if a != bCopy { + t.Errorf("Swap(%d, %d), a == %d instead of %d", aCopy, bCopy, a, bCopy) + } + if b != aCopy { + t.Errorf("Swap(%d, %d), b == %d instead of %d", aCopy, bCopy, b, aCopy) + } + i++ + } +} diff --git a/tests/go/solutions/sweetproblem.go b/tests/go/solutions/sweetproblem.go new file mode 100644 index 00000000..2b5402e6 --- /dev/null +++ b/tests/go/solutions/sweetproblem.go @@ -0,0 +1,57 @@ +package solutions + +func min3(a, b, c int) int { + if a <= b && a <= c { + return a + } + if b <= a && b <= c { + return b + } + return c +} + +func max3(a, b, c int) int { + if a >= b && a >= c { + return a + } + if b >= a && b >= c { + return b + } + return c +} + +func min2(a, b int) int { + if a <= b { + return a + } + return b +} + +func Sweetproblem(a, b, c int) int { + if a > b { + f := a + a = b + b = f + } + if a > c { + f := a + a = c + c = f + } + if b > c { + f := b + b = c + c = f + } + ans := a + if c-b >= a { + c -= a + } else { + a -= c - b + half := a / 2 + c -= half + b -= a - half + } + ans += min2(b, c) + return ans +} diff --git a/tests/go/solutions/sweetproblem/main.go b/tests/go/solutions/sweetproblem/main.go new file mode 100644 index 00000000..386097ed --- /dev/null +++ b/tests/go/solutions/sweetproblem/main.go @@ -0,0 +1,61 @@ +package main + +func min3(a, b, c int) int { + if a <= b && a <= c { + return a + } + if b <= a && b <= c { + return b + } + return c +} + +func max3(a, b, c int) int { + if a >= b && a >= c { + return a + } + if b >= a && b >= c { + return b + } + return c +} + +func min2(a, b int) int { + if a <= b { + return a + } + return b +} + +func Sweetproblem(a, b, c int) int { + if a > b { + f := a + a = b + b = f + } + if a > c { + f := a + a = c + c = f + } + if b > c { + f := b + b = c + c = f + } + ans := a + if c-b >= a { + c -= a + } else { + a -= c - b + half := a / 2 + c -= half + b -= a - half + } + ans += min2(b, c) + return ans +} + +func main() { + +} diff --git a/tests/go/solutions/sweetproblem/sweetproblem_test.go b/tests/go/solutions/sweetproblem/sweetproblem_test.go new file mode 100644 index 00000000..d1db43c1 --- /dev/null +++ b/tests/go/solutions/sweetproblem/sweetproblem_test.go @@ -0,0 +1,60 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" // This line is not necessary when testing an exercise with a program +) + +func TestSweerproblem(t *testing.T) { + type node struct { + red int + green int + blue int + } + + table := []node{} + // Initial filling of that array with the values I see in the examples of the subject + + table = append(table, + node{50, 43, 20}, + node{10, 0, 0}, + node{0, 10, 0}, + node{0, 0, 10}, + node{10, 1, 0}, + node{0, 10, 1}, + node{1, 0, 10}, + node{10, 2, 0}, + node{2, 10, 0}, + node{0, 2, 10}, + node{13, 13, 0}, + node{10, 9, 0}, + node{5, 9, 2}, + ) + + // If we were to leave the table as it is, a student could just do a program with 4 ifs and get + // "around" the goal of the exercise. We are now going to add 15 random tests using the z01 testing library + + for i := 0; i < 15; i++ { + value := node{ + red: z01.RandIntBetween(0, 30), + green: z01.RandIntBetween(0, 30), + blue: z01.RandIntBetween(0, 30), + } + + //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" + //Because the exercise asks for a function we are now using the Challenge function (this function would + // be the ChallengeMainExam function) + + for _, arg := range table { + z01.Challenge(t, Sweetproblem, solutions.Sweetproblem, arg.red, arg.green, arg.blue) + } +} diff --git a/tests/go/solutions/switchcase/main.go b/tests/go/solutions/switchcase/main.go new file mode 100644 index 00000000..c3601a1b --- /dev/null +++ b/tests/go/solutions/switchcase/main.go @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "os" + + "github.com/01-edu/z01" +) + +func main() { + + if len(os.Args) != 2 { + fmt.Println() + } else { + array := []byte(os.Args[1]) + + for i := 0; i < len(array); i++ { + if array[i] >= 'A' && array[i] <= 'Z' { + array[i] += 32 + z01.PrintRune(rune(array[i])) + } else if array[i] >= 'a' && array[i] <= 'z' { + array[i] -= 32 + z01.PrintRune(rune(array[i])) + } else { + z01.PrintRune(rune(array[i])) + } + } + z01.PrintRune('\n') + } +} diff --git a/tests/go/solutions/switchcase/switchcase_test.go b/tests/go/solutions/switchcase/switchcase_test.go new file mode 100644 index 00000000..3f4fdacd --- /dev/null +++ b/tests/go/solutions/switchcase/switchcase_test.go @@ -0,0 +1,17 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" +) + +func TestSwitchcase(t *testing.T) { + 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) + } +} diff --git a/tests/go/solutions/tabmult/main.go b/tests/go/solutions/tabmult/main.go new file mode 100644 index 00000000..12fa2241 --- /dev/null +++ b/tests/go/solutions/tabmult/main.go @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "os" + "strconv" +) + +func Tabmul(nbr int) { + i := 1 + for i < 10 { + result := nbr * i + fmt.Println(i, "x", nbr, "=", result) + i++ + } +} + +func main() { + if len(os.Args) == 2 { + number, _ := strconv.Atoi(os.Args[1]) + Tabmul(number) + } else { + fmt.Println() + } +} diff --git a/tests/go/solutions/tabmult/tabmult_test.go b/tests/go/solutions/tabmult/tabmult_test.go new file mode 100644 index 00000000..2feaca7e --- /dev/null +++ b/tests/go/solutions/tabmult/tabmult_test.go @@ -0,0 +1,23 @@ +package main + +import ( + "strconv" + "testing" + + "github.com/01-edu/z01" +) + +func TestTabMult(t *testing.T) { + var table []string + for i := 1; i < 10; i++ { + table = append(table, strconv.Itoa(i)) + } + for i := 0; i < 5; i++ { + table = append(table, strconv.Itoa(z01.RandIntBetween(1, 1000))) + } + + for _, arg := range table { + z01.ChallengeMainExam(t, arg) + } + +} diff --git a/tests/go/solutions/testConvertBase/main.go b/tests/go/solutions/testConvertBase/main.go new file mode 100644 index 00000000..cdfd9753 --- /dev/null +++ b/tests/go/solutions/testConvertBase/main.go @@ -0,0 +1,10 @@ +package main + +import ( + solutions "../../solutions" + "fmt" +) + +func main() { + fmt.Println(solutions.AtoiBase("111", "01")) +} diff --git a/tests/go/solutions/tetrisoptimizer/board.go b/tests/go/solutions/tetrisoptimizer/board.go new file mode 100644 index 00000000..f490ab67 --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/board.go @@ -0,0 +1,62 @@ +package main + +import "fmt" + +type board [][]byte + +func makeBoard(size int) board { + var b board + for i := 0; i < size; i++ { + row := make([]byte, size) + for j := range row { + row[j] = dot + } + b = append(b, row) + } + return b +} + +func (b board) print() { + for i := range b { + fmt.Println(string(b[i])) + } +} + +func (b board) check(i, j int, t tetrimino) bool { + for y := range t { + for x := range t[y] { + if t[y][x] != hashTag { + continue + } + if i+y >= len(b) || j+x >= len(b[i+y]) { + return false + } + if b[i+y][j+x] != dot { + return false + } + } + } + return true +} + +func (b board) put(i, j, idx int, t tetrimino) { + for y := range t { + for x := range t[y] { + if t[y][x] != hashTag { + continue + } + b[i+y][j+x] = byte(idx + 'A') + } + } +} + +func (b board) remove(i, j int, t tetrimino) { + for y := range t { + for x := range t[y] { + if t[y][x] != hashTag { + continue + } + b[i+y][j+x] = dot + } + } +} diff --git a/tests/go/solutions/tetrisoptimizer/main.go b/tests/go/solutions/tetrisoptimizer/main.go new file mode 100644 index 00000000..7945f882 --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/main.go @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "io/ioutil" + "os" +) + +func main() { + if len(os.Args) != 2 { + fmt.Println("usage: ./fillit filename") + return + } + data, err := ioutil.ReadFile(os.Args[1]) + if err != nil { + fmt.Println(err) + return + } + ok, tetriminos := validateFile(data) + if !ok { + fmt.Println("ERROR") + return + } + board := solve(tetriminos) + board.print() +} diff --git a/tests/go/solutions/tetrisoptimizer/samples/bad00.txt b/tests/go/solutions/tetrisoptimizer/samples/bad00.txt new file mode 100644 index 00000000..64d5de09 --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/samples/bad00.txt @@ -0,0 +1,4 @@ +#### +...# +.... +.... diff --git a/tests/go/solutions/tetrisoptimizer/samples/bad01.txt b/tests/go/solutions/tetrisoptimizer/samples/bad01.txt new file mode 100644 index 00000000..bb2ccae5 --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/samples/bad01.txt @@ -0,0 +1,4 @@ +...# +..#. +.#.. +#... diff --git a/tests/go/solutions/tetrisoptimizer/samples/bad02.txt b/tests/go/solutions/tetrisoptimizer/samples/bad02.txt new file mode 100644 index 00000000..c67b3173 --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/samples/bad02.txt @@ -0,0 +1,5 @@ + +##... +##... +.... +.... diff --git a/tests/go/solutions/tetrisoptimizer/samples/bad03.txt b/tests/go/solutions/tetrisoptimizer/samples/bad03.txt new file mode 100644 index 00000000..eed9fcdd --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/samples/bad03.txt @@ -0,0 +1,4 @@ +.... +.... +.... +.... diff --git a/tests/go/solutions/tetrisoptimizer/samples/bad04.txt b/tests/go/solutions/tetrisoptimizer/samples/bad04.txt new file mode 100644 index 00000000..ddaf7ff6 --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/samples/bad04.txt @@ -0,0 +1,5 @@ + +..## +.... +.... +##.. diff --git a/tests/go/solutions/tetrisoptimizer/samples/badFormat.txt b/tests/go/solutions/tetrisoptimizer/samples/badFormat.txt new file mode 100644 index 00000000..182189f7 --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/samples/badFormat.txt @@ -0,0 +1,19 @@ +...# +...# +...# +...# +.... +.... +.... +#### + + +.### +...# +.... +.... + +.... +..## +.##. +.... diff --git a/tests/go/solutions/tetrisoptimizer/samples/good_01-1-2-0.00.txt b/tests/go/solutions/tetrisoptimizer/samples/good_01-1-2-0.00.txt new file mode 100644 index 00000000..5e48cb0d --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/samples/good_01-1-2-0.00.txt @@ -0,0 +1,4 @@ +..## +..## +.... +.... diff --git a/tests/go/solutions/tetrisoptimizer/samples/good_02-1-4-0.00.txt b/tests/go/solutions/tetrisoptimizer/samples/good_02-1-4-0.00.txt new file mode 100644 index 00000000..caa819e1 --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/samples/good_02-1-4-0.00.txt @@ -0,0 +1,4 @@ +#... +#... +#... +#... diff --git a/tests/go/solutions/tetrisoptimizer/samples/good_03-2-4-0.00.txt b/tests/go/solutions/tetrisoptimizer/samples/good_03-2-4-0.00.txt new file mode 100644 index 00000000..e9190882 --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/samples/good_03-2-4-0.00.txt @@ -0,0 +1,9 @@ +.... +..#. +.### +.... + +.... +.... +...# +.### diff --git a/tests/go/solutions/tetrisoptimizer/samples/good_04-6-6-0.00.txt b/tests/go/solutions/tetrisoptimizer/samples/good_04-6-6-0.00.txt new file mode 100644 index 00000000..56562983 --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/samples/good_04-6-6-0.00.txt @@ -0,0 +1,29 @@ +.##. +.##. +.... +.... + +..## +..## +.... +.... + +..## +..## +.... +.... + +.... +...# +..## +...# + +.... +.... +##.. +##.. + +.... +.... +.... +#### diff --git a/tests/go/solutions/tetrisoptimizer/samples/good_05-21-10-0.00.txt b/tests/go/solutions/tetrisoptimizer/samples/good_05-21-10-0.00.txt new file mode 100644 index 00000000..9e961e2b --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/samples/good_05-21-10-0.00.txt @@ -0,0 +1,104 @@ +.... +...# +..## +...# + +.... +.... +..## +..## + +.... +...# +...# +..## + +.... +#... +###. +.... + +.... +##.. +.##. +.... + +..## +...# +...# +.... + +.... +.... +#... +###. + +.### +.#.. +.... +.... + +#... +#... +##.. +.... + +.... +.... +##.. +##.. + +.... +...# +..## +..#. + +.... +.... +..## +.##. + +.#.. +##.. +#... +.... + +.### +.#.. +.... +.... + +...# +...# +..## +.... + +.##. +.##. +.... +.... + +.### +...# +.... +.... + +.... +##.. +.#.. +.#.. + +.##. +.#.. +.#.. +.... + +.#.. +.##. +.#.. +.... + +#... +#... +#... +#... diff --git a/tests/go/solutions/tetrisoptimizer/samples/good_06-22-10-0.00.txt b/tests/go/solutions/tetrisoptimizer/samples/good_06-22-10-0.00.txt new file mode 100644 index 00000000..24f86892 --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/samples/good_06-22-10-0.00.txt @@ -0,0 +1,109 @@ +...# +..## +...# +.... + +.... +..#. +..#. +..## + +.... +.... +..## +..## + +.... +.... +.##. +.##. + +.... +.... +##.. +##.. + +.... +.... +###. +.#.. + +.... +.... +###. +#... + +###. +#... +.... +.... + +..## +..## +.... +.... + +###. +#... +.... +.... + +..## +..## +.... +.... + +.##. +##.. +.... +.... + +.... +.### +..#. +.... + +##.. +##.. +.... +.... + +.... +.### +...# +.... + +..## +.##. +.... +.... + +.##. +.##. +.... +.... + +.... +.... +...# +.### + +..## +..## +.... +.... + +##.. +.##. +.... +.... + +..## +.##. +.... +.... + +.... +.... +#... +###. diff --git a/tests/go/solutions/tetrisoptimizer/samples/good_07-26-11-0.00.txt b/tests/go/solutions/tetrisoptimizer/samples/good_07-26-11-0.00.txt new file mode 100644 index 00000000..8fc25118 --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/samples/good_07-26-11-0.00.txt @@ -0,0 +1,129 @@ +.... +.... +##.. +##.. + +.... +.### +...# +.... + +.... +.... +..#. +###. + +.... +##.. +##.. +.... + +.... +###. +#... +.... + +##.. +##.. +.... +.... + +.... +.... +..## +..## + +.... +#... +##.. +#... + +###. +#... +.... +.... + +.... +.... +..## +.##. + +.### +..#. +.... +.... + +.... +##.. +##.. +.... + +.... +.... +.##. +.##. + +.... +.... +##.. +##.. + +.... +..## +..## +.... + +.... +..#. +..## +...# + +.... +.##. +..#. +..#. + +.... +...# +...# +..## + +..## +...# +...# +.... + +.... +.... +###. +..#. + +.... +..#. +.### +.... + +.### +...# +.... +.... + +##.. +.#.. +.#.. +.... + +.### +...# +.... +.... + +..#. +..#. +..## +.... + +##.. +#... +#... +.... diff --git a/tests/go/solutions/tetrisoptimizer/samples/good_08-24-10-0.03.txt b/tests/go/solutions/tetrisoptimizer/samples/good_08-24-10-0.03.txt new file mode 100644 index 00000000..e0d1ac98 --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/samples/good_08-24-10-0.03.txt @@ -0,0 +1,119 @@ +...# +...# +...# +...# + +.... +.... +###. +#... + +.... +.##. +.#.. +.#.. + +...# +...# +...# +...# + +.... +..#. +..#. +..## + +.... +.... +.##. +..## + +...# +...# +..## +.... + +##.. +#... +#... +.... + +.... +.... +..## +..## + +.... +...# +...# +..## + +.... +.... +#... +###. + +.... +.#.. +.#.. +##.. + +##.. +##.. +.... +.... + +##.. +##.. +.... +.... + +.... +.... +##.. +.##. + +..#. +..#. +..## +.... + +.... +.... +###. +#... + +.... +.... +##.. +##.. + +.... +.... +...# +.### + +##.. +##.. +.... +.... + +.... +##.. +#... +#... + +###. +.#.. +.... +.... + +##.. +.#.. +.#.. +.... + +.### +..#. +.... +.... diff --git a/tests/go/solutions/tetrisoptimizer/samples/good_09-11-7-0.07.txt b/tests/go/solutions/tetrisoptimizer/samples/good_09-11-7-0.07.txt new file mode 100644 index 00000000..1fec3315 --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/samples/good_09-11-7-0.07.txt @@ -0,0 +1,54 @@ +.##. +##.. +.... +.... + +.#.. +.#.. +##.. +.... + +.... +.... +.##. +##.. + +...# +...# +..## +.... + +..#. +###. +.... +.... + +...# +...# +..## +.... + +.... +.... +.##. +.##. + +.... +.#.. +.#.. +##.. + +.... +.... +...# +.### + +.... +.... +##.. +##.. + +.... +.##. +##.. +.... diff --git a/tests/go/solutions/tetrisoptimizer/samples/good_10-12-7-0.52.txt b/tests/go/solutions/tetrisoptimizer/samples/good_10-12-7-0.52.txt new file mode 100644 index 00000000..b0fbd7e4 --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/samples/good_10-12-7-0.52.txt @@ -0,0 +1,59 @@ +##.. +.##. +.... +.... + +.... +.... +.##. +.##. + +.#.. +##.. +#... +.... + +.... +.#.. +.### +.... + +.... +..#. +..#. +..## + +.#.. +.##. +..#. +.... + +.... +.... +##.. +.##. + +##.. +.##. +.... +.... + +.... +##.. +##.. +.... + +...# +...# +..## +.... + +##.. +#... +#... +.... + +.... +...# +..## +..#. diff --git a/tests/go/solutions/tetrisoptimizer/samples/good_11-12-8-0.83.txt b/tests/go/solutions/tetrisoptimizer/samples/good_11-12-8-0.83.txt new file mode 100644 index 00000000..d4192b31 --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/samples/good_11-12-8-0.83.txt @@ -0,0 +1,59 @@ +#... +##.. +#... +.... + +###. +..#. +.... +.... + +..## +..## +.... +.... + +.... +.... +.### +...# + +.... +##.. +##.. +.... + +.... +.... +#... +###. + +.... +.### +.#.. +.... + +.... +.### +...# +.... + +..## +..## +.... +.... + +.... +.... +..## +..## + +.... +.... +..## +..## + +.... +..## +..## +.... diff --git a/tests/go/solutions/tetrisoptimizer/samples/good_12-19-9-3.40.txt b/tests/go/solutions/tetrisoptimizer/samples/good_12-19-9-3.40.txt new file mode 100644 index 00000000..d0bf3984 --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/samples/good_12-19-9-3.40.txt @@ -0,0 +1,94 @@ +###. +..#. +.... +.... + +#... +#... +##.. +.... + +.... +.### +..#. +.... + +.... +.##. +..#. +..#. + +.... +..#. +..#. +.##. + +..## +...# +...# +.... + +.... +.... +..#. +###. + +.... +##.. +.##. +.... + +.... +.... +##.. +##.. + +.### +..#. +.... +.... + +.### +.#.. +.... +.... + +.... +#... +#... +##.. + +#### +.... +.... +.... + +#... +##.. +#... +.... + +###. +..#. +.... +.... + +###. +.#.. +.... +.... + +.... +..#. +..## +...# + +.... +.... +.##. +##.. + +#... +##.. +#... +.... diff --git a/tests/go/solutions/tetrisoptimizer/samples/good_13-23-10-4.72.txt b/tests/go/solutions/tetrisoptimizer/samples/good_13-23-10-4.72.txt new file mode 100644 index 00000000..37463ef4 --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/samples/good_13-23-10-4.72.txt @@ -0,0 +1,114 @@ +.... +.... +..## +.##. + +##.. +##.. +.... +.... + +##.. +##.. +.... +.... + +.... +..#. +..#. +..## + +.... +.... +.##. +##.. + +..## +..## +.... +.... + +...# +..## +..#. +.... + +.... +.... +.##. +.##. + +.##. +..#. +..#. +.... + +#... +###. +.... +.... + +...# +...# +...# +...# + +.... +.... +...# +.### + +.### +..#. +.... +.... + +.... +..#. +..## +...# + +.... +.... +..## +.##. + +#... +##.. +#... +.... + +.... +.... +..## +..## + +.### +...# +.... +.... + +.### +.#.. +.... +.... + +.... +.... +###. +#... + +.##. +.##. +.... +.... + +.### +...# +.... +.... + +..## +...# +...# +.... diff --git a/tests/go/solutions/tetrisoptimizer/samples/good_14-15-8-7.34.txt b/tests/go/solutions/tetrisoptimizer/samples/good_14-15-8-7.34.txt new file mode 100644 index 00000000..29b8253a --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/samples/good_14-15-8-7.34.txt @@ -0,0 +1,74 @@ +.... +..## +..## +.... + +...# +.### +.... +.... + +.... +.... +##.. +.##. + +.... +.... +..## +..## + +#### +.... +.... +.... + +.#.. +.#.. +.#.. +.#.. + +.... +.... +##.. +##.. + +.... +.... +.### +...# + +.... +.##. +.#.. +.#.. + +.##. +.##. +.... +.... + +.... +.##. +..## +.... + +.... +.... +..## +..## + +.... +.... +###. +.#.. + +.... +.... +##.. +##.. + +..#. +..#. +..#. +..#. diff --git a/tests/go/solutions/tetrisoptimizer/samples/good_15-26-11-72.22.txt b/tests/go/solutions/tetrisoptimizer/samples/good_15-26-11-72.22.txt new file mode 100644 index 00000000..2122d423 --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/samples/good_15-26-11-72.22.txt @@ -0,0 +1,129 @@ +.... +.#.. +##.. +.#.. + +.... +.#.. +.#.. +.##. + +.... +.#.. +.#.. +.##. + +.... +.... +##.. +.##. + +.#.. +##.. +#... +.... + +#... +#... +#... +#... + +###. +#... +.... +.... + +.##. +.##. +.... +.... + +.... +..#. +..## +...# + +.##. +.#.. +.#.. +.... + +.... +.#.. +.##. +..#. + +.... +.### +..#. +.... + +.... +#... +##.. +.#.. + +.... +.... +##.. +##.. + +.... +.... +##.. +##.. + +.... +.... +.##. +.##. + +.... +.... +##.. +##.. + +###. +..#. +.... +.... + +.... +..#. +..## +...# + +.... +.... +.### +...# + +.... +..#. +.##. +.#.. + +.... +##.. +##.. +.... + +.##. +..#. +..#. +.... + +###. +.#.. +.... +.... + +.... +.... +.##. +.##. + +##.. +#... +#... +.... diff --git a/tests/go/solutions/tetrisoptimizer/solver.go b/tests/go/solutions/tetrisoptimizer/solver.go new file mode 100644 index 00000000..8d02cb3b --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/solver.go @@ -0,0 +1,35 @@ +package main + +func recursion(b board, array []tetrimino, idx int) bool { + if idx == len(array) { + return true + } + for i := range b { + for j := range b[i] { + if !b.check(i, j, array[idx]) { + continue + } + b.put(i, j, idx, array[idx]) + if recursion(b, array, idx+1) { + return true + } + b.remove(i, j, array[idx]) + } + } + return false +} + +func solve(array []tetrimino) board { + square := 2 + for square*square < len(array)*4 { + square++ + } + for { + b := makeBoard(square) + square++ + if !recursion(b, array, 0) { + continue + } + return b + } +} diff --git a/tests/go/solutions/tetrisoptimizer/tetrimino.go b/tests/go/solutions/tetrisoptimizer/tetrimino.go new file mode 100644 index 00000000..d2c51763 --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/tetrimino.go @@ -0,0 +1,69 @@ +package main + +type tetrimino [4][]byte + +var validUint16Map = map[uint16]bool{ + 0x8888: true, 0xf000: true, // I + 0xcc00: true, // O + 0xe400: true, 0x4c40: true, 0x4e00: true, 0x8c80: true, // T + 0x88c0: true, 0xe800: true, 0xc440: true, 0x2e00: true, // L + 0x44c0: true, 0x8e00: true, 0xc880: true, 0xe200: true, // J + 0x6c00: true, 0x8c40: true, // S + 0xc600: true, 0x4c80: true, // Z +} + +func (t tetrimino) isEmptyRow(row int) bool { + result := true + for i := 0; i < 4; i++ { + result = result && t[row][i] == dot + } + return result +} + +func (t tetrimino) isEmptyColumn(column int) bool { + result := true + for i := 0; i < 4; i++ { + result = result && t[i][column] == dot + } + return result +} + +func (t tetrimino) toUint16() uint16 { + var result uint16 + for i := 0; i < 4; i++ { + for j := 0; j < 4; j++ { + result <<= 1 + if t[i][j] == hashTag { + result |= 1 + } + } + } + return result +} + +func (t tetrimino) isValid() bool { + return validUint16Map[t.toUint16()] +} + +func blockToTetrimino(b []byte) tetrimino { + in := tetrimino{b[0:4], b[5:9], b[10:14], b[15:19]} + out := tetrimino{ + {dot, dot, dot, dot}, + {dot, dot, dot, dot}, + {dot, dot, dot, dot}, + {dot, dot, dot, dot}, + } + y, x := 0, 0 + for in.isEmptyRow(y) { + y++ + } + for in.isEmptyColumn(x) { + x++ + } + for i := 0; i+y < 4; i++ { + for j := 0; j+x < 4; j++ { + out[i][j] = in[i+y][j+x] + } + } + return out +} diff --git a/tests/go/solutions/tetrisoptimizer/validation.go b/tests/go/solutions/tetrisoptimizer/validation.go new file mode 100644 index 00000000..aed41724 --- /dev/null +++ b/tests/go/solutions/tetrisoptimizer/validation.go @@ -0,0 +1,51 @@ +package main + +const blockSize = 20 +const dot = '.' +const hashTag = '#' +const newLine = '\n' + +func isValidBlock(data []byte) bool { + numDots, numHashtags := 0, 0 + for i, v := range data { + switch v { + case dot: + numDots++ + case hashTag: + numHashtags++ + case newLine: + if i%5 != 4 { + return false + } + default: + return false + } + } + return numDots == 12 && numHashtags == 4 +} + +func validateFile(data []byte) (ok bool, result []tetrimino) { + for i := 0; i < len(data); { + if i+blockSize > len(data) { + break + } + if !isValidBlock(data[i : i+blockSize]) { + break + } + t := blockToTetrimino(data[i : i+blockSize]) + if !t.isValid() { + break + } + result = append(result, t) + i += blockSize + if i == len(data) { + ok = true + break + } + if data[i] != '\n' { + break + } + i++ + } + return ok, result +} diff --git a/tests/go/solutions/tolower.go b/tests/go/solutions/tolower.go new file mode 100644 index 00000000..f0ea8728 --- /dev/null +++ b/tests/go/solutions/tolower.go @@ -0,0 +1,10 @@ +package solutions + +import ( + "strings" +) + +func ToLower(s string) string { + s = strings.ToLower(s) + return s +} diff --git a/tests/go/solutions/toupper.go b/tests/go/solutions/toupper.go new file mode 100644 index 00000000..51c23add --- /dev/null +++ b/tests/go/solutions/toupper.go @@ -0,0 +1,10 @@ +package solutions + +import ( + "strings" +) + +func ToUpper(s string) string { + s = strings.ToUpper(s) + return s +} diff --git a/tests/go/solutions/trimatoi.go b/tests/go/solutions/trimatoi.go new file mode 100644 index 00000000..8798aee2 --- /dev/null +++ b/tests/go/solutions/trimatoi.go @@ -0,0 +1,31 @@ +package solutions + +func TrimAtoi(str string) int { + chars := []rune(str) + for i := range str { + chars[i] = rune(str[i]) + } + var numbers []rune + for i := range chars { + if (chars[i] >= '0' && chars[i] <= '9') || (len(numbers) == 0 && (chars[i]) == '-' || chars[i] == '+') { + numbers = append(numbers, chars[i]) + } + } + if len(numbers) == 0 || (len(numbers) == 1 && (numbers[0] == '-' || numbers[0] == '+')) { + return 0 + } + + res, i, sign := 0, 0, 1 + + if numbers[0] == '-' { + sign = -1 + i++ + } else if numbers[0] == '+' { + i++ + } + for ; i < len(numbers); i++ { + res = res*10 + int(numbers[i]) - '0' + } + + return sign * res +} diff --git a/tests/go/solutions/twosum.go b/tests/go/solutions/twosum.go new file mode 100644 index 00000000..3b8c86c8 --- /dev/null +++ b/tests/go/solutions/twosum.go @@ -0,0 +1,12 @@ +package solutions + +func TwoSum(nums []int, target int) []int { + for i := 0; i < len(nums); i++ { + for j := i + 1; j < len(nums); j++ { + if (nums[i] + nums[j] == target) { + return []int{i, j} + } + } + } + return nil +} diff --git a/tests/go/solutions/twosum/main.go b/tests/go/solutions/twosum/main.go new file mode 100644 index 00000000..19f60b13 --- /dev/null +++ b/tests/go/solutions/twosum/main.go @@ -0,0 +1,17 @@ +package main + +func TwoSum(nums []int, target int) []int { + for i := 0; i < len(nums); i++ { + for j := i + 1; j < len(nums); j++ { + if (nums[i] + nums[j] == target) { + return []int{i, j} + } + } + } + return nil +} + +func main() { + +} + diff --git a/tests/go/solutions/twosum/twosum_test.go b/tests/go/solutions/twosum/twosum_test.go new file mode 100644 index 00000000..00835f3c --- /dev/null +++ b/tests/go/solutions/twosum/twosum_test.go @@ -0,0 +1,17 @@ +package main + +import ( + "math/rand" + "testing" + + "github.com/01-edu/z01" + solutions "../../solutions" +) + +func TestTwoSum(t *testing.T) { + for i := 0; i < 20; i++ { + token := rand.Perm(20) + target := rand.Intn(30) + z01.Challenge(t, TwoSum, solutions.TwoSum, token, target) + } +} diff --git a/tests/go/solutions/ultimatedivmod.go b/tests/go/solutions/ultimatedivmod.go new file mode 100644 index 00000000..0fa40355 --- /dev/null +++ b/tests/go/solutions/ultimatedivmod.go @@ -0,0 +1,7 @@ +package solutions + +func UltimateDivMod(a, b *int) { + temp := *a + *a = *a / *b + *b = temp % *b +} diff --git a/tests/go/solutions/ultimatepointone.go b/tests/go/solutions/ultimatepointone.go new file mode 100644 index 00000000..71a9e9ec --- /dev/null +++ b/tests/go/solutions/ultimatepointone.go @@ -0,0 +1,5 @@ +package solutions + +func UltimatePointOne(n ***int) { + ***n = 1 +} diff --git a/tests/go/solutions/union/main.go b/tests/go/solutions/union/main.go new file mode 100644 index 00000000..586397b7 --- /dev/null +++ b/tests/go/solutions/union/main.go @@ -0,0 +1,40 @@ +package main + +import ( + "fmt" + "os" +) + +func isIn(a rune, arr []rune) bool { + for _, v := range arr { + if a == v { + return true + } + } + return false +} + +func main() { + + if len(os.Args) == 3 { + var res []rune + str1 := []rune(os.Args[1]) + str2 := []rune(os.Args[2]) + + for _, v := range str1 { + if !isIn(v, res) { + res = append(res, v) + } + } + + for _, v := range str2 { + if !isIn(v, res) { + res = append(res, v) + } + } + + fmt.Print(string(res)) + } + + fmt.Println() +} diff --git a/tests/go/solutions/union/union_test.go b/tests/go/solutions/union/union_test.go new file mode 100644 index 00000000..fb587f45 --- /dev/null +++ b/tests/go/solutions/union/union_test.go @@ -0,0 +1,28 @@ +package main + +import ( + "strings" + "testing" + + "github.com/01-edu/z01" +) + +func TestUnion(t *testing.T) { + arg1 := []string{"zpadinton", "paqefwtdjetyiytjneytjoeyjnejeyj"} + arg2 := []string{"ddf6vewg64f", "gtwthgdwthdwfteewhrtag6h4ffdhsd"} + arg3 := []string{""} + arg4 := []string{"rien", "cette phrase ne cache rien"} + arg5 := []string{" this is ", " wait shr"} + arg6 := []string{" more ", "then", "two", "arguments"} + + str1 := z01.RandAlnum() + str2 := strings.Join([]string{z01.RandAlnum(), str1, z01.RandAlnum()}, "") + + arg7 := []string{str1, str2} + arg8 := []string{z01.RandAlnum(), z01.RandAlnum()} + args := [][]string{arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8} + + for _, v := range args { + z01.ChallengeMainExam(t, v...) + } +} diff --git a/tests/go/solutions/uniqueoccurences/main.go b/tests/go/solutions/uniqueoccurences/main.go new file mode 100644 index 00000000..ee9c33dc --- /dev/null +++ b/tests/go/solutions/uniqueoccurences/main.go @@ -0,0 +1,41 @@ +package main + +import ( + "github.com/01-edu/z01" + "os" +) + +func solve(str string) bool { + arr := make([]int, 26) + for i := 0; i < len(str); i++ { + arr[str[i]-'a']++ + } + for i := 0; i < 26; i++ { + for j := i + 1; j < 26; j++ { + if arr[i] == arr[j] && arr[i] != 0 { + return false + } + } + } + return true +} + +func print(str string) { + for _, v := range str { + z01.PrintRune(v) + } +} + +func main() { + args := os.Args[1:] + if len(args) != 1 { + z01.PrintRune('\n') + return + } + result := solve(args[0]) + if result { + print("true\n") + } else { + print("false\n") + } +} diff --git a/tests/go/solutions/uniqueoccurences/uniqueoccurences_test.go b/tests/go/solutions/uniqueoccurences/uniqueoccurences_test.go new file mode 100644 index 00000000..82cfe297 --- /dev/null +++ b/tests/go/solutions/uniqueoccurences/uniqueoccurences_test.go @@ -0,0 +1,26 @@ +package main + +import ( + "testing" + "github.com/01-edu/z01" +) + +func TestUniqueOccurences(t *testing.T) { + table := []string{} + + table = append(table, + "abbaac", + "ab", + "abcacccazb", + "", + ) + + for i := 0; i < 15; i++ { + value := z01.RandStr(z01.RandIntBetween(5, 10), "qwertyuiopasdfghjklzxcvbnm") + table = append(table, value) + } + + for _, arg := range table { + z01.ChallengeMainExam(t, arg) + } +} \ No newline at end of file diff --git a/tests/go/solutions/unmatch.go b/tests/go/solutions/unmatch.go new file mode 100644 index 00000000..04877f67 --- /dev/null +++ b/tests/go/solutions/unmatch.go @@ -0,0 +1,20 @@ +package solutions + +//Returns the element of the slice that doesn't have a correspondant pair +func Unmatch(arr []int) int { + //count the number of repetitions of each value + var quant int + for _, el := range arr { + quant = 0 + for _, v := range arr { + if v == el { + quant++ + } + } + //if the number of repetitions is odd return that element + if quant%2 != 0 { + return el + } + } + return -1 +} diff --git a/tests/go/solutions/volumechanger.go b/tests/go/solutions/volumechanger.go new file mode 100644 index 00000000..3fda9d2f --- /dev/null +++ b/tests/go/solutions/volumechanger.go @@ -0,0 +1,12 @@ +package solutions + +func abs(a int) int { + if a < 0 { + return -a + } + return a +} + +func Volumechanger(a, b int) int { + return abs(a-b)/5 + abs(a-b)%5/2 + abs(a-b)%5%2 +} diff --git a/tests/go/solutions/volumechanger/main.go b/tests/go/solutions/volumechanger/main.go new file mode 100644 index 00000000..6018bec0 --- /dev/null +++ b/tests/go/solutions/volumechanger/main.go @@ -0,0 +1,16 @@ +package main + +func abs(a int) int { + if a < 0 { + return -a + } + return a +} + +func Volumechanger(a, b int) int { + return abs(a-b)/5 + abs(a-b)%5/2 + abs(a-b)%5%2 +} + +func main() { + +} diff --git a/tests/go/solutions/volumechanger/volumechanger_test.go b/tests/go/solutions/volumechanger/volumechanger_test.go new file mode 100644 index 00000000..832f3076 --- /dev/null +++ b/tests/go/solutions/volumechanger/volumechanger_test.go @@ -0,0 +1,48 @@ +package main + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "../../solutions" // This line is not necessary when testing an exercise with a program +) + +func TestVolumechanger(t *testing.T) { + type node struct { + init int + fin int + } + table := []node{} + // Initial filling of that array with the values I see in the examples of the subject + + table = append(table, + node{50, 43}, + node{13, 13}, + node{10, 9}, + node{5, 9}, + ) + + // If we were to leave the table as it is, a student could just do a program with 4 ifs and get + // "around" the goal of the exercise. We are now going to add 15 random tests using the z01 testing library + + for i := 0; i < 15; i++ { + value := node{ + init: z01.RandIntBetween(0, 30), + fin: z01.RandIntBetween(0, 100), + } + + //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" + //Because the exercise asks for a function we are now using the Challenge function (this function would + // be the ChallengeMainExam function) + + for _, arg := range table { + z01.Challenge(t, Volumechanger, solutions.Volumechanger, arg.init, arg.fin) + } +} diff --git a/tests/go/solutions/wdmatch/main.go b/tests/go/solutions/wdmatch/main.go new file mode 100644 index 00000000..95f8482e --- /dev/null +++ b/tests/go/solutions/wdmatch/main.go @@ -0,0 +1,34 @@ +package main + +import ( + "fmt" + "os" +) + +func result(str1 string, str2 string) string { + arraystr1 := []rune(str1) + arraystr2 := []rune(str2) + var rest string + count := 0 + for i := 0; i < len(arraystr1); i++ { + for j := count; j < len(arraystr2); j++ { + if arraystr1[i] == arraystr2[j] { + rest += string(arraystr1[i]) + j = len(arraystr2) - 1 + } + count++ + } + } + if rest != str1 { + return "" + } + return rest +} + +func main() { + if len(os.Args) == 3 { + fmt.Println(result(os.Args[1], os.Args[2])) + } else { + fmt.Println() + } +} diff --git a/tests/go/solutions/wdmatch/wdmatch_test.go b/tests/go/solutions/wdmatch/wdmatch_test.go new file mode 100644 index 00000000..f6d0d167 --- /dev/null +++ b/tests/go/solutions/wdmatch/wdmatch_test.go @@ -0,0 +1,22 @@ +package main + +import ( + "strings" + "testing" + + "github.com/01-edu/z01" +) + +func TestWdMatch(t *testing.T) { + table := append(z01.MultRandWords(), + " ", + "faya fgvvfdxcacpolhyghbreda", + "faya fgvvfdxcacpolhyghbred", + "error rrerrrfiiljdfxjyuifrrvcoojh", + "error rrerrrfiiljdfxjyuifrrvcoojrh", + ) + + for _, s := range table { + z01.ChallengeMainExam(t, strings.Fields(s)...) + } +} diff --git a/tests/go/solutions/ztail/main.go b/tests/go/solutions/ztail/main.go new file mode 100644 index 00000000..e1334667 --- /dev/null +++ b/tests/go/solutions/ztail/main.go @@ -0,0 +1,90 @@ +package main + +import ( + "fmt" + "github.com/01-edu/z01" + "os" + "strconv" +) + +func numberOfBytes(args []string) (int, []string) { + n := len(args) + nbytes := 0 + var files []string + for i, v := range args { + var err error + _, err = strconv.Atoi(v) + if v == "-c" { + if i >= n-1 { + fmt.Printf("tail: option requires an argument -- 'c'\nTry 'tail --help' for more information.") + os.Exit(1) + } + arg := args[i+1] + + nbytes, err = strconv.Atoi(arg) + + if err != nil { + fmt.Printf("tail: invalid number of bytes: `%s`\n", arg) + os.Exit(1) + } + continue + } + + if err != nil { + files = append(files, v) + } + + } + return nbytes, files +} + +func fileSize(fi *os.File) int64 { + fil, err := fi.Stat() + + if err != nil { + fmt.Println(err.Error()) + return 0 + } + + return fil.Size() +} + +func main() { + + n := len(os.Args) + if n < 4 { + fmt.Println("Not enough arguments") + os.Exit(1) + } + + nbytes, files := numberOfBytes(os.Args[1:]) + + printName := len(files) > 1 + + //open files for reading only + for j, f := range files { + fi, err := os.Open(f) + if err != nil { + fmt.Printf("tail: cannot open '%s' for reading: No such file or directory\n", f) + os.Exit(1) + } + if printName { + fmt.Printf("==> %s <==\n", f) + } + read := make([]byte, int(nbytes)) + _, er := fi.ReadAt(read, fileSize(fi)-int64(nbytes)) + if er != nil { + fmt.Println(er.Error()) + } + + for _, c := range read { + z01.PrintRune(rune(c)) + } + + if j < len(files)-1 { + z01.PrintRune('\n') + } + + fi.Close() + } +} diff --git a/tests/go/sortedlistmerge_test.go b/tests/go/sortedlistmerge_test.go new file mode 100644 index 00000000..e0610e65 --- /dev/null +++ b/tests/go/sortedlistmerge_test.go @@ -0,0 +1,113 @@ +package student_test + +import ( + "strconv" + "testing" + + solution "./solutions" + student "./student" + "github.com/01-edu/z01" +) + +type NodeI13 = student.NodeI +type NodeIS13 = solution.NodeI + +func printListStudent1(n *NodeI13) string { + var res string + it := n + for it != nil { + res += strconv.Itoa(it.Data) + "-> " + it = it.Next + } + + res += "" + return res +} + +func nodePushBackListInt13(l *NodeI13, l1 *NodeIS13, data int) { + n := &NodeI13{Data: data} + n1 := &NodeIS13{Data: data} + + if l == nil { + l = n + } else { + iterator := l + for iterator.Next != nil { + iterator = iterator.Next + } + iterator.Next = n + } + + if l1 == nil { + l1 = n1 + } else { + iterator1 := l1 + for iterator1.Next != nil { + iterator1 = iterator1.Next + } + iterator1.Next = n1 + } +} + +func TestSortedListMerge(t *testing.T) { + var link *NodeI13 + var link2 *NodeI13 + var linkTest *NodeIS13 + var linkTest2 *NodeIS13 + type nodeTest struct { + data []int + data2 []int + } + + table := []nodeTest{} + + table = append(table, + nodeTest{ + data: []int{}, + }) + for i := 0; i < 3; i++ { + val := nodeTest{ + data: z01.MultRandInt(), + data2: z01.MultRandInt(), + } + table = append(table, val) + + } + table = append(table, + nodeTest{ + data: []int{3, 5, 7}, + data2: []int{1, -2, 4, 6}, + }, + ) + for _, arg := range table { + for i := 0; i < len(arg.data); i++ { + nodePushBackListInt13(link, linkTest, arg.data[i]) + } + for i := 0; i < len(arg.data2); i++ { + nodePushBackListInt13(link2, linkTest2, arg.data2[i]) + } + + link = student.ListSort(link) + link2 = student.ListSort(link2) + linkTest = solution.ListSort(linkTest) + linkTest2 = solution.ListSort(linkTest2) + + aux := student.SortedListMerge(link, link2) + aux2 := solution.SortedListMerge(linkTest, linkTest2) + + if aux == nil && aux2 == nil { + } else if aux != nil && aux2 == nil { + t.Errorf("\nstudent merged lists:%s\nmerged lists:%s\n\nSortListMerge() == %v instead of %v\n\n", + printListStudent1(aux), solution.PrintList(aux2), aux, aux2) + } else if aux.Data != aux2.Data { + t.Errorf("\nstudent merged lists:%s\nmerged lists:%s\n\nSortListMerge() == %v instead of %v\n\n", + printListStudent1(aux), solution.PrintList(aux2), aux, aux2) + } + + link = &NodeI13{} + link2 = &NodeI13{} + linkTest = &NodeIS13{} + linkTest2 = &NodeIS13{} + + } +} diff --git a/tests/go/sortintegertable_test.go b/tests/go/sortintegertable_test.go new file mode 100644 index 00000000..47212920 --- /dev/null +++ b/tests/go/sortintegertable_test.go @@ -0,0 +1,31 @@ +package student_test + +import ( + "reflect" + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestSortIntegerTable(t *testing.T) { + i := 0 + for i < z01.SliceLen { + table := z01.MultRandIntBetween(-100, 100) + + tableCopyBefore := make([]int, len(table)) + copy(tableCopyBefore, table) + + table2 := make([]int, len(table)) + copy(table2, table) + + student.SortIntegerTable(table) + solutions.SortIntegerTable(table2) + if !reflect.DeepEqual(table, table2) { + t.Errorf("SortIntegerTable(%v), table == %v instead of %v ", tableCopyBefore, table, table2) + } + i++ + } +} diff --git a/tests/go/sortlist_test.go b/tests/go/sortlist_test.go new file mode 100644 index 00000000..5c32e184 --- /dev/null +++ b/tests/go/sortlist_test.go @@ -0,0 +1,126 @@ +package student_test + +import ( + "strconv" + "testing" + + solution "./solutions" + student "./student" + "github.com/01-edu/z01" +) + +func listToString4(n *solution.Nodelist) string { + var res string + it := n + for it != nil { + res += strconv.Itoa(it.Data) + "-> " + it = it.Next + } + res += "" + return res +} + +func listToStringStu4(n *student.Nodelist) string { + var res string + it := n + for it != nil { + res += strconv.Itoa(it.Data) + "-> " + it = it.Next + } + res += "" + return res +} + +func ascending(a, b int) bool { + return a <= b +} + +func descending(a, b int) bool { + return a >= b +} + +func insertNodeListSolution(l *solution.Nodelist, data int) *solution.Nodelist { + n := &solution.Nodelist{Data: data} + it := l + if it == nil { + it = n + } else { + iterator := it + for iterator.Next != nil { + iterator = iterator.Next + } + iterator.Next = n + } + return it +} + +func insertNodeListStudent(l1 *student.Nodelist, data int) *student.Nodelist { + n1 := &student.Nodelist{Data: data} + it := l1 + if it == nil { + it = n1 + } else { + iterator := it + for iterator.Next != nil { + iterator = iterator.Next + } + iterator.Next = n1 + } + return it +} + +func compare(t *testing.T, l *solution.Nodelist, l1 *student.Nodelist, f func(a, b int) bool) { + cmp := solution.GetName(f) + + for l1 != nil && l != nil { + if l1.Data != l.Data { + t.Errorf("\nstudent list:%s\nlist:%s\nfunction cmp:%s\n\nSortListInsert() == %v instead of %v\n\n", + listToStringStu4(l1), listToString4(l), cmp, l1.Data, l.Data) + return + } + l1 = l1.Next + l = l.Next + } +} + +func TestSortList(t *testing.T) { + var linkSolutions *solution.Nodelist + var linkStudent *student.Nodelist + + type nodeTest struct { + data []int + functions []func(a, b int) bool + } + + table := []nodeTest{} + + for i := 0; i < 4; i++ { + val := nodeTest{ + data: z01.MultRandIntBetween(1, 1234), + functions: []func(a, b int) bool{ascending, descending}, + } + table = append(table, val) + } + + table = append(table, + nodeTest{ + data: []int{2, 5, 3, 1, 9, 6}, + functions: []func(a, b int) bool{ascending, descending}, + }) + + for _, arg := range table { + for i := 0; i < len(arg.data); i++ { + linkStudent = insertNodeListStudent(linkStudent, arg.data[i]) + linkSolutions = insertNodeListSolution(linkSolutions, arg.data[i]) + } + + for i := 0; i < len(arg.functions); i++ { + studentResult := student.SortList(linkStudent, arg.functions[i]) + solutionResult := solution.SortList(linkSolutions, arg.functions[i]) + + compare(t, solutionResult, studentResult, arg.functions[i]) + } + linkSolutions = &solution.Nodelist{} + linkStudent = &student.Nodelist{} + } +} diff --git a/tests/go/sortlistinsert_test.go b/tests/go/sortlistinsert_test.go new file mode 100644 index 00000000..2179e088 --- /dev/null +++ b/tests/go/sortlistinsert_test.go @@ -0,0 +1,146 @@ +package student_test + +import ( + "strconv" + "testing" + + solution "./solutions" + solutions "./solutions" + student "./student" + "github.com/01-edu/z01" +) + +type NodeI14 = student.NodeI +type NodeIS14 = solution.NodeI + +func listToStringStu3(n *NodeI14) string { + var res string + it := n + for it != nil { + res += strconv.Itoa(it.Data) + "-> " + it = it.Next + } + res += "" + return res +} + +func nodepushback1(l *NodeI14, data int) *NodeI14 { + n := &NodeI14{Data: data} + + if l == nil { + return n + } + iterator := l + for iterator.Next != nil { + iterator = iterator.Next + } + iterator.Next = n + return l +} + +func nodepushback2(l *NodeIS14, data int) *NodeIS14 { + n := &NodeIS14{Data: data} + + if l == nil { + return n + } + iterator := l + for iterator.Next != nil { + iterator = iterator.Next + } + iterator.Next = n + return l +} + +func comparFuncNodeInt14(l *NodeI14, l1 *NodeIS14, t *testing.T, data []int) { + for l != nil || l1 != nil { + if (l == nil && l1 != nil) || (l != nil && l1 == nil) { + t.Errorf("\ndata used to insert: %d\nstudent list:%s\nlist:%s\n\nSortListInsert() == %v instead of %v\n\n", + data, listToStringStu3(l), solution.PrintList(l1), l, l1) + return + } else if l.Data != l1.Data { + t.Errorf("\ndata used to insert: %d\nstudent list:%s\nlist:%s\n\nSortListInsert() == %v instead of %v\n\n", + data, listToStringStu3(l), solution.PrintList(l1), l.Data, l1.Data) + return + } + l = l.Next + l1 = l1.Next + } +} + +// exercise 16 +func TestSortListInsert(t *testing.T) { + var link *NodeI14 + var link2 *NodeIS14 + + type nodeTest struct { + data []int + data_ref []int + } + table := []nodeTest{} + + table = append(table, + nodeTest{ + data: []int{}, + data_ref: []int{}, + }) + for i := 0; i < 2; i++ { + val := nodeTest{ + data: z01.MultRandInt(), + data_ref: z01.MultRandInt(), + } + table = append(table, val) + } + table = append(table, + nodeTest{ + data: []int{5, 4, 3, 2, 1}, + data_ref: z01.MultRandInt(), + }, + ) + for _, arg := range table { + for i := 0; i < len(arg.data); i++ { + link2 = nodepushback2(link2, arg.data[i]) + link = nodepushback1(link, arg.data[i]) + } + + link2 = solutions.ListSort(link2) + link = sortStudentsList(link) + + for i := 0; i < len(arg.data_ref); i++ { + link2 = solution.SortListInsert(link2, arg.data_ref[i]) + link = student.SortListInsert(link, arg.data_ref[i]) + } + + comparFuncNodeInt14(link, link2, t, arg.data_ref) + link = &NodeI14{} + link2 = &NodeIS14{} + } +} + +func sortStudentsList(l *NodeI14) *NodeI14 { + + Head := l + if Head == nil { + return nil + } + Head.Next = sortStudentsList(Head.Next) + + if Head.Next != nil && Head.Data > Head.Next.Data { + Head = move(Head) + } + return Head +} + +func move(l *NodeI14) *NodeI14 { + p := l + n := l.Next + ret := n + + for n != nil && l.Data > n.Data { + p = n + n = n.Next + } + p.Next = l + l.Next = n + return ret +} diff --git a/tests/go/sortparams_test.go b/tests/go/sortparams_test.go new file mode 100644 index 00000000..cba6348c --- /dev/null +++ b/tests/go/sortparams_test.go @@ -0,0 +1,11 @@ +package student_test + +import ( + "github.com/01-edu/z01" + "testing" +) + +func TestSortParams(t *testing.T) { + args := []string{"1", "a", "2", "A", "3", "b", "4", "C"} + z01.ChallengeMain(t, args...) +} diff --git a/tests/go/sortwordarr_test.go b/tests/go/sortwordarr_test.go new file mode 100644 index 00000000..95012152 --- /dev/null +++ b/tests/go/sortwordarr_test.go @@ -0,0 +1,43 @@ +package student_test + +import ( + "reflect" + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestSortWordArr(t *testing.T) { + var table [][]string + + for i := 0; i < 15; i++ { + table = append(table, z01.MultRandWords()) + } + + table = append(table, []string{"a", "A", "1", "b", "B", "2", "c", "C", "3"}) + + for _, org := range table { + //copy for using the solution function + cp_sol := make([]string, len(org)) + //copy for using the student function + cp_stu := make([]string, len(org)) + + copy(cp_sol, org) + copy(cp_stu, org) + + solutions.SortWordArr(cp_sol) + student.SortWordArr(cp_stu) + + if !reflect.DeepEqual(cp_stu, cp_sol) { + t.Errorf("%s(%v) == %v instead of %v\n", + "SortWordArr", + org, + cp_stu, + cp_sol, + ) + } + } +} diff --git a/tests/go/split_test.go b/tests/go/split_test.go new file mode 100644 index 00000000..e9ca1fa6 --- /dev/null +++ b/tests/go/split_test.go @@ -0,0 +1,47 @@ +package student_test + +import ( + "math/rand" + "strings" + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestSplit(t *testing.T) { + + separators := []string{"!=HA=!", + "!==!", + " ", + "|=choumi=|", + "|<=>|", + z01.RandStr(3, z01.RuneRange('A', 'Z')), + "<<==123==>>", + "[<>abc<>]"} + + type node struct { + str string + sep string + } + table := []node{} + //15 random slice of strings + + for i := 0; i < 15; i++ { + separator := separators[rand.Intn(len(separators))] + val := node{ + str: strings.Join(z01.MultRandAlnum(), separator), + sep: separator, + } + table = append(table, val) + } + + table = append(table, + node{str: "HelloHAhowHAareHAyou?", sep: "HA"}) + + for _, arg := range table { + z01.Challenge(t, student.Split, solutions.Split, arg.str, arg.sep) + } +} diff --git a/tests/go/splitwhitespaces_test.go b/tests/go/splitwhitespaces_test.go new file mode 100644 index 00000000..8beec1e1 --- /dev/null +++ b/tests/go/splitwhitespaces_test.go @@ -0,0 +1,30 @@ +package student_test + +import ( + "strings" + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +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) + } + + table = append(table, + "Hello how are you?") + + for _, arg := range table { + z01.Challenge(t, student.SplitWhiteSpaces, solutions.SplitWhiteSpaces, arg) + } +} diff --git a/tests/go/sqrt_test.go b/tests/go/sqrt_test.go new file mode 100644 index 00000000..90cc46d1 --- /dev/null +++ b/tests/go/sqrt_test.go @@ -0,0 +1,33 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestSqrt(t *testing.T) { + table := append( + z01.MultRandIntBetween(-1000000, 1000000), + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 100, + ) + for _, arg := range table { + z01.Challenge(t, student.Sqrt, solutions.Sqrt, arg) + } +} diff --git a/tests/go/strlen_test.go b/tests/go/strlen_test.go new file mode 100644 index 00000000..d9569b58 --- /dev/null +++ b/tests/go/strlen_test.go @@ -0,0 +1,26 @@ +package student_test + +import ( + "testing" + + solutions "./solutions" + student "./student" + "github.com/01-edu/z01" +) + +func TestStrLen(t *testing.T) { + randomStringCharset := "a b c d e f g h ijklmnopqrstuvwxyz A B C D E FGHIJKLMNOPRSTUVWXYZ" + + table := []string{} + for i := 0; i < 10; i++ { + randomLenghtOfWord := z01.RandIntBetween(1, 20) + randomStrRandomLenght := z01.RandStr(randomLenghtOfWord, randomStringCharset) + table = append(table, randomStrRandomLenght) + } + table = append(table, "Héllo!") + table = append(table, randomStringCharset) + + for _, s := range table { + z01.Challenge(t, solutions.StrLen, student.StrLen, s) + } +} diff --git a/tests/go/strrev_test.go b/tests/go/strrev_test.go new file mode 100644 index 00000000..e41feb9b --- /dev/null +++ b/tests/go/strrev_test.go @@ -0,0 +1,22 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestStrRev(t *testing.T) { + table := append( + z01.MultRandASCII(), + "Hello!", + "Bonjour!", + "Hola!", + ) + for _, arg := range table { + z01.Challenge(t, student.StrRev, solutions.StrRev, arg) + } +} diff --git a/tests/go/swap_test.go b/tests/go/swap_test.go new file mode 100644 index 00000000..b061f684 --- /dev/null +++ b/tests/go/swap_test.go @@ -0,0 +1,27 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + student "./student" +) + +func TestSwap(t *testing.T) { + i := 0 + for i < 30 { + a := z01.RandInt() + b := z01.RandInt() + aCopy := a + bCopy := b + student.Swap(&a, &b) + if a != bCopy { + t.Errorf("Swap(%d, %d), a == %d instead of %d", aCopy, bCopy, a, bCopy) + } + if b != aCopy { + t.Errorf("Swap(%d, %d), b == %d instead of %d", aCopy, bCopy, b, aCopy) + } + i++ + } +} diff --git a/tests/go/swapbits_test.go b/tests/go/swapbits_test.go new file mode 100644 index 00000000..7d03ed26 --- /dev/null +++ b/tests/go/swapbits_test.go @@ -0,0 +1,36 @@ +package student_test + +import ( + "github.com/01-edu/z01" + "reflect" + "testing" + + solutions "./solutions" + student "./student" +) + +func challengeBytes(t *testing.T, fn1, fn2 interface{}, args ...interface{}) { + st1 := z01.Monitor(fn1, args) + st2 := z01.Monitor(fn2, args) + if !reflect.DeepEqual(st1.Results, st2.Results) { + t.Errorf("%s(%08b) == %08b instead of %08b\n", + z01.NameOfFunc(fn1), + args[0].(byte), + st1.Results[0].(byte), + st2.Results[0].(byte), + ) + } +} + +func TestSwapBits(t *testing.T) { + args := []byte{0x24, 0x14, 0x11, 0x22, 0xd2, 0x15, 0xff, 0x0, 0x35, 0x58, 0x43} + + for i := 0; i < 10; i++ { + n := z01.RandIntBetween(0, 255) + args = append(args, byte(n)) + } + + for _, v := range args { + challengeBytes(t, student.SwapBits, solutions.SwapBits, v) + } +} diff --git a/tests/go/tetrisoptimizer_test.go b/tests/go/tetrisoptimizer_test.go new file mode 100644 index 00000000..178da33c --- /dev/null +++ b/tests/go/tetrisoptimizer_test.go @@ -0,0 +1,165 @@ +package student_test + +import ( + "context" + "fmt" + "io/ioutil" + "os" + "os/exec" + "path/filepath" + "sort" + "strconv" + "strings" + "testing" + "time" +) + +type ( + vect struct{ x, y int } + + // the tetromino is described with three vectors + // example : + // + // [#][#][#] + // [#] + // + // tetromino{{1, 0}, {2, 0}, {1, 1}} + tetromino [3]vect +) + +// load a tetromino composed of the rune r in the map s +// example : +// +// read(`...... +// ...... +// ...... +// ....X. +// ..XXX. +// ...... +// `, +// 'X', +// ) == tetromino{{-2, 1}, {-1, 1}, {0, 1}} +func read(s string, r rune) (t tetromino) { + var origin vect + i := 0 + first := true + lines := strings.Split(s, "\n") + for y, line := range lines { + for x := range line { + if []rune(line)[x] == r { + if first { + first = false + origin = vect{x, y} + } else { + t[i] = vect{x - origin.x, y - origin.y} + i++ + if i == 3 { + return tetromino{} + } + } + } + } + } + return +} + +func TestTetrisOptimizer(t *testing.T) { + var ( + timeout = 30 * time.Second + samples = "./solutions/tetrisoptimizer/samples" + student = "./student/tetrisoptimizer" + exe = filepath.Join(student, "a.out") + ) + // load samples + f, err := os.Open(samples) + if err != nil { + t.Fatal("Cannot open directory", err) + } + defer f.Close() + filenames, err := f.Readdirnames(0) + if err != nil { + t.Fatal("Cannot read directory", err) + } + + // separate samples into good (valid) and bad (invalid) files + var goodFiles, badFiles []string + for _, filename := range filenames { + if strings.HasPrefix(filename, "good") { + goodFiles = append(goodFiles, filepath.Join(samples, filename)) + } else if strings.HasPrefix(filename, "bad") { + badFiles = append(badFiles, filepath.Join(samples, filename)) + } + } + sort.Strings(badFiles) + sort.Strings(goodFiles) + + // compile student code + cmd := exec.Command("go", "build", "-o", exe, "-trimpath", "-ldflags", "-s -w", student) + cmd.Env = append(os.Environ(), "CGO_ENABLED=0", "GOARCH=amd64") + if out, err := cmd.CombinedOutput(); err != nil { + t.Fatal("Cannot compile :", string(out)) + } + + ctx, cancel := context.WithTimeout(context.Background(), timeout) + defer cancel() + + // test invalid cases + for _, badFile := range badFiles { + b, _ := exec.CommandContext(ctx, exe, badFile).CombinedOutput() + if string(b) != "ERROR\n" { + t.Fatal(`Failed to handle bad format, should output : "ERROR\n"`) + } + } + + // test valid cases + score := .0 + defer func() { + fmt.Println("score =", score) + }() + for _, goodFile := range goodFiles { + size, _ := strconv.Atoi(strings.Split(goodFile, "-")[2]) + b, err := exec.CommandContext(ctx, exe, goodFile).Output() + if ctx.Err() == context.DeadlineExceeded { + return + } + if err != nil { + t.Fatal("Failed to process a valid map : execution failed") + } + s := string(b) + lines := strings.Split(s, "\n") + if lines[len(lines)-1] != "" { + t.Fatal(`Failed to process a valid map : missing final '\n'`) + } + lines = lines[:len(lines)-1] + for _, line := range lines { + if len(line) != len(lines) { + t.Fatal("Failed to process a valid map : invalid square, it is expected as many lines as characters") + } + } + if len(lines) < size { + t.Fatal("Failed to process a valid map : the square cannot be that small") + } + b, err = ioutil.ReadFile(goodFile) + if err != nil { + t.Fatal("Failed to read a valid map") + } + pieces := strings.Split(string(b), "\n\n") + surface := len(lines) * len(lines) + if strings.Count(s, ".") != surface-len(pieces)*4 { + t.Fatal("Failed to process a valid map : the number of holes (character '.') is not correct") + } + letter := 'A' + for _, piece := range pieces { + if read(s, letter) != read(piece, '#') { + t.Fatal("Failed to process a valid map : a tetromino is missing") + } + letter += 1 + } + score += float64(size*size) / float64(surface) + } +} + +// TODO: +// Ajouter des cas d'erreurs : +// mauvais arguments +// mauvais types de fichiers (liens, dossiers) diff --git a/tests/go/tolower_test.go b/tests/go/tolower_test.go new file mode 100644 index 00000000..1c364617 --- /dev/null +++ b/tests/go/tolower_test.go @@ -0,0 +1,20 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestToLower(t *testing.T) { + table := append( + z01.MultRandASCII(), + "Hello! How are you?", + ) + for _, arg := range table { + z01.Challenge(t, student.ToLower, solutions.ToLower, arg) + } +} diff --git a/tests/go/toupper_test.go b/tests/go/toupper_test.go new file mode 100644 index 00000000..e9910b65 --- /dev/null +++ b/tests/go/toupper_test.go @@ -0,0 +1,23 @@ +package student_test + +import ( + "testing" + + "github.com/01-edu/z01" + + solutions "./solutions" + student "./student" +) + +func TestToUpper(t *testing.T) { + + table := z01.MultRandASCII() + + table = append(table, + "Hello! How are you?", + ) + + for _, arg := range table { + z01.Challenge(t, student.ToUpper, solutions.ToUpper, arg) + } +} diff --git a/tests/go/trimatoi_test.go b/tests/go/trimatoi_test.go new file mode 100644 index 00000000..5f4575fe --- /dev/null +++ b/tests/go/trimatoi_test.go @@ -0,0 +1,41 @@ +package student_test + +import ( + "testing" + + solutions "./solutions" + student "./student" + "github.com/01-edu/z01" +) + +func TestTrimAtoi(t *testing.T) { + array := []string{"", + "12345", + "str123ing45", + "012 345", + "Hello World!", + "sd+x1fa2W3s4", + "sd-x1fa2W3s4", + "sdx1-fa2W3s4", + z01.RandAlnum()} + array = stringsToTrimAtoi(array) + for i := range array { + z01.Challenge(t, student.TrimAtoi, solutions.TrimAtoi, array[i]) + } +} + +func stringsToTrimAtoi(arr []string) []string { + alpha := "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789012345678901234567890123456789" + + for index := 0; index < 4; index++ { + str := "" + str += z01.RandStr(z01.RandIntBetween(0, 2), alpha) + x := z01.RandIntBetween(0, 14) + if x <= 4 { + str += "-" + } + str += z01.RandStr(z01.RandIntBetween(0, 10), alpha) + arr = append(arr, str) + } + return arr +} diff --git a/tests/go/ultimatedivmod_test.go b/tests/go/ultimatedivmod_test.go new file mode 100644 index 00000000..b67667d1 --- /dev/null +++ b/tests/go/ultimatedivmod_test.go @@ -0,0 +1,28 @@ +package student_test + +import ( + "testing" + + student "./student" + "github.com/01-edu/z01" +) + +func TestUltimateDivMod(t *testing.T) { + i := 0 + for i < z01.SliceLen { + a := z01.RandInt() + b := z01.RandInt() + aCopy := a + bCopy := b + div := a / b + mod := a % b + student.UltimateDivMod(&a, &b) + if a != div { + t.Errorf("DivMod(%d, %d), a == %d instead of %d", aCopy, bCopy, a, div) + } + if b != mod { + t.Errorf("DivMod(%d, %d), b == %d instead of %d", aCopy, bCopy, b, mod) + } + i++ + } +} diff --git a/tests/go/ultimatepointone_test.go b/tests/go/ultimatepointone_test.go new file mode 100644 index 00000000..bdb1c941 --- /dev/null +++ b/tests/go/ultimatepointone_test.go @@ -0,0 +1,17 @@ +package student_test + +import ( + "testing" + + student "./student" +) + +func TestUltimatePointOne(t *testing.T) { + a := 0 + b := &a + n := &b + student.UltimatePointOne(&n) + if a != 1 { + t.Errorf("UltimatePointOne(&n), a == %d instead of 1", a) + } +} diff --git a/tests/go/unmatch_test.go b/tests/go/unmatch_test.go new file mode 100644 index 00000000..e3436312 --- /dev/null +++ b/tests/go/unmatch_test.go @@ -0,0 +1,31 @@ +package student_test + +import ( + "testing" + + solutions "./solutions" + student "./student" + "github.com/01-edu/z01" +) + +func TestUnmatch(t *testing.T) { + arg1 := []int{1, 1, 2, 3, 4, 3, 4} + arg2 := []int{1, 1, 2, 4, 3, 4, 2, 3, 4} + arg3 := []int{1, 2, 1, 1, 4, 5, 5, 4, 1, 7} + arg4 := []int{1, 2, 3, 4, 5, 6, 7, 8} + arg5 := []int{0, 20, 91, 23, 10, 34} + arg6 := []int{1, 1, 2, 2, 3, 4, 3, 4, 5, 5, 8, 9, 8, 9} + + randInt1 := z01.RandIntBetween(-100, 100) + randInt2 := z01.RandIntBetween(-1000, 1000) + randInt3 := z01.RandIntBetween(-10, 10) + + arg7 := []int{randInt1, randInt2, randInt1, randInt2, randInt1 + randInt3, randInt1 + randInt3} + arg8 := []int{randInt1, randInt2, randInt1, randInt2, randInt1 + randInt3, randInt2 - randInt3} + + args := [][]int{arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8} + + for _, v := range args { + z01.Challenge(t, student.Unmatch, solutions.Unmatch, v) + } +} diff --git a/tests/go/ztail_test.go b/tests/go/ztail_test.go new file mode 100644 index 00000000..b88804eb --- /dev/null +++ b/tests/go/ztail_test.go @@ -0,0 +1,40 @@ +package student_test + +import ( + "github.com/01-edu/z01" + "strings" + "testing" +) + +//Compares only the stdout of each program +//As long as the program executes like tail for the stdout +//and the error messages are send to stderr +//the program passes the test +func TestZTail(t *testing.T) { + exercise := strings.ToLower( + strings.TrimPrefix(t.Name(), "Test")) + + arg1 := []string{"-c", "23", "./student/" + exercise + "/main.go"} + arg2 := []string{"./student/" + exercise + "/main.go", "-c", "23"} + arg3 := []string{"-c", "jfdka", "23"} + arg4 := []string{"-c", "23", "./student/" + exercise + "/README.md", "fjksdsf"} + arg5 := []string{"-c", "23", "../../README.md", "fjksdsf", "-c", "43"} + + argArr := [][]string{arg1, arg2, arg3, arg4, arg5} + + for _, args := range argArr { + correct, errC := z01.ExecOut("tail", args...) + out, err := z01.MainOut("./student/"+exercise, args...) + if out != correct { + t.Errorf("./%s \"%s\" prints %q instead of %q\n", + exercise, strings.Join(args, " "), out, correct) + } + if errC != nil && err == nil { + t.Errorf("./%s \"%s\" prints %q instead of %q\n", exercise, strings.Join(args, " "), "", errC) + } + if err != nil && errC != nil && err.Error() != errC.Error() { + t.Errorf("./%s %s prints %q instead of %q\n", exercise, strings.Join(args, " "), err, errC) + } + + } +} diff --git a/tests/service.sh b/tests/service.sh new file mode 100755 index 00000000..71ce56d4 --- /dev/null +++ b/tests/service.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +. "$WRAPPER" + +check_command docker "https://docs.docker.com/install" + +if test "$1" = "build"; then + docker build go -t tests-go + docker build sh -t tests-sh +fi diff --git a/tests/sh/Dockerfile b/tests/sh/Dockerfile new file mode 100644 index 00000000..ff967378 --- /dev/null +++ b/tests/sh/Dockerfile @@ -0,0 +1,6 @@ +FROM debian + +RUN apt-get update +RUN apt-get install -y jq curl git +COPY . /app +ENTRYPOINT ["/bin/bash", "/app/entrypoint.sh"] diff --git a/tests/sh/cl-camp1/folder1/1 b/tests/sh/cl-camp1/folder1/1 new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp1/folder1/2 b/tests/sh/cl-camp1/folder1/2 new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp1/folder1/3 b/tests/sh/cl-camp1/folder1/3 new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp1/folder1/4 b/tests/sh/cl-camp1/folder1/4 new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp1/folder1/5 b/tests/sh/cl-camp1/folder1/5 new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp1/folder1/6 b/tests/sh/cl-camp1/folder1/6 new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp1/folder1/7 b/tests/sh/cl-camp1/folder1/7 new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp1/folder1/8 b/tests/sh/cl-camp1/folder1/8 new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp1/folder1/9 b/tests/sh/cl-camp1/folder1/9 new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp1/folder2/a b/tests/sh/cl-camp1/folder2/a new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp1/folder2/b b/tests/sh/cl-camp1/folder2/b new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp1/folder2/c b/tests/sh/cl-camp1/folder2/c new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp1/folder2/d b/tests/sh/cl-camp1/folder2/d new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp1/folder2/e b/tests/sh/cl-camp1/folder2/e new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp1/folder2/f b/tests/sh/cl-camp1/folder2/f new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp1/folder2/g b/tests/sh/cl-camp1/folder2/g new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp1/folder2/h b/tests/sh/cl-camp1/folder2/h new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp1/folder2/i b/tests/sh/cl-camp1/folder2/i new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp1/folder2/j b/tests/sh/cl-camp1/folder2/j new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp1_test.sh b/tests/sh/cl-camp1_test.sh new file mode 100755 index 00000000..80823846 --- /dev/null +++ b/tests/sh/cl-camp1_test.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +# Unofficial Bash Strict Mode +set -euo pipefail +IFS=' +' + +script_dirS=$(cd -P "$(dirname "$BASH_SOURCE")" &>/dev/null && pwd) + +challenge() { + submitted=$(cd "$1" && "$script_dirS"/student/mastertheLS) + expected=$(cd "$1" && "$script_dirS"/solutions/mastertheLS) + + diff <(echo "$submitted") <(echo "$expected") +} + +challenge cl-camp1/folder1 +challenge cl-camp1/folder2 diff --git a/tests/sh/cl-camp2_test.sh b/tests/sh/cl-camp2_test.sh new file mode 100755 index 00000000..ab5b8f77 --- /dev/null +++ b/tests/sh/cl-camp2_test.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +# Unofficial Bash Strict Mode +set -euo pipefail +IFS=' +' + +diff student/r solutions/r diff --git a/tests/sh/cl-camp3/folder1/ab b/tests/sh/cl-camp3/folder1/ab new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp3/folder1/ac b/tests/sh/cl-camp3/folder1/ac new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp3/folder1/az b/tests/sh/cl-camp3/folder1/az new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp3/folder1/bz b/tests/sh/cl-camp3/folder1/bz new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp3/folder1/cz b/tests/sh/cl-camp3/folder1/cz new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp3/folder1/za! b/tests/sh/cl-camp3/folder1/za! new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp3/folder2/aa/aa b/tests/sh/cl-camp3/folder2/aa/aa new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp3/folder2/aa/az b/tests/sh/cl-camp3/folder2/aa/az new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp3/folder2/aa/ba/ab b/tests/sh/cl-camp3/folder2/aa/ba/ab new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp3/folder2/aa/ba/bz b/tests/sh/cl-camp3/folder2/aa/ba/bz new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp3/folder2/ab b/tests/sh/cl-camp3/folder2/ab new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp3/folder2/ac b/tests/sh/cl-camp3/folder2/ac new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp3/folder2/alphabet b/tests/sh/cl-camp3/folder2/alphabet new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp3/folder2/az b/tests/sh/cl-camp3/folder2/az new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp3/folder2/ba/aa/alphabetz! b/tests/sh/cl-camp3/folder2/ba/aa/alphabetz! new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp3/folder2/ba/aa/cz b/tests/sh/cl-camp3/folder2/ba/aa/cz new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp3/folder2/ba/aa/za! b/tests/sh/cl-camp3/folder2/ba/aa/za! new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp3/folder2/ba/ac b/tests/sh/cl-camp3/folder2/ba/ac new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp3/folder2/ba/alphabetz b/tests/sh/cl-camp3/folder2/ba/alphabetz new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp3/folder2/bz b/tests/sh/cl-camp3/folder2/bz new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp3/folder2/cz b/tests/sh/cl-camp3/folder2/cz new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp3/folder2/za! b/tests/sh/cl-camp3/folder2/za! new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp3_test.sh b/tests/sh/cl-camp3_test.sh new file mode 100755 index 00000000..00a5cba4 --- /dev/null +++ b/tests/sh/cl-camp3_test.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +# Unofficial Bash Strict Mode +set -euo pipefail +IFS=' +' + +script_dirS=$(cd -P "$(dirname "$BASH_SOURCE")" &>/dev/null && pwd) + +challenge() { + submitted=$(cd "$1" && "$script_dirS"/student/look) + expected=$(cd "$1" && "$script_dirS"/solutions/look) + + diff <(echo "$submitted") <(echo "$expected") +} + +challenge cl-camp3/folder1 +challenge cl-camp3/folder2 diff --git a/tests/sh/cl-camp4_test.sh b/tests/sh/cl-camp4_test.sh new file mode 100755 index 00000000..b02f9e66 --- /dev/null +++ b/tests/sh/cl-camp4_test.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# Unofficial Bash Strict Mode +set -euo pipefail +IFS=' +' + +challenge() { + submitted=$(./student/myfamily.sh) + expected=$(./solutions/myfamily.sh) + + diff <(echo "$submitted") <(echo "$expected") +} + +HERO_ID=1 challenge +HERO_ID=70 challenge diff --git a/tests/sh/cl-camp5/folder1/file1.sh b/tests/sh/cl-camp5/folder1/file1.sh new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp5/folder1/file2.sh b/tests/sh/cl-camp5/folder1/file2.sh new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp5/folder1/file3.sh b/tests/sh/cl-camp5/folder1/file3.sh new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp5/folder2/fileInsideAfolder4.sh b/tests/sh/cl-camp5/folder2/fileInsideAfolder4.sh new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp5/folder2/testsh/fileInsideAfolder5.sh b/tests/sh/cl-camp5/folder2/testsh/fileInsideAfolder5.sh new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp5/folder2/testsh/test/fileInsideAfolder6.sh b/tests/sh/cl-camp5/folder2/testsh/test/fileInsideAfolder6.sh new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp5_test.sh b/tests/sh/cl-camp5_test.sh new file mode 100755 index 00000000..de406c3d --- /dev/null +++ b/tests/sh/cl-camp5_test.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +# Unofficial Bash Strict Mode +set -euo pipefail +IFS=' +' + +script_dirS=$(cd -P "$(dirname "$BASH_SOURCE")" &>/dev/null && pwd) + +challenge() { + submitted=$(cd "$1" && "$script_dirS"/student/lookagain.sh) + expected=$(cd "$1" && "$script_dirS"/solutions/lookagain.sh) + + diff <(echo "$submitted") <(echo "$expected") +} + +challenge cl-camp5/folder1 +challenge cl-camp5/folder2 diff --git a/tests/sh/cl-camp6_test.sh b/tests/sh/cl-camp6_test.sh new file mode 100755 index 00000000..6e1b7602 --- /dev/null +++ b/tests/sh/cl-camp6_test.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +# Unofficial Bash Strict Mode +set -euo pipefail +IFS=' +' + +script_dirS=$(cd -P "$(dirname "$BASH_SOURCE")" &>/dev/null && pwd) + +challenge() { + submitted=$(cd "$1" && "$script_dirS"/student/countfiles.sh) + expected=$(cd "$1" && "$script_dirS"/solutions/countfiles.sh) + + diff <(echo "$submitted") <(echo "$expected") +} + +challenge cl-camp5/folder1 +challenge cl-camp5/folder2 diff --git a/tests/sh/cl-camp7_test.sh b/tests/sh/cl-camp7_test.sh new file mode 100755 index 00000000..1fb132c9 --- /dev/null +++ b/tests/sh/cl-camp7_test.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +# Unofficial Bash Strict Mode +set -euo pipefail +IFS=' +' + +diff student/\"\\?\$*\'ChouMi\'*\$?\\\" solutions/\"\\?\$*\'ChouMi\'*\$?\\\" diff --git a/tests/sh/cl-camp8/1 b/tests/sh/cl-camp8/1 new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp8/10 b/tests/sh/cl-camp8/10 new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp8/2 b/tests/sh/cl-camp8/2 new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp8/3 b/tests/sh/cl-camp8/3 new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp8/4 b/tests/sh/cl-camp8/4 new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp8/5 b/tests/sh/cl-camp8/5 new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp8/6 b/tests/sh/cl-camp8/6 new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp8/7 b/tests/sh/cl-camp8/7 new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp8/8 b/tests/sh/cl-camp8/8 new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp8/9 b/tests/sh/cl-camp8/9 new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp8/a b/tests/sh/cl-camp8/a new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp8/b b/tests/sh/cl-camp8/b new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp8/c b/tests/sh/cl-camp8/c new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp8/d b/tests/sh/cl-camp8/d new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp8/e b/tests/sh/cl-camp8/e new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp8/f b/tests/sh/cl-camp8/f new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp8/g b/tests/sh/cl-camp8/g new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp8/h b/tests/sh/cl-camp8/h new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp8/i b/tests/sh/cl-camp8/i new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp8/j b/tests/sh/cl-camp8/j new file mode 100644 index 00000000..e69de29b diff --git a/tests/sh/cl-camp8_test.sh b/tests/sh/cl-camp8_test.sh new file mode 100755 index 00000000..c40837f0 --- /dev/null +++ b/tests/sh/cl-camp8_test.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +# Unofficial Bash Strict Mode +set -euo pipefail +IFS=' +' + +cd cl-camp8 + +submitted=$(../student/skip.sh) +expected=$(../solutions/skip.sh) + +diff <(echo "$submitted") <(echo "$expected") diff --git a/tests/sh/entrypoint.sh b/tests/sh/entrypoint.sh new file mode 100755 index 00000000..fa090c35 --- /dev/null +++ b/tests/sh/entrypoint.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Unofficial Bash Strict Mode +set -euo pipefail +IFS=' +' + +cp -rT /app /jail +cd /jail +if ! test -f ${EXERCISE}_test.sh; then + echo No test file found for the exercise : "$EXERCISE" + exit 1 +fi +bash ${EXERCISE}_test.sh +echo PASS diff --git a/tests/sh/explain_test.sh b/tests/sh/explain_test.sh new file mode 100755 index 00000000..c6e350f9 --- /dev/null +++ b/tests/sh/explain_test.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# Unofficial Bash Strict Mode +set -euo pipefail +IFS=' +' + +submitted=$(student/explain.sh) +expected=$(solutions/explain.sh) + +if ! diff -q <(echo "$submitted") <(echo "$expected") &>/dev/null; then + echo "Wrong answer, detective." + exit 1 +fi diff --git a/tests/sh/introduction_test.sh b/tests/sh/introduction_test.sh new file mode 100755 index 00000000..3bd9d0bf --- /dev/null +++ b/tests/sh/introduction_test.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Unofficial Bash Strict Mode +set -euo pipefail +IFS=' +' + +submitted=$(./student/hello.sh) +expected=$(./solutions/hello.sh) + +diff <(echo "$submitted") <(echo "$expected") diff --git a/tests/sh/make-it-better_test.sh b/tests/sh/make-it-better_test.sh new file mode 100755 index 00000000..7992b815 --- /dev/null +++ b/tests/sh/make-it-better_test.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +# Unofficial Bash Strict Mode +set -euo pipefail +IFS=' +' + +print_content() { + mkdir -p uncompressed + tar -xpf done.tar -C uncompressed + TZ=utc ls -l --time-style='+%F %R' uncompressed | sed 1d | awk '{print $1, $6, $7, $8, $9, $10}' | sed -e 's/[[:space:]]*$//' +} + +submitted=$(cd student && print_content) +expected=$(cd solutions && print_content) + +diff <(echo "$submitted") <(echo "$expected") diff --git a/tests/sh/now-get-to-work_test.sh b/tests/sh/now-get-to-work_test.sh new file mode 100755 index 00000000..7313f2e1 --- /dev/null +++ b/tests/sh/now-get-to-work_test.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# Unofficial Bash Strict Mode +set -euo pipefail +IFS=' +' + +submitted=$(student/my_answer.sh) +expected=$(solutions/my_answer.sh) + +if ! diff -q <(echo "$submitted") <(echo "$expected") &>/dev/null; then + echo "Wrong answer, detective." + exit 1 +fi diff --git "a/tests/sh/solutions/\"\\?$*'ChouMi'*$?\\\"" "b/tests/sh/solutions/\"\\?$*'ChouMi'*$?\\\"" new file mode 100644 index 00000000..a616ad49 --- /dev/null +++ "b/tests/sh/solutions/\"\\?$*'ChouMi'*$?\\\"" @@ -0,0 +1 @@ +01 \ No newline at end of file diff --git a/tests/sh/solutions/countfiles.sh b/tests/sh/solutions/countfiles.sh new file mode 100755 index 00000000..1db83525 --- /dev/null +++ b/tests/sh/solutions/countfiles.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +find . -type d,f | wc -l diff --git a/tests/sh/solutions/done.tar b/tests/sh/solutions/done.tar new file mode 100644 index 00000000..485ab5f5 Binary files /dev/null and b/tests/sh/solutions/done.tar differ diff --git a/tests/sh/solutions/explain.sh b/tests/sh/solutions/explain.sh new file mode 100755 index 00000000..163c58d9 --- /dev/null +++ b/tests/sh/solutions/explain.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +echo "Annabel Church" +echo "699607" +echo "Blue Honda" +echo "Joe Germuska" +echo "Hellen Maher" +echo "Erika Owens" diff --git a/tests/sh/solutions/hello.sh b/tests/sh/solutions/hello.sh new file mode 100755 index 00000000..c7f4c0bd --- /dev/null +++ b/tests/sh/solutions/hello.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +echo "Hello $USERNAME!" diff --git a/tests/sh/solutions/look b/tests/sh/solutions/look new file mode 100755 index 00000000..bfd27e7f --- /dev/null +++ b/tests/sh/solutions/look @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +find . \( -name 'a*' -o -name '*z' -o -name 'z*a!' \) diff --git a/tests/sh/solutions/lookagain.sh b/tests/sh/solutions/lookagain.sh new file mode 100755 index 00000000..38323894 --- /dev/null +++ b/tests/sh/solutions/lookagain.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +find . '(' -name '*.sh' ')' -print | sed 's/\(.*\)\///g' | sed 's/\.sh//g' diff --git a/tests/sh/solutions/mastertheLS b/tests/sh/solutions/mastertheLS new file mode 100755 index 00000000..6a71ddf6 --- /dev/null +++ b/tests/sh/solutions/mastertheLS @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +ls -tF | tr '\r\n' ',' | sed 's/\(.*\),/\1/' diff --git a/tests/sh/solutions/my_answer.sh b/tests/sh/solutions/my_answer.sh new file mode 100755 index 00000000..4a0419ee --- /dev/null +++ b/tests/sh/solutions/my_answer.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +echo Dartey Henv diff --git a/tests/sh/solutions/myfamily.sh b/tests/sh/solutions/myfamily.sh new file mode 100755 index 00000000..b3c3255c --- /dev/null +++ b/tests/sh/solutions/myfamily.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +curl -s https://$DOMAIN/assets/superhero/all.json | jq ".[] | select( .id == $HERO_ID)" | grep relatives | cut -d'"' -f4 diff --git a/tests/sh/solutions/r b/tests/sh/solutions/r new file mode 100644 index 00000000..331bae08 --- /dev/null +++ b/tests/sh/solutions/r @@ -0,0 +1 @@ +R diff --git a/tests/sh/solutions/skip.sh b/tests/sh/solutions/skip.sh new file mode 100755 index 00000000..7898491f --- /dev/null +++ b/tests/sh/solutions/skip.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +ls -l | sed -n 'n;p' diff --git a/tests/sh/solutions/teacher.sh b/tests/sh/solutions/teacher.sh new file mode 100755 index 00000000..d5096173 --- /dev/null +++ b/tests/sh/solutions/teacher.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +PWD=$(pwd) + +for folder in $PWD +do + cd "$folder" || exit + INTERVIEWNUMBER=$(head -n 179 streets/Buckingham_Place | tail -n 1 | cut -d "#" -f2) + echo "$INTERVIEWNUMBER" + cat interviews/interview-"$INTERVIEWNUMBER" + grep -A 4 L337 vehicles | grep -A 3 -B 1 Honda | grep -A 2 -B 2 Blue | grep -B 4 "Height: 6" + cat memberships/AAA memberships/Delta_SkyMiles memberships/Museum_of_Bash_History memberships/Terminal_City_Library| grep "$MAIN_SUSPECT" | wc -l +done diff --git a/tests/sh/solutions/to-git-or-not-to-git.sh b/tests/sh/solutions/to-git-or-not-to-git.sh new file mode 100755 index 00000000..3c3be711 --- /dev/null +++ b/tests/sh/solutions/to-git-or-not-to-git.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +curl -s "https://$DOMAIN/api/graphql-engine/v1/graphql" --data '{"query":"{user(where:{githubLogin:{_eq:\"'$USERNAME'\"}}){id}}"}' | jq '.data.user[0].id' diff --git a/tests/sh/solutions/who-are-you.sh b/tests/sh/solutions/who-are-you.sh new file mode 100755 index 00000000..c6fba6f5 --- /dev/null +++ b/tests/sh/solutions/who-are-you.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Unofficial Bash Strict Mode +set -euo pipefail +IFS=' +' + +r=$(curl --compressed -sSm10 https://01.alem.school/assets/superhero/all.json) + +echo "$r" | jq '.[] | select(.id == 70) | .name' diff --git a/tests/sh/teacher/mystery1/interviews/interview-699607 b/tests/sh/teacher/mystery1/interviews/interview-699607 new file mode 100644 index 00000000..7b7539fa --- /dev/null +++ b/tests/sh/teacher/mystery1/interviews/interview-699607 @@ -0,0 +1,3 @@ +Interviewed Ms. Church at 2:04 pm. Witness stated that she did not see anyone she could identify as the shooter, that she ran away as soon as the shots were fired. + +However, she reports seeing the car that fled the scene. Describes it as a blue Honda, with a license plate that starts with "L337" and ends with "9" diff --git a/tests/sh/teacher/mystery1/memberships/AAA b/tests/sh/teacher/mystery1/memberships/AAA new file mode 100644 index 00000000..c13031a2 --- /dev/null +++ b/tests/sh/teacher/mystery1/memberships/AAA @@ -0,0 +1,1304 @@ +Courtney Yankey +Robert Mothersille +Akvile Saedeleer +Daniel Hayashi +Roel Garcia +Vladimir Khousrof +Maung Cammareri +Al Shaw +Meagen Spellerberg +Thais Mihalache +Habibollah Smith +Mirna Seck +Margaux Jung +Snjezana Hostetler +Hanna Shaito +Sergey Barachet +Amine Lin +Thierry Ortiz +Mirac Ariyoshi +Tina Imboden +Jayde Madarasz +Yu Sakaguchi +Kaori Donahue +Lesley Bithell +Celeste Lapi +Marie-Andree Dalby +Carlos Dyatchin +Fabiana Boussoughou +Laurence Zyabkina +Gideon Kowal +Yasser Pannecoucke +Kayla Kim +Felix Verbij +Jolanta Vives +Emanuele Hussein +Jens Lavrentyev +Andrea Reilly +James Rosic +Daria Palermo +Maria Arismendi +Kelly-Ann Sundberg +Caroline Denayer +Shuai Muttai +Wallace Mejri +Kevin Giovannoni +Tianyi Boughanmi +Chia England +Lina Tjoka +Hovhannes Piccinini +Andriy Hrachov +Maja Orban +Iaroslav Jakabos +Hakim Svennerstal +Hamza Tomecek +Shane Wu +Niki Grangeon +Hyok Martinez +Roderick Nagai +Filippos Sinkevich +Danilo Chabbey +Kami Shabanov +Muradjan Maeda +Reza Egelstaff +Annamaria Yi +Dmytro Arms +Michal Jakobsson +Christin Brown +Shaunae Stoney +Nicolas Carou +Mathieu Pigot +Lukasz Rodrigues +Wouter Brennauer +Hamid David +Lauren Johnson +Guido Kanerva +Tina Lim +Marcia Amri +Konstadinos Voronov +Shana Halsall +Nanne Maree +Katya Kindzerska +Haojie Fernandez +Wesley Meftah +Inaki Miller +Marianna Ford +Kay Kouassi +Simon Martinez +Antonia Gercsak +Ardo Mastyanina +Austra Sekyrova +Guilherme Latt +Andre Takatani +Grainne Ross +Edwige Henderson +Odile Green +Koji Miyama +Ka Ilyes +Sarolta Michelsen +Malek Tomicevic +Viktor Santos +Nikola Zhang +Raphaelle Batum +Bianca Coleman +Selim Tregaro +Azusa Perkins +Melissa Guell +Irina Treimanis +Viktor Bielecki +Artur Teltull +Giovani Alflaij +Katarzyna Talay +Gabor Hochstrasser +Zsuzsanna Hodge +Carole Pyatt +Bumyoung Soares +Yawei Fourie +Shara Green +Priscilla Chitu +Beth Andrade +Leah Driel +Juan Shankland +Timm Augustyn +Linda Lotfi +Erasmus Flood +Cecilia Clapcich +Gabrielle Tikhomirova +Tinne Campriani +Raul Makanza +Arianna Lauro +Nicholas Bithell +Tamir Fazekas +Traian Chen +Rebecca Janic +Anett Kamaruddin +Kyle Koala +Peter Zyabkina +Asumi Colo +Stephanie Comas +Andreas Sinia +David Yaroshchuk +Henk Lee +Alex Kim +Anton Dlamini +David Male +Tilak Costa +Salima Nakano +Jorge Wilhelm +Urska Fijalek +George Gogoladze +Luis Petkovic +Almensh Zbogar +Inaki Milanovic-Litre +Carlos Mellouli +Natalia Benedetti +Jacques Ramonene +Jonathan Munoz +Laura Helgesson +Miryam Dunnes +Aries Coston +Anthony Kudlicka +Shinta Gong +Ivana Grubisic +Judith Williams +Lauren Subotic +Kevin Okori +Attila Sullivan +Ivo Bagdonas +Klaas Wykes +Jack Shafar +Fanny Castillo +Jamale Fu +Jongeun Kabush +Vincent Krsmanovic +Thomas Grubbstrom +Kobe Driebergen +Annabel Church +Hajung Cardona +Endene Samsonov +Aretha Hatton +Leandro Schuetze +Daniel Loyden +Rene Marques +Hassan Nichols +Ronja Marroquin +Glenn Liivamagi +Mohamed Silva +Rushlee Krsmanovic +Viktor Rangelova +Mebrahtom Fields +Darya Wu +Martin Mozgalova +Deron Estanguet +Olga Lobuzov +Niklas Donckers +Constantina Nagel +Kristina Walton +Joe Germuska +Adelinde Mangold +Benjamin Kempas +Andela Meauri +Levan Ingram +Marcin Dyen +Bilel Lazuka +Aleksandr Holliday +Kylie Ignaczak +Mohammed Sakamoto +Cian Purnell +Hope Cseh +William Polavder +Alberto Vidal +Martin Strebel +Brittany Askarov +Haakan Okrame +Sutiya Kida +Sibusiso Yudin +Stephanie Adlington +Gilles Zhang +Ivan Edelman +Rattikan Prapakamol +Yassine Bazzoni +Vaclav Mustapa +Konstadinos Houghton +Jan Gramkov +Sabrina Burns +Andreas Okruashvili +Tyler Borisenko +Nicholas Kudryashov +Lieuwe Lim +Luis Grand +Lynsey Bailey +Ling Langridge +Marc Ivezic +Scott Klein +Yumeka Cipressi +Jong Borysik +Lucia Price +Jangy Scott-Arruda +Monika Heidler +Gia Yoon +Rebecca Simon +Gabor Palies +Patricia Zhang +Sebastian Bayramov +Jarrod Kovalenko +Thuraia Voytekhovich +Par Awad +Sanah Ye +Alana Thiam +Apostolos Sharp +Anfisa Whalan +James Seferovic +Lyubov Gunnewijk +Sergey Abalo +Nick Osagie +El Rooney +Kevin Jeptoo +Natallia Sidi +Ekaterina Hernandez +Hui Ahmed +Louis Zhou +Agnieszka Iersel +Ling Kromowidjojo +Corine Kashirina +Joanna Ayvazyan +Lisa Peralta +Yige Rhodes +Ferenc Aydarski +Zac Ashwood +Paul Tsakmakis +Peter Wagner +Kamilla Rietz +Tina Ortiz +Christopher Philippe +Marcus O'leary +Fantu Nikcevic +Aldo Nicolas +Raissa Araya +Melaine Souleymane +Alexandr Liu +Luigi Marshall +Jehue Wild +Lyudmyla Dilmukhamedov +Francisca Mocsai +Cory Munoz +Ancuta Emmons +Xiaoxu Cardoso +Lucy Miller +Alex Nichols +Irene Russell +James Siuzeva +Aleks Eisel +Keith Pavoni +Jayme Suarez +Anna Hosking +Viktor McLaughlin +Ainhoa Taylor +Jaime Zhang +Thomas Antonov +Crispin Terraza +Omar Atkinson +Yulia Hostetler +Viorica Schwarzkopf +Mostafa Kleen +Debbie Mohamed +Coolboy Tian +Marin Absalon +Marjo Janusaitis +Luc Reyes +Marouan Ilyes +Jorge Lambert +Gilberto Bergdich +Christopher Gkolomeev +Pascal Davaasukh +Jennifer Medwood +Yadira Marghiev +Inaki Murphy +Sonata Raif +Joshua Capkova +Iuliana Costa +Bruno Szarenski +Natalia Kim +Lubov Begaj +Maria Steiner +Jakub Gondos +Richard Cremer +Kanako Zhang +Bashir Krovyakov +Shuo Emmanuel +Bianca Sekyrova +Iker Franek +Lucy Perez +Casey Hardy +Tian Abdvali +Daniel Verdasco +Mikhail Polaczyk +Dartey Henv +Richard Timofeeva +Dilshod Allen +Aleksandar Atafi +Yifang Narcisse +Sonja Ide +Miranda Mulligan +Craig Jaramillo +Joyce Broersen +Jun Zhudina +Marcus Lahbabi +Michael Hammarstrom +Yage Bruno +Emma Celustka +Takamasa Kasa +Danila Henao +Ayouba Carrington +Roc Bari +Hyok Maciulis +Nathan Zhang +Nazmi Patrikeev +Conrad Ji +Diego Smith +Beatriz Nooijer +Chia Bleasdale +Carine Karakus +Rene Chen +Damir Hendershot +Rahman Carboncini +Hakim Nyantai +Carla Anderson +Tatyana Mitrovic +Viktor Michshuk +Jennifer Athanasiadis +Benjamin Bilici +Xavier Hayashi +Renal Boskovic +Krista Dai +Martina Voronov +Zara Jung +Lauryn Bae +Mechiel Maric +Mahmoud Hession +Rafal Sidorov +Claudia Platnitski +Dorothy Abdvali +Marcin Cele +Todor Hernandez +Dirkie Yun +Tina Teutenberg +Marko Baltacha +Christopher Shubenkov +Hannah Barker +Sarah Zaidi +Keri-anne Kauter +Sajjad Ulrich +Joseph Lin +Mario Boninfante +Gonzalo Mirzoyan +Nikolina Khuraskina +Rand Fanchette +Aoife Pyrek +Fateh Kovalev +Xiangrong Palmer +Adrienne Buntic +Novak Solja +Luciano Ahmad +Ravil Mokoena +Gulsah Makarova +Jemma Mayr +Nazario Barrondo +Ryunosuke Hagan +Paul Khadjibekov +Tarik Atangana +Ellen Liivamagi +Michael Hultzer +Maksim Chibosso +Kristina Munro +George Matsuda +Fabio Truppa +Rosie Rapcewicz +Joan Fudge +Irina-Camelia Wilson +Nathalie Ionescu +Rhys Faber +Dobrivoje Mogawane +Ferenc Savsek +Mercy Brusquetti +Ayman Kaliberda +Francisco Irvine +Nadiezda Catlin +Kevin Zavala +Jelena Febrianti +Huajun Kerber +Jong Stoney +David Rossi +Zied Rumjancevs +Szabolcs Culley +Lisbeth Savani +Yu Chinnawong +Marvin Peltier +Atthaphon Starovic +Antoinette Silva +Jose Paldanius +Glenn Gonzalez +Artem Sanchez +Thomas Doder +Sarra Bainbridge +Paola Tai +Carolina Wang +Siham SCHIMAK +Inna Yu +David Schuh +Jade Kopac +Tyler Marennikova +Byungchul Lee +Edino Fuchs +Erica Nakagawa +Caroline Warlow +Yasemin Cavela +Fernanda Purchase +Christos Jo +Rebecca Gao +Petr Waterfield +Ana Reilly +Olga Jones +Shuang Cabrera +Stefan Li +Todd Kalmer +Rubie Sukhorukov +Larry Lapin +Ariane Nazarova +Christophe Tanii +Christina Petukhov +Mojtaba Polyakov +Petr Schiavone +Teresa Jing +Charline Chen +Xin Cuddihy +Anne-Sophie Gustavsson +Aymen Bespalova +Silvia Konukh +Kenny Faminou +Mervyn O'malley +Irada Velthooven +Sheng Romdhane +Olena Krsmanovic +Suzanne Viguier +Aleksandr Rutherford +Jane Paonessa +Nur Beisel +Katerina Riccobelli +Errol Benes +Clemens Mulabegovic +Gundegmaa El-Sheryf +Minxia Yu +Boniface Kanis +Gonzalo Pacheco +Brady Ruciak +Sverre Dawkins +Soufiane Odumosu +Liam Maley +Michal Bazlen +Clara Jeong +Mathew Phillips +Ihar Radwanska +Marquise Mohaupt +Lorena Marenic +Timo Caglar +Katie Park +Davit Asano +Rosie Fredricson +Sofya Mortelette +Ibrahima Louw +Peter Ochoa +Veronika Erichsen +Lauren Janistyn +Seoyeong Montoya +Radoslaw Sze +Alexis Diaz +Marina Ma +Francesca Rowbotham +James Yallop +Roberta Callahan +Valerie Penezic +Duhaeng Agren +Zurabi Lunkuse +Kristina Sireau +Limei Ioannou +Zicheng Bardis +Jennifer Marco +Sergej Yli-Kiikka +Marisa Rocamontes +Shuai Sudarava +Ryan Pota +Milos Pavoni +Elizabeth Cheon +Jan Merzougui +Anderson Guo +Athina Kula +Tavevele Kelly +Slobodan White +Zara Luvsanlundeg +Jinhui Brens +Didier Munoz +Katerin Pliev +William Vicaut +Ahmed Elkawiseh +Alexandru Govers +Meiyu Iljustsenko +Gal Pascual +Mona Colupaev +Maria Drais +Chana Borges-Mendelblatt +Krista Coci +Matteo Nieminen +Nicholas Howden +Helen Cheywa +Kasper You +Taoufik Geziry +Aleksei Rouwendaal +Stefan Noonan +Juan Kim +Werner Totrov +Michael Gigli +Heiki Outteridge +Petr Vicaut +Jade Jallouz +Rares Hsing +Agnese Bartakova +Ryosuke Ciglar +Ewelina Safronov +Yuliya Gomes +Michael Sjostrand +Yuderqui Mrak +Niki Batkovic +Kristina Hochstrasser +Timothy Francisca +Joao Ziadi +Iain Kossayev +Andres Liu +Lauryn Fujio +Murilo Rohart +Jarmila Hallgrimsson +Stefanie Thi +Adonis Kitchens +John Keefe +Alberto Bauza +Sultan Wilson +Tomasz Lanzone +Kamila Sakari +Darae Elsayed +Joseph Last +Carole Adams +Lina SCHIMAK +Alistair McGeorge +Madonna Kim +Jaele Sharp +El Toth +Sarra Larsen +Elea Li +Junjing Kang +Jaime Bruno +Carlos Hall +Kurt Tran-Swensen +Anabel Dominguez +George Fuente +Ibrahim Seoud +Line Emanuel +Christian Brata +Kanae Uriarte +Artur Munkhbaatar +Pawel Jensen +Hui Akutsu +Jemma Wang +Kate Bourihane +Nikolaus Milatz +Irina Song +Raul Baumrtova +Endri Clijsters +Jitka Tranter +Radhouane Klamer +Zamandosi Chuang +Lina Hassine +Gabrielle Raudaschl +Ingrid Papachristos +Vincent Lawrence +Robert Choi +Mizuho Suetsuna +Hang Slimane +Omar Hurst +Eva-Maria Speirs +Alena Davis +Zhe Hochstrasser +Katrien Na +Pavlo Stewart +Adrienne Kreanga +Paul Kitamoto +Josefin Lamdassem +Brendan Mendy +Grigor Suuto +Teresa Kim +Jiao Faulds +Iosif Wang +Charlotte Kachalova +Sally Fuamatu +Johan Arvaniti +Sarah Dovgun +Tapio Gorman +Mhairi French +Tamas Guo +Olha Lewis-Smallwood +Dmitriy Montano +Rodrigo Burke +Peng Kim +Chia-Ying Djokovic +Rodrigo Santos +Mai Csernoviczki +Asier Filonyuk +Ali Jallouz +Zamandosi Flood +Jianbo Janikowski +Ka Caulker +Kristian Surgeloose +Matias Tait +Mariela Mortelette +Marian Jager +Deni Yao +Neil Kopp +Paulo Seric +Britany Charlos +Andrea Lammers +Joel Giordano +Sebastian Makela-Nummela +Yayoi Buckman +Wei Hazard +Tarek Luis +David Al-Athba +Josefin Ifadidou +Rui Loukas +Katarzyna Gelana +Marina Murphy +Sanne Kuo +Timothy Goffin +Lucy Nakaya +Krystian Pen +Rebecca Ruta +Katherine Luca +Sabrina Abily +Aida Ganiel +Desiree Inglis +Ahmed Magdanis +Manuel Silva +Arlene Navarro +Mhairi Sommer +Toni Shevchenko +Rosie Aydemir +Hannah Lozano +Miguel Skujyte +Amine Najar +Anna Scozzoli +Neymar Kaczor +Raul Hoshina +Yifang Jang +Ivan Christou +Greggmar Benassi +Thomas Song +Hicham Hendershot +Melanie Disney-May +Automne Moline +Elena Belyakova +Travis Hammadi +Luis Booth +Miljan Henderson +Ana Dukic +Aldo Cerkovskis +Britany Oatley +Kay Rosa +Anthony Dahlgren +Alexa Loch +Neisha Liang +Brent Queen +Kerron Lee +Ganna Zonta +Mary Tomashova +Betkili Betts +Volha Mahfizur +Edith Sofyan +Kyung Kaifuchi +Eduarda Bartonova +David Lashin +Yanmei Matkowski +Vera Sene +Xuanxu Barnard +Ursula Ward +Lizeth Coertzen +Ahmed Chammartin +Peter Jang +Peter Sloma +Silviya Elaisa +Larisa Nagy +Lina Al-Jumaili +Mihnea Hamcho +Emma Chadid +Toea Robert-Michon +Charlotte Ranfagni +Elia Gittens +Younghui Karasek +Ligia Czakova +Marcel Sigurdsson +Aleksandar Sandell +Radoslav Susanu +Sarah Viudez +Bjorn Couch +Asafa Robles +Hendrik Tetyukhin +Ondrej Houssaye +Ayman Suursild +Georgina Manojlovic +Bruno Kiryienka +Kate Pink +Joel Tverdohlib +Shiho Berkel +Maryna Desprat +Chelsea Thiele +Slobodan Meliakh +Steven Solomon +Xavier Cox +Bin Iersel +Ferdinand Clair +Alexandra Solja +Julien Chen +Fabienne Bouw +Robert Skrzypulec +Mouni Malaquias +Lok Al-Athba +Laura Wu +Amy Kim +Kum Musil +Arnaud Gonzalez +Marvin Rice +Mateusz Metu +Destinee Kucana +Inmara Castro +Natasha Birgmark +Ryan Porter +Sviatlana Yin +Primoz Aubameyang +Jamie Kim +Tate Zucchetti +Hotaru Terceira +Boniface Eichfeld +Yugo Sesum +Ana Pavia +Yue Zargari +Casey Cullen +Selim Karagoz +Dominique Hall +Yumeka Guo +Luciano Telde +Gavin Sobhi +Jose Pedersen +Vladimer Sorokina +Paula Zhudina +Karen Avermaet +Yuderqui Sahutoglu +Silvana Erickson +Rodrigo Surgeloose +Henri Navruzov +Manuela Syllabova +Jinyan Bernard-Thomas +Flor Jonas +Angelica Lopez +Allison Musinschi +Saori Kienhuis +Elena Falgowski +Shannon Lapeyre +Nan Gionis +Marcelinho Pendrel +Milena Wojnarowicz +Nathan Freixa +Honami Kozhenkova +Andja Gabriele +Becky Wozniak +Ye Fitzgerald +Caroline Kirdyapkina +James Padilla +Woroud Baroukh +Sebastian Gamera-Shmyrko +Kozue Martinez +Erick Fedoriva +Vladimir King +Kazuki Leroy +Jennifer Kim +Annie Ali +Zargo Dehesa +Andisiwe Graham +Myung Kim +Claudia Butkevych +Alejandro Collins +Nadzeya Allegrini +Christinna Hudnut +Tim Phillips +Dorian Sauer +Claire Murphy +Hector Moutoussamy +Nuno Rajabi +Olesya Silnov +Maartje Fabian +Rizlen Errigo +Mel Quinonez +Magdalena Siladi +Peter Gonzalez +Susan Bluman +Olga Schofield +Wesley Truppa +Maja Balykina +Jeremiah Dean +Alvaro Tanatarov +Yihua Grunsven +Isiah Lacuna +Carlos Yakimenko +Zakia Zhurauliou +Ashley Saramotins +Tim Bernado +Jean Andrunache +Ian Rhodes +Micah Smith +Jing Aponte +Da-Woon Morkov +Silviya Saholinirina +Ser-Od He +Aman Schulte +Urs Kim +Christian Godin +Robert Dent +Jiaduo Calzada +Jesus Barrett +Sidni Sze +Massimo Groot +Georgios Kostiw +Roxana Edoa +Mariaesthela O'connor +Kate Scheuber +Viktoriia Mathlouthi +Nam Baga +Mattia Sanchez +Clara Fuentes +Kasper Addy +Kyung Steffensen +Veronika Wruck +Lukasz Kovacs +Dominic Seppala +Pierre-Alexis Valiyev +Francis Thiele +Hichem Schwarz +Nelly Rumjancevs +Kateryna Mitrea +Richard Kaniskina +Andy Maier +Victor Kondo +Eusebio Wallace +Mariana Selimau +Marlene Cabrera +Ebrahim Baggaley +Denis Gonzalez +Blair Stratton +Concepcion Vasilevskis +Alvaro Viljoen +Marco Dries +Joseph Nielsen +Zi McColgan +Alejandra Ndong +Silke Nam +Robbert Kanerva +Pui Na +Kelly Kulish +Kathleen Jo +Andile Li +Georgios Antal +Iryna Radovic +Amel Kim +Fabiana Hortness +Jessica Ochoa +Princesa Firdasari +Natalia Manaudou +Nikita Kirdyapkina +Xiayan Harden +Jordan Voglsang +Tatyana Wang +Michael Sinia +Katya Baddeley +Ondrej Kitchens +Simas Takahashi +Midori Seraphin +Wassim Matsumoto +Ai REICHSTAEDTER +Guojie Timofeyeva +Danielys Butler +Zohar Iwashimizu +Simone Abrantes +Viktorya Schmidt +Thi Kostadinov +Norman Weltz +Leith Clear +Marleen Rodrigues +Arnaud Feck +Cristian Ghasemi +Desiree Kavcic +Birhan Ryan +Xueying Hillmann +Attila Tafatatha +Myung McCafferty +Daniele Babaryka +Natalia Gatlin +Lucie Yang +Boglarka Vacenovska +Natalia Child +Pavel Lambarki +Anthony Mizutani +Albert Barthel +Paula Darzi +Iain Hartig +Nahomi Jobodwana +Ubaldina Ziegler +Jo-Ting Losev +Lina Kubiak +Valentyna Townsend +Dauren Smulders +Sangjin Hindes +Nourhan Benfeito +Ioannis Martinez +Lidiia Ng +Sara Campbell +Andrija Peker +Julian Mehmedi +Christine Heglund +Eric Silva +Lyndsie Dudas +Lucy Maguire +Lucia Berens +Annemiek Arikan +Benjamin Kuramagomedov +Irene Kreisinger +Greta Apolonia +Tassia Grotowski +Lauryn Powrie +Wilson Sauvage +Doris Wilke +Olga Nguyen +Maria Smith +Dmytro Golding +Anna Tomic +Jeneba Lee +Wai Schoeman +Laura Neben +Nguse Byrne +Yakhouba Garcia +Silvia Nakamoto +Wenjun Taimsoo +Oriol Gonci +James Pohrebnyak +Matt Waite +Dante Ma +Evgeni McDonald +Byunghee Filipe +Katerine Podlesnyy +Rasul Tichelt +Gabriella Sarup +Colin Nakayama +Ines Kovtunovskaia +Caitlin Carli +Camille Andersen +Noraseela Podrazil +Stanislav Cherobon-Bawcom +Chia Hilario +Bohdan Kostelecky +Seen Flores +Anastasiya Rupp +Keri-anne KORSIZ +Timothy Li +Petar Bauwens +Robert Gan +Chuyoung Sokolowska +Naomi Gattsiev +Monika Hwang +Paula Pamg +Alexey Gille +Eva Hirata +Michael Vasco +Jordan Panizzon +Ana Tursunov +Victoria Abarhoun +Kristina Cerutti +Jake Claver +Afgan Mrvaljevic +Petar Dominguez +Yumi Buerge +Ning Chen +Elena Coster +Nick Schodowski +Andre Romeu +Taehee Bondaruk +Aksana Baniotis +Simone Morin +Diego Dahlkvist +Katerina Saenz +Serhiy Robinson +Rachel Jelcic +Emma Wei +Carrie Spellerberg +William Bindrich +Sarah Guzzetti +Mohamed Koo +David Jeong +Mikaela Iwao +Ingrid Fogarty +Jean-Christophe Kirkham +Mana Konyot +Krisztian Ida +Sinta Denisov +Zakari Isakov +Travis Ponsana +Carles Solesbury +Nestor Seric +Mindaugas Saleh +Daniele Nurmukhambetova +Luol Mooren +Aylin Maurer +Hans Haldane +Liangliang Miller +Olivier Zhang +Ahmed Korzeniowski +Telma Andrunache +Nicolas Dotto +Georgie Santos +Bruno Oliver +Ahmed Kurthy +Daniela O'malley +Nils Guzzetti +Akeem Ngake +Meredith Yu +Burcu Bacsi +Georgina Zuniga +Glenn Defar +Natalia Akwu +Maialen Uriarte +Dragos Stone +Ali Milthaler +Robin Vesely +Elodie Arcioni +Sandrine Yumira +Giulia Schwanitz +Nataliya Nielsen +Tervel Pilipenko +Gauthier Alimzhanov +Ivan Caballero +Ruoqi Nowak +Kristian Yamaleu +Radhouane Cawthorn +David Moutton +Hellen Maher +Jamila Rodhe +Faith Kim +DeeDee Montoya +Elena Quinonez +Stephanie Piasecki +Julieta Pars +Andrea Desta +Tina Susanu +Johana Carman +Rand Gilot +Joyce Kuehner +Duane Skvortsov +Marianne Li +Khalil Shi +Phuttharaksa Signate +Flor Magnini +Dylan Espinosa +Viktor Lamdassem +Barry Utanga +Jonas Vlcek +Tugce Vozakova +Darrel Yamane +Joao Brecciaroli +Laura Dundar +Karsten Thompson +Anzor Gu +Sehryne Akrout +Marcel Gustafsson +Svetlana Dieke +Donald Guderzo +Hao Fukumoto +Sylwia Kiss +Zhiwen Piron +Sabina Williams +Daniela Gavnholt +Nguyen Ozolina-Kovala +Kumi Lewis-Francis +Fatih Eisel +Vasyl Geijer +Hung Mutlu +Piotr Rabente +Lara Siegelaar +Marcus Khalid +Jose Uhl +Sebastian Drame +Niki Klimesova +Ioannis Mockenhaupt +Aleksei Wang +Mannad Khitraya +Nicola Belikova +Elisabeth Santos +Ahmed Saladuha +Lucy White +Anabel Kal +Volha Otsuka +Kwan Otsuka +Thiago Bruno +Geoffrey Plotyczer +Dora Veljkovic +Miki Zhang +Phelan Poulsen +Mie Hall +Pietro Walker +Schillonie Benaissa +Maximiliano Matsumoto +Ryan Prasad +Kristy Zhu +Andrei Masna +Holder Lamont +Susana Neymour +Kari Halsted +Eric Sawa +Mohamed Thomas +Brad Ogimi +Jianbo Megannem +Laetitia Manuel +Fineza Primorac +Milena Vogel +Mark Turner +Andrew Negrean +Hiroshi Schuring +Brice Agliotti +Yukiko Nicolai +Adam Zaripova +Johannes Berna +Eloise Balooshi +Teodor Wilson +Yasmin Soliman +Aniko Ahmed +Dieter Schooling +Gulcan Burling +Grant Watkins +Ross Nakamura +Asgeir Dzerkal +Tina Ipsen +Alex Hosnyanszky +Sebastian Lelas +Ho Thunebro +Micheen Zhang +Nina Sornoza +Rachel Burrows +Jessica Unger +Tamara Cafaro +Kaylyn Chavanel +Braian Osayomi +Yasmin Brathwaite +Christina Maneephan +Natalie Barbosa +Kimberley Obiang +Daniel Blazhevski +Emma Alphen +Christian Zambrano +Mate Montano +Sergio Ivankovic +Shijia Conway +Dong-Young Kim +Laura Boyce +Mayara Trinquier +Simon Alphen +Aaron Santos +Gulnara Deeva +Jo-Wilfried Schornberg +Jie Gebremariam +Shota Michta +Tim Mankoc +Jane Trotter +Line Naylor +Suzanne Silva +Astrida Roche +Roderick Huang +Iveta Blagojevic +Azneem Sharapova +Silvia Chaika +Ioulietta Assefa +Nadia Jung +Lucie Kryvitski +Westley Tatalashvili +Geraint Traore +Mikhail Vlcek +Matthieu Wang +Florian Filova +Kelsey Grumier +Dan Sinker +Donglun Borlee +Sophie Ahmadov +James Hsiao +Brian Boyer +Maoxing Bedik +Theodora Conway +Pavel Lepron +Femke Gelana +Seyha Balogh +Dalibor Vidal +Anna Menkov +Ava Rusakova +Mike Bostock +Nicholas Mitchell +Giorgia Borisenko +Zouhair Ri +Audrey Pulgar +Reine Huertas +Hyelim Villaplana +Alicja Kamionobe +Francois Spanovic +Michel Sano +Zhuldyz Hoxha +Nicolas Aranguiz +Augustin Lozano +Andreas Paonessa +Hongxia Tan +Angelo Uhl +Will Mehmedovic +Javier Volosova +Natsumi Pohlak +Henna Causeur +Komeil Menchov +Layne Smith +Lisa Wang +Olesya Nielsen +Cristiane Forciniti +Cedric Subotic +Barbora Parellis +Danijel Carriqueo +Hanna Gynther +Adam Houssaye +Erasmus Perez +Chien-Ying Fraser-Holmes +Tina Boidin +Sadio Chouiref +Juan Tourn +Sebastian Sorribes +Yimeng Amaris +Stephanie Kieng +Kelsey Bludova +Chantae Matuhin +Abdullah Jiao +Job Kretschmer +Fabio Figes +Nils Pascual +Uvis Fuchs +Alexander Herrera +Mona Taibi +Seiya Railey +Radoslaw Robles +Kathleen Schmidt +Dani Loukas +Kaspar Brown diff --git a/tests/sh/teacher/mystery1/memberships/Delta_SkyMiles b/tests/sh/teacher/mystery1/memberships/Delta_SkyMiles new file mode 100644 index 00000000..e78ad5bb --- /dev/null +++ b/tests/sh/teacher/mystery1/memberships/Delta_SkyMiles @@ -0,0 +1,1287 @@ +Ana Williams +Alejandro Abdi +Ana Dukic +Heather Billings +Lucia Maksimovic +Ioannis Mcmenemy +Konstadinos Justus +Yasunari Inzikuru +Xiang Diaz +Lissa Drmic +Ahmed Weir +Geir Brash +Joanna Dlamini +Guojie Timofeyeva +Stuart Gaitan +Samira Marcilloux +Victoria Homklin +Tate Zucchetti +Daniele Kobrich +Toea Liptak +Louisa Tomas +Sarolta Bakare +Roland Deak-Bardos +Princesa Firdasari +Grace Williams +Gabor Almeida +Joshua Fenclova +Guzel Castillo +Goran Driouch +Joao Brecciaroli +Edino Fuchs +Julia Dovgodko +Tatyana Wang +Witthaya Cragg +Alex Hosnyanszky +Danijel Paderina +Daniel Verdasco +Lucy Nakaya +Oliver Mokoka +Yu Sakaguchi +Aldo Nicolas +Soslan Fernandez +Malek Greeff +Sayed Savitskaya +Vitaliy Robson +Emanuele Oulmou +Jolanta Walker +Marton Coetzee +Kemal Dinda +Igor Cemberci +Brady Mendonca +Gabor Palies +Robert Marennikova +Laure Shanks +Ji Stewart +Harry Velikaya +Christa Kvitova +Westley Febrianti +Guillaume Colle +Stephanie Kieng +Jan Peilbet +Tianyi Boughanmi +Betkili Betts +Alex Adigun +Fateh Kovalev +Jeff Larson +Travis Ponsana +Samira Grubisic +Jason Vargas +Joshua Ovono +Vladislava Tichelt +James Chetcuti +Oribe Bidaoui +Michael Tayama +Nicola Hosking +Hannah Rigaudo +Jaleleddine Achola +Irina Treimanis +Jade Kopac +Andreas Okruashvili +Jaime Shevchenko +Kelly Olivier +Mohamed Thomas +Monia Pavon +Sophie Graff +Hui Akutsu +Abdihakem Li +Christian Bidaoui +Alexa Loch +Carsten Puotiniemi +Abiodun Rogers +Fabiana Parsons +Michelle Gueye +Diletta Tindall +Endene Samsonov +Antonija Dilmukhamedov +Georgina Manojlovic +Wanner Teshale +Alex Zhang +Anastasia Biannic +Ken Roland +Lorena Bosetti +Pops Terlecki +Sandrine Lapeyre +David Shvedova +Lionel Shabanov +Arkady Pryiemka +Gulsah Makarova +Grainne Ross +Zouhair Ri +Aretha Marino +Gilles Zhang +Emmeline Vasilionak +Murat Quintino +Michel Sano +Denes Venier +Myong Kozlov +Fiona Granollers +Nathan Nishikori +Olivia Gascon +Olena Turei +Mattia Saramotins +Adrienn Paratova +Bruna Gall +Ondrej Fang +Georgina Issanova +Khadzhimurat Wilkinson +Anna Menkov +Iain Hartig +Mohamed Steele +Yulia Hostetler +Matteo Gordeeva +Ricardo Kim +Gianluca Zhang +Dominique Hall +Esmat Nicholson +Teklemariam Fabre +Lidia Glover +Vladimir Benedetti +Amy Mizzau +Afgan Mrvaljevic +Sergey Medhin +Emmanuel Barbieri +Antony Williams +Jesus Barrett +Georgi Dent +Svetlana Wang +Nikolaus Milatz +Vera Scarantino +Lalita Wang +Ho Thunebro +Risa Synoradzka +Rizlen Mrisho +Herve Kasa +Alexander Mccabe +James Wilson +Annie Ali +Siraba Davenport +Katarzyna Talay +Bruno Kiryienka +Grzegorz Tipsarevic +Aleks Eisel +Aleks Pirghie +Constantina Nagel +Urska Fijalek +Marcelinho Hrachov +Ai Portela +Lisa Ledecky +Andre Qin +Dae-Nam Dunkley-Smith +Anna Rosario +Ara Hashim +Thomas Doder +Bianca Coleman +Hamid David +Hiroki Klokov +Hyobi Magnini +Jarred Selimau +Ratanakmony Baniotis +Carla Anderson +Azad Honeybone +Tim Lehtinen +Pavel Lambarki +Michael Stublic +Debora Moguenara +Ubaldina Ziegler +Tyler Payet +Emma Wei +Ashley Scott +Jennifer Yu +James Brooks +Viktorya Schmidt +Maria Smid +Marius Davies +Volha Otsuka +Tamara Cafaro +Aselefech Gkountoulas +Yunwen Crous +Nicola Kovalev +Haley Pishchalnikov +Daniele Babaryka +Timothy Francisca +Tatjana Henriquez +Kacper Napo +Andrei Yazdani +Viktor McLaughlin +Fantu Nikcevic +Jirina Hojka +Roberto Miller +Gonzalo Gough +Xiaoxia Yamagata +Dora Veljkovic +Anna Prucksakorn +Denis Machado +Marco Sagmeister +Iuliia Barseghyan +Maria Drais +Anaso Booth +Jonathan Glanc +Lok Al-Athba +Johnno Listopadova +Ilya Marcano +Radu Colley +Javier Branza +Anja Cojuhari +Taoufik Geziry +Tyler Belmadani +Kevin Dawidowicz +Jens Lavrentyev +Ned Vieyra +Krisztian Ida +Keon Mcculloch +Nikolaus Svendsen +Eva Mocsai +Sonata Raif +Lok Poglajen +Niklas Capelli +Sarah Kim +Kelley Nurmagomedov +Miroslava Isakov +Tina Ipsen +Miranda Mulligan +Megan Abdalla +Charlotte Taylor +Micah Smith +Sergio Calzada +Tarjei Clary +Rosie Rapcewicz +Andres Shi +Nicholas Rosa +Marco Stanley +Luuka Zhang +Anton Gu +Kristina Sokhiev +Julien Chen +Daouda Martelli +Ziwei Braas +Tiff Fehr +Marc Ivezic +Anna Beaubrun +Larry Lapin +Ariane Nazarova +Sung Dyadchuk +Chris Keller +Onan Kim +Nam Baga +Yoshimi Szucs +Dragos Stone +Roline Camilo +Zach Esposito +Dathan Ziadi +Elena Falgowski +Sergii Tellechea +Kanae Bracciali +Andrey Si +Tomasz Jang +Elena Costa +Nurul Amanova +Panagiotis Watanabe +Caster Gong +Jehue Wild +Hans Haldane +Muhamad Idowu +Euan Gunnarsson +Germain Detti +Alexandra Sanchez +Sandeep Karayel +Ravil Ismail +Vignir Charter +Oliver Parti +Ahmed Elkawiseh +Reika Elgammal +Ryoko Goubel +Mihnea Hamcho +Todd Istomin +Ioulietta Assefa +Fredy Ezzine +Guzel Kahlefeldt +Jazmin Lee +Thomas Shen +Jonathan Endrekson +Deron Estanguet +Nenad Blerk +Xing Djerisilo +Nelson Accambray +Sidni Sze +Sven Contreras +Timea Nus +Hongyan Collins +Mindaugas Saleh +Sarah Lokluoglu +Daniele Carrascosa +Carole Pyatt +Diego Udovicic +Lankantien Kristensen +Amanda Svensson +Viktoriia Madico +Yumi Gray +Hye Wallace +Anderson Schenk +Winston Li +Shea Zhang +Mateusz Mendoza +Russell Fukuhara +Marios Lima +Akeem Ngake +Fabiana Hortness +Hreidar Godelli +Danijel Grandal +Francisca Mocsai +Akzhurek Whitty +Abdullah Jiao +Katherine Luca +Serhiy Bisharat +Zakia Zhurauliou +Hun-Min Soroka +Jan-Di Resch +Takamasa Kasa +Davit Asano +Michelle-Lee Abril +Eric Rolin +Ganna Zonta +Olesya Silnov +Luke Mamedova +Danilo Chabbey +Ilona Harrison +Ivan Edelman +Evagelos Felix +Ediz Gorlero +Valerie Battisti +Hyelim Villaplana +Robert Gan +Sophie Aliyev +Aina Gavrilovich +Jose Overall +Sonja Ide +Doris Wilke +Eric Gogaev +Marouen Tatari +Carole Adams +Suhrob Jacob +Kris White +Aoife Pyrek +Andrei Masna +Sandra Engelhardt +Darya Okruashvili +Nicole Kovalev +Velichko Connor +Angelo Uhl +Jiaduo Calzada +Natthanan Caluag +Mie Callahan +Ifeoma Lahbabi +Jan Ryakhov +Kyung Steffensen +Mykyta Euren +Lisa Atlason +Dave Scott +Mamorallo Holzer +Georgina Oldershaw +Carolina Macias +Won Davison +Jun Szczepanski +Oleh Chinnawong +Carlos Dyatchin +Kyle Chamberlain +Maria Choi +Olha Lewis-Smallwood +Dana Hassnaoui +Salima Nakano +Mojtaba Polyakov +Wade Dimitrov +Melissa Glynn +Rosario Rulon +Marie Vourna +Amy Schipper +Nyam-Ochir Yauhleuskaya +Romulo Simanovich +Tontowi Benedetti +Mclain Rakoczy +Alyssa Fouhy +Amy Prevot +Grzegorz Kohistani +Jukka Barros +Maria Arismendi +Steven Kostelecky +Shannon Lapeyre +Joel Kammerichs +Tarek Takahira +Meghan Sato +Alexander Hansen +Bogdan Beaubrun +Olga Castano +Maksim Loza +Jihye Gregorius +Xiaoxiang Lan +Jeroen Zhurauliou +Joseph Bartley +Andrew Meliz +Pierre-Alexis Valiyev +Alexander Vandermeiren +Nuria Saenko +Evelin Niyazbekov +Natalya Prorok +Ying Marinova +Njisane Saleh +Elania Rodionova +Giorgia Kleinert +Olga Richards +Joao Dovgodko +Shane Choi +Yanfei Nono +Rhett Donato +Johan Arvaniti +Desiree Inglis +Marcelinho Pendrel +Jessica Garderen +Tarik Atangana +Lucy Burmistrova +Saulius Sinnig +Alexey Estes +Pedro Kim +Hursit Gestel +Patrick Whalen +Tom Ptak +Donglun Rohner +Daniel Kouassi +Manabu Medvedev +Amel Kim +Erik Plouffe +Lalonde Koski +Michael Sinia +Lei Estrada +Ayele Bleibach +Igor Turner +Nigel Hejmej +Aleksandr Inthavong +Ryan Ovtcharov +Micah Pigot +Christopher Stafford +Rodrigo Burke +Dorde Pereira +Marina Murphy +Sara Friis +Kristi Melo +Lucy Miller +Artur Darien +Stany Spellerberg +Cornel Ding +Sergiu Merrien +Ferenc Aydarski +Neil Kopp +Timothy Goffin +Dmytro Golding +Victoria Monteiro +Luis Li +Sarah Dovgun +Giovanni Kovacevic +Selim Karagoz +Stephanie Sofyan +Bernard Yip +Haojie Fernandez +Weiyi Kirpulyanskyy +Irina Tukiet +Arnaldo Shulika +Meiyu Prasad +Saori Kienhuis +Janko Ochoa +Haibing Lee +Chui Jacobsen +Kobe Driebergen +Simone Brathwaite +Sergio Thompson +Kasper Schops +Anne Houghton +Seoyeong Montoya +Tatsuhiro Thompson +Maureen Makanza +Edgars Meshref +Won Teltull +Eloyse Vocht +Nastassia Croenen +Tanyaporn Mazuryk +Katarzyna Norgaard +Dakota Ulrich +Vincent Cogdell +Dilshod Allen +Ali Wang +Jan-Di Aydarski +Kenny Faminou +Sebastian Flores +Nicola Belikova +Hyun Persson +Hao Kostelecky +Thomas Antonov +Rene Marques +Sophie Giorgetti +Nicola Chan +Sergey Kain +Polona Garderen +Florian Schrade +Jurgen Granollers +Gretta Tang +Ni Robinson-Baker +Krystian Pen +Rasmus Rindom +Egidio Kleiza +Yeon-Koung Fernandez +Jefferson He +Nestor Seric +Shinta Gong +Anja Barzola +Hedvig Alameri +Fabiana Saka +Elia Gittens +Elodie Muniain +Anthony Machavariani +Xuanxu Barnard +Noor Borzakovskiy +Sabrina Burns +Azusa Richter +Marian Atkinson +Sabina Williams +Nuttapong Bewley +Eun Burton +Judith Plotyczer +Jean-Julien QUINTERO +Da-Woon Morkov +Oleg Dyadchuk +Joel Csernoviczki +Dan Sinker +Jennifer Mogushkov +Nikola Zhang +Oliver Grumier +Ilona Chamley-Watson +Chien-Ying Fraser-Holmes +Sandra Kaukenas +Louise Fernandez +Mercy Nakamoto +Sviatlana Kable +David Svarc +Kirsten Wang +Aleksey Pahlevanyan +Therese Stewart +Frano Mendelblatt +Konstadinos Troicki +Carolina Wang +Adrian Lidberg +Lea Besbes +Hodei Phoenix +Ivano Tetyukhin +Onan Weale +Marina Kasa +Jongwoo Sin +Chia Jensen +Binyuan Kumagai +Stephanie Piasecki +Sergio Ivankovic +Tom Anderson +Dorothy Abdvali +Megumi Liu +Giacomo Koski +Gulcan Burling +Jessica Basalaj +Mel Morrison +Duane Skvortsov +Hamish Drabenia +Nevin Hurtis +Emanuel Taleb +Gretta Aramburu +Olga Weel +Pavlos Nicolas +Wenwen Samilidis +Mikhail Vlcek +Ndiatte Brown +Charline Chen +Nadezda Plouffe +Thomas Song +Yasmin Soliman +Louise Mrisho +Sergi Mohr +Mary Tomashova +Stsiapan Kaun +Sebastian Lelas +Matt Waite +Dana Potent +Younggwon Fabre +Rosie Aydemir +Dorian Taylor +Josefin Ifadidou +Nathan Barnhart +Ebrahim Maeyens +James McNeill +Jihane Rulon +Chu Willis +Cristian Ghasemi +Camille Giglmayr +Micheen Zhang +Peter Howieson +Ludwig Pishchalnikov +Frithjof Urtans +Guzel Mangold +Noureddine Filipe +Jong Borysik +Mohamed Koo +Helge Saladino +Kate Pink +William Girard +Julian Mehmedi +Lee-Ann Song +Denis Rezola +Lukasz Dudas +Elena Michan +Audrey Martin +Yasmin Brathwaite +Shana Halsall +Patrick Miles +Elmir Sorribes +Artur Munkhbaatar +Jessica Bolat +Mario Agahozo +Niki Grangeon +Pietro Warfe +Grete Skydan +Line Emanuel +Mhairi French +Miles Robertson +Iryna Radovic +Urszula Heffernan +Yutong Pena +Viktoriia Glavnyk +Veronique Caianiello +Reza Hoovels +Irakli Wang +Patrick Kiyotake +Benjamin Reinprecht +Valentino Ferguson-McKenzie +Aleksandar Fasungova +Mark Bennett +Mahe Ivashko +Krzysztof Vesovic +Joel Scanlan +Luol Mooren +Christin Brown +Lucy Maguire +Fatih Eisel +Sam Lahnsteiner +Wenling Aguiar +Joachim Jennings +Aleksandrs Castellani +Jo-Wilfried Schornberg +Artur Talbot +Ibrahima Csima +Byambatseren Resch +Andile Li +Florent Gu +Marianna Ford +Yadira Marghiev +Margaux Glanc +Szymon Silva +Victoria Salopek +Kasper Addy +Nadiezda Catlin +Christianne Kalmer +Michael Hammarstrom +Karin Myers +Annamaria Crothers +Jinyan Bernard-Thomas +Stevy Fernandez +Daria Shkurenev +Wing McMillan +Rafal Saedeleer +Morgan Akkar +Ahmed Harrison +Elodie Arcioni +Daria Palermo +Isabel Boccard +Todor Tong +Eric Birca +Rachel Kostelecky +Seongeun Magdanis +Marta Kiala +Grete Makaranka +Katie Park +Louise Jin +Eloy Rasmussen +Jessie Vlahos +Taimuraz Melis +Antonija Shelley +Bahar Deligiannis +Anouar Felix +Yoo Miller +Sau Jordan +Francois Achour +Ferdinand Clair +Mariya Gibson +Lisa Poistogova +Larissa Cortes +Wassim Matsumoto +Luisa Barros +Leire Saltanovic +Patrick Navarro +Hakim Svennerstal +Laura Khokhlova +Peter Ochoa +Carolina Rondelez +Jacob Harris +Nina Krause +Guillermo Kim +Taehee Moberg +Abdalaati Rodriguez +Roberta Callahan +Eslam Kaifuchi +Harry Brunstrom +Anastasiya Rupp +Javier Volosova +Marcin Mihamle +Alexander Valois-Fortier +Shehab Makhloufi +Claudia Kavanagh +Marcus Orban +Ines Wong +Alan Gaspic +Nahla Zhedik +Thiago Bruno +Vicky Florez +Jose Paldanius +Andre Takatani +Mohammad Li +Mechiel Schulz +Yibo Al-Jumaili +Melissa Guell +Luciano Ahmad +Jose Uhl +Becchara Pareja +Dana Zagame +Ahed Alilovic +Doyler Ledaki +Mikhail Weel +Emmanuel Mukasheva +Antoinette Silva +Samantha Lin +Larissa Zhu +Jin Pontifex +Janne Bouw +Giulia Schwanitz +Ion Hutarovich +Martyn Stasiulis +Branden Cavela +Jens Tuimalealiifano +Spyridon Zhou +Anita Wright +Adnane Kim +Johanna Khinchegashvili +Hellen Maher +Mario Daroueche +Raul Makanza +Kwan Scherer +Nelly Rumjancevs +Zac Ashwood +Ying Dancette +Vladimir Dehghanabnavi +Richard Warren +Andreas Stanning +Ivan Versluis +Angel Cash +Gloria Martinez +Lianne Schuring +Petra Sakai +Katerina Riccobelli +Elizabeth Smith +Lyubov Gunnewijk +Omar Canitez +Georgios Gigli +Laetitia Yamauchi +Ivan D'almeida +Helen Cheywa +Hichem Schwarz +Martin Strebel +Olga Asgari +Sergey Abalo +Njisane Arkhipova +Leonardo Ghebresilasie +Ramon Kirkham +Urs Kim +Simone Morin +Dorothy Reckermann +Dion Pavlov +Marc Gebremedhin +Anna Holzdeppe +Michael Caceres +Milan Ekberg +Tyson Knezevic +Mylene Haywood +Aneta Cardoso +Charlotte Kachalova +Krystian Kean +Cristiane Forciniti +Mulualem Rodriguez +Romana Wu +Joshua Capkova +Malin Manie +Luca Lee +Hannah Knioua +Benjamin Kuramagomedov +Ates Wenger +Ivan Penny +Glencora Ebbesen +Mehdi Li +Aries Coston +Moritz Muller +Diego Shing +Gaetane Desprat +Leah Driel +Robin Vesely +Lei Lee +Olivier Akwu +Ratanakmony Prutsch +Norman Chen +Enia Esterhuizen +Judith Zhu +Liangliang Miller +Juan Lovric +Alfonso Jneibi +Adam Jezierski +Elena Modenesi +Antoine Vidrio +Xiaodong Dulko +Rohan Braun +Pilar Wilson +Clara Mason +Jamila Rodhe +Olga Kasza +Phillipp Al-Mashhadani +Bojana Erakovic +Muhamad Sanders +David Dawidowicz +Lieuwe Schneider +Robert Kang +Gemma Wang +Julia Olsson +Ryo Smith +Kerron Saedeleer +George Terpstra +Amine Lin +Tomasz Gkountoulas +Wai Mazic +Lihua Ivanova +Ivana Monteiro +Andriy Hrachov +Lauren Subotic +Yevgeniy Gushchina +Thiago Malave +Luis Petkovic +Kylie Ignaczak +Aida Olesen +Richard Scarantino +Scott Klein +Saul Huddle +Lisa Edgar +Christina Maneephan +Zinaida Birarelli +Artem Daluzyan +Jan-Di Ilias +Adrian Melzer +Rhys Faber +Thi Kostadinov +Kaori Donahue +Desiree Khachatryan +Ricardo Barnaby +Natalia Benedetti +Gideon Kowal +Kelita Wood +Tomas Rodriguez +Silke Nam +Trevor Peno +Baorong Mir +Chi Kim +Tim Csonka +Karolina Wells +Agnieszka Skhirtladze +Natalia Akwu +Pamela Fuchs +Gediminas Whitehurst +Benjamin Schlosser +Yuderqui Mrak +Matylda Muncan +Lijiao Fumic +Arseniy Janik +Wenjun Taimsoo +Daniela Schleu +Janelle Ovchinnikovs +Michael Gigli +Xiang Pocius +Nathan Freixa +Oscar Poistogova +Xavier Kiprop +Sidarka Smelyk +Josefin Ma +Nicola Saranovic +Ville Grandal +Emmanuel Figere +Sergej Ayalew +le Toksoy +Ahreum Sum +Bruno Williams +Luca Kipyegon +Alexander Wei +Tim Phillips +Kay Coster +Matthew Chakhnashvili +Juan Crow +Haakan Okrame +Omar Jon +Glenn Defar +Sajjad Oriwol +Anfisa Whalan +Brendan Hanany +Matthieu Wang +Beth Guo +Fetra Shemarov +Ivan Kim +Gemma Gaiduchik +Abdelaziz Durant +Vladimir Rodriguez +Oleksiy Ferrer +Krisztina Petzold +Sonia Williams +Karen Okruashvili +Boglarka Vacenovska +Mike Bostock +Birhan Ryan +Carolina Borman +Byunghee Filipe +Katerine Podlesnyy +William Salminen +Elena Felix +Chui Aymerich +Yohan Miljanic +Pierre-Alexis Tom +Gergo Faulkner +Ranohon Montano +Suji Gallantree +Spiridon Elkhedr +Juliane Kim +Ciaran Susanu +Rena Jankovic +Tervel Rojas +Flor Magnini +Thomas Boggiatto +Panagiotis Mucheru +Methkal Grabich +Simone Moreau +Yavor Gonzalez +Bahar Febrianti +Hyun Strebel +Anderson Oh +Brian Boyer +Jana Rendon +Shuai Sudarava +Dzmitry Busienei +Macarena Jorge +Mara Deroin +Heiki Outteridge +Georgios Antal +Mathieu Pigot +Eva Hirata +Qiang Hradecka +Paula Pizzo +Behdad Trowbridge +Sofiane Satch +Roderick Nagai +Rajiv Fogarty +Marie Kim +Darae Elsayed +Eric Lemaitre +Marius-Vasile Biezen +Yusuke Kuziutina +Didier Munoz +Francis Thiele +Augustin Lozano +Un Avramova +Keigo Lekai +Monika Heidler +Blaza Frolov +Joao Shavdatuashvili +Ibrahim Oie +Caroline Denayer +Rikke Ayeko +Thomas Jurkowski +Tarek Luis +Pascal Deligiannis +Jamie Kinderis +Victor Kondo +Marlene Nicholson +Zhizhi Kehoe +Clemens Cordon +Carmen Akkaev +Denis McIntosh +Leith Clear +Lesley Bithell +Mikolaj Sawa +Benjamin Pietrus +Marcia Ser +Aaron Purevjargal +Nikolina Khuraskina +Vera Sene +Inmara Castro +Vicente Shemarov +Nicolene Jeong +David Junior +James Aniello +Christine Bonk +Glenn Filandra +Yana Elmslie +Nick Osagie +Teodor Wilson +Nicolas Dotto +Wanida Barjaktarovic +Sergey Almeida +Francesca Rowbotham +Elco Williams +Lidiia Ng +Tosin Mckendry +Aurelie Kirkham +Dorde Leboucher +Dalibor Vidal +Evgenia Kechrid +Mizuho Bennett +Lotta Tereshchuk +Christina Vesela +Giovani Krug +Naphaswan Brownlee +Pierre-Alexis Zhang +Naomi Lush +Olga Brize +Sarolta Coughlin +Bashir Krovyakov +Ava Rusakova +Ignisious Hijgenaar +Monika Hwang +Elena Coster +Johana Carman +Gael Mushkiyev +Kellie Leon +Jong Dunlop-Barrett +Alix Dziamidava +Kate Scheuber +Danielle Edlund +Kelly Kulish +Wenjun Juszczak +Belal Knowles +Susan Weidlinger +Adrienne Buntic +Toni Karpova +Bastian Beadsworth +Sergey Barachet +Lisbeth Alptekin +Robert Toumi +Angela Belmonte +Nicholas Nechita +Anton Langehanenberg +Citra Comba +Sergey Marco +Concepcion Vasilevskis +Marios Gelpi +Julian Hjelmer +Will Mehmedovic +Deniz Kowalska +Erica Velez +Julian Lie +Amber Mattsson +Lucie Yang +Sheng Romdhane +Roland Madaj +Ingrid Fogarty +Maksim Culley +Stefano Moniqui +Navab Povh +Jan-Di Kazlou +Claudia Butkevych +Ming-Huang Araujo +Mehdi Kovalenko +Automne Driel +Alberto Pedersen +Zengyu Driel +Sebastian Yonemoto +Kozue Martinez +Luis Gascon +Daniel Herman +Yadira Psarra +Mercy Pietrzak +Caitlin Carli +Ryan Adams +Donggeun Guion-Firmin +Gabrielle Raudaschl +Thomas Magi +Daigoro Johansson +Mareme Mihelic +Linus Tran +Emmanuel Hornsey +Andrew Ruciak +Alexandre Smedins +Denis Matsenjwa +Stephanie Adlington +Gonzalo Nunes +Braian Haydar +Zara Luvsanlundeg +Josefin QUINTERO +Chen Moulinet +Alexandre Sawers +Justin Mandir +Inna Yu +Kacper Phillips +Iuliana Costa +Endurance Emmanuel +Dmitrii Cureton +Colin Vila +Wei White +Daisuke Saranovic +Shaunae Hallgrimsson +Tetyana Kvyatkovskyy +Aziz Chaabane +Maynor Lemos +Vincent Jagar +Moritz Dibaba +Deron Tarasova +Nikolay Ahmed +Dorian Sauer +Marvin Rice +Samantha Grankin +Irakli Dinu +Dartey Henv +Derek Kazanin +Pedro Oliveira +Chunlei Balazs +Aya Levina +Maria Sheikhau +Zhongrong Stacchiotti +Isiah Murabito +Andrew Monteiro +Ayako Coetzee +Jade Jallouz +Veronika Wruck +Katerina Saenz +Sara Knowles +Julen Fogarty +James Takase +Emilie Jaeger +Luca Melendez +Jonas Ukumanov +Norma Anderson +Ludwig Trias +Matthias Ekimov +Beth Mazuryk +Radoslaw Licona +Dariya Kalentieva +Petr Smith +Nelcy Korshunov +Omar Aguirregaray +Boon Cortes +Gonzalo Pacheco +Aya Thunebro +Konstantinos Milanovic-Litre +Yugo Sesum +Reine Arteaga +Jur Gebremeskel +Yahima Gojkovic +Alexander Jiang +Sonja Tinsley +Ricardo Jones +Abraham Benitez +Gia Mogawane +Suzanne Warburton +Niverka Junior +Mateusz Yi +Aron Pilhofer +Xin Cuddihy +Olga Jon +Hortance McGlinchey +Marcel Petersen +Daniel Basalaj +Darrel Yamane +Mercy Verlinden +Juan Kim +Collis Freimuth +Anis Boninfante +Gabrio Dowabobo +Wilson Sauvage +Yu Moradi +Aleksandr Pendrel +Ser-Od Szasz +Trey Kirkham +Juliane Yanit +Sycerika Rabetsara +Daria Schmid +Hovhannes Piccinini +Danylo Aguiar +Sebastian Sorribes +Mandy Hinestroza +Margaux Knox +Lisa Yamamoto +Nick Burrows +Levan Ingram +Sanya Dreesens +Yun Luo +Megan Angelov +Xiaoyu Yang +Yi Gretchichnikova +Peter Wagner +Nagisa Leroy +Hung Mutlu +Jinjie Meeuw +Ponloeu Inthavong +Rodrigo Surgeloose +Marvin Peltier +Mingjuan Birgmark +Rizlen Errigo +Duhaeng Agren +Ari-Pekka Wei +Saheed Durkovic +Sarah Male +Beatriz Smock +Arsen Monya +Drasko Choi +Marcel Sigurdsson +Ilaria Hu +Hamdan Zabelinskaya +Radmila Nibali +Janin Aramburu +Suzana Teutenberg +Natalia Child +Maria Ro +Anabel Kal +Adnan Brendel +Zachary Podryadova +Xiaojun Hachlaf +Elisabeth Worthington +Myungshin Forgesson +Katerina Wang +Marcin Pechanova +Andrea Wenger +Anabel Dominguez +Pauline Ayim +Igor Kasa +Artem Tops-Alexander +Satoko Tegenkamp +Miho Franco +Raissa Araya +Sholpan Draudvila +Hiram Blume +Line Naylor +Iryna Malcolm +Maiko Zhang +Silviya Cesarini +Amaka Mathlouthi +Magdalena Siladi +Roman Ledaki +Cian Purnell +Kurt Multerer +Tassia Cejas +Myung Kim +Alexandra Jokinen +Stefan Webster +Jemma Gabriele +Alberto Fiakaifonu +Mateusz Metu diff --git a/tests/sh/teacher/mystery1/memberships/Museum_of_Bash_History b/tests/sh/teacher/mystery1/memberships/Museum_of_Bash_History new file mode 100644 index 00000000..090a8dcb --- /dev/null +++ b/tests/sh/teacher/mystery1/memberships/Museum_of_Bash_History @@ -0,0 +1,1290 @@ +Limei Ioannou +Mihaela Toskic +Mihyun Dahlberg +Joseph Nielsen +Glenn Ouedraogo +Fabian Knight +Kien Wade-Fray +Elena Modenesi +Honami Kozhenkova +Yakhouba Garcia +Norbert Prokopenko +Tugba Brecciaroli +Shota Rakonczai +Olga Schofield +Azad Honeybone +Dion Pavlov +Aleksandra Silva +Lynsey Bailey +Dmitriy Halsted +Pajtim Pospisil +Austra Xu +Diego Smith +Bridget Usovich +Kellie Leon +Jur Gebremeskel +Camille Gao +Andrei Masna +Simon Rigaudo +Jose Pedersen +Selim Tregaro +Maher Vos +Vera Scarantino +Paula Pamg +Stevy Fernandez +Stanislav Dorneanu +Goran Driouch +Sergi Soto +Yang Fraser +Miguel Cho +Abiodun Rogers +Katya Lehtinen +Jermaine Qin +Germain Detti +Kieran Mota +Andrea Lammers +Yu Sakaguchi +Sanja Silva +Suhrob Jacob +Eric Ally +Guilherme Latt +Mario Agahozo +Yuko Gennaro +Yana Al-Garni +Roderick Nagai +Grainne Ross +Kay Kouassi +Betkili Betts +Omar Osl +Erina Cabrera +Mercy Pietrzak +Aksana Melian +Tetyana Kolchanova +Mei Stettinius +Igor Turner +Beata Altes +Geir Brash +Lukasz Afroudakis +Jamy Malzahn +Yi Mansouri +Xiaojun Lee +Rayan Titenis +Denis Machado +Marc Clair +Sarah Dovgun +Isil Gonzalez +Xiaodong Dulko +Marina Tchuanyo +Chong Massialas +Carlos Hall +Faith Kim +Mohammad Li +Antonija Dilmukhamedov +Mathias Laukkanen +Goldie Marais +Mariaesthela O'connor +Keri-anne KORSIZ +Mikhail Laalou +Jingjing Gray +Shane Fischer +Luis Lundgren +Kynan Viljoen +Petra Sakai +Andrei Delattre-Demory +Carl Chapman +James Seferovic +Taizo Barry +Philip Hilario +Nick Rogers +Malin Archibald +Komeil Menchov +Mateusz Yi +Simone Fesikov +Nicholas Kudryashov +Scott Klein +Johana Carman +Brenda Hsu +Diletta Tindall +Nadeen Carrasco +Jefferson Nagy +Anna Munch +Lisbeth Savani +Anderson Oh +Elco Williams +Eduardo Collins +Elena Costa +James Brooks +Ates Wenger +Alina Ciobanu +Stephanie Sofyan +Clement Starovic +Connor Touzaint +Saori Dancette +Blaza Frolov +Toshiyuki Nyasango +Jung Jung +Anna Savinova +Georgi Dent +Albert Malki +Wan-Jung Gasol +Chia Bleasdale +Natalia Kim +Ka Ma +Tiago Lauric +Yuliya Sokolov +Fernanda Purchase +James Haghi +Jacheol Hyun +Michal Stahlberg +Courtney Yankey +Simas Takahashi +Job Cole +Dariya Kalentieva +Mechiel Maric +Suzaan Dawkins +Macarena Jorge +Julie Henriques +Kieran Bayaraa +Ibrahima Byrnes +Sara Siriteanu +Olga Puga +Petr Smith +Hichem Schwarz +Simona Mennigen +Wai Mazic +Jaele Sharp +Sylwia Yang +DeeDee Warfe +Ivan Abdusalomov +Danylo Bond-Williams +Ranohon Montano +David Moutton +Liliana Mullin +Abdelaziz Durant +Alberto Han +Leford Lapin +Svetlana Wang +Alexey Friedrich +Margaux Jung +Susan Weidlinger +Emmanuel Mukasheva +Jack Shafar +Peter Schuch +Vardan Romeu +Danyal Lefert +Milos Blazhevski +Andre Romeu +Ahmed Miyake +Mamorallo Holzer +Edwige Henderson +Alena Noa +Evgeny Schoneborn +Tetyana Kvyatkovskyy +Samantha Lin +Kateryna Mitrea +Viktor Steffens +Guido Kanerva +Dartey Henv +Ludivine Chetcuti +Raphaelle Batum +Ainhoa Taylor +Corine Kashirina +Mario Husseiny +Husayn Reuse +Barbara Shakes-Drayton +Johana Yauhleuskaya +Michael Stamatoyiannis +Georgina Issanova +Ying Marinova +Mebrahtom Fields +Danijel Carriqueo +Marlene Nicholson +Ventsislav Niyazbekov +Evelin Niyazbekov +Andisiwe Graham +Sonata Raif +Spiridon Elkhedr +Silviya Cesarini +Shaunae Hallgrimsson +Jayme Suarez +Natalia Manaudou +Arianna Tansai +Aly Roberts +Sarra Larsen +Tsilavina Wozniacki +Jarred Selimau +Anas Ma +Tatiana Muncan +Kyung-Ok Monaco +Vera Sene +Gulnar Kowalska +Arben Mikhaylov +Joao Dovgodko +Riccardo Cheng +Laetitia Cornelissen +Tetsuya Cabrera +Torben Jaskolka +Kim Kable +Chelsea Thiele +Kayla Kim +Nilson Belmadani +Junggeu Firova +Maja Orban +Kate Bourihane +Nicole Kovalev +Casey Santos +Renee Duenas +Beatriz Nooijer +Matthew Toth +Ravil Azou +Gia Yoon +Liuyang Darnel +Irina Kaddouri +Adrian Lidberg +Carlos Yakimenko +Silvana Bianconi +Gonzalo Gough +Constantina Nagel +Franziska Huang +Charlotte Ranfagni +Keith Beresnyeva +Steven Schlanger +Bruno Ruban +Natalie Cheverton +Paulo Seric +Enzo Balciunas +Pascal Davaasukh +Roxana Srebotnik +Ludivine Williams +Wei White +Maria Banco +Wouter Brennauer +Olga Richards +Peter Jang +Xiaoxia Yamagata +Shane Gemmell +Rizlen Errigo +Iuliia Oatley +Todd Lewis-Smallwood +Hamdan Zabelinskaya +Sviatlana Zucchetti +Jose Morgan +Shane Dodig +Hun-Min Soroka +Emma Hausding +Mylene Murray +Ryosuke Ciglar +Marleen Rodrigues +Abiodun Horvath +Oleksandr Schwarzkopf +Alexa Patrick +Georgina Zuniga +Helge Saladino +Jan Ferreira +Bastian Horvat-Panda +Suzanne Warburton +Augustin Lozano +Shuai Muttai +Derek Kazanin +Rosie Aydemir +Artur Teltull +Phillipp Absalon +Kyle Chamberlain +Guor Rodhe +Kenny Chavanel +Levan Ingram +Brian Boyer +Bedan Soubeyrand +Maximilian Sedoykina +Darcy Zouari +Sebastian Drame +Gwang-Hyeon Mears +Andres Shi +Lisa Mendibaev +Ivan Contreras +Ivana Grubisic +Charlotte Kachalova +Eric Babos +Pablo Pereyra +Claudia Metu +Viktor Rangelova +Moana Xian +Ryan Pota +El Gonzalez +Ashleigh Bruno +Marquinhos Samara +Tim Cambage +Docus Muff +Yahima Menkov +Dalibor Vidal +Kyle Koala +Weiyi Kirpulyanskyy +Joel Csernoviczki +Aleksei Wang +Gojko Lee +Gulcan Burling +Adenizia Kim +Federico Pavoni +Daniel Lim +Kobe Driebergen +Aleksandr Rutherford +Paolo Sirikaew +Simone Moreau +Fortunato Deng +Kristina Sokhiev +Ayouba Carrington +Rafal Ri +Pavlos Nicolas +Juan Lacrabere +Ida Deak-Bardos +Jerome Amoros +Priscilla Chitu +Piotr Rabente +Daniel Green +Robert Skrzypulec +Pui Coronel +Marie-Louise Hosking +Niverka Junior +Mariko Shimamoto +Bilel Boonsawad +Deni Iovu +Ioannis Martinez +Chia Hilario +Nicholas Stowell +Rubie Sukhorukov +Gareth Culley +Bianca Coleman +Angelique Raden +Angela Belmonte +Andrew Ekame +Annabel Church +Victor Labyad +Marcel Goodison +Veronique Caianiello +Marcos Laukkanen +Maiko Zhang +Ionut Kalovics +Fineza Davis +Ryan Welte +Hursit Gestel +Diego Michan +Dallal Elgammal +Marie Unsworth +Giovani Alflaij +Sajjad Ulrich +Anton Aguilar +Lori Jacobsen +Jean-Christophe Fujio +Sarah Markussen +Ashlee Sakai +Tina Ortiz +Alice Riou +Adrien Kleibrink +Alfredo Polyanskiy +Ratanakmony Prutsch +Marcel Roelandts +Urs Kim +Artem Napoleon +Yoann Gentry +Charline Chen +Chia-Ying Djokovic +Lorena Ginn +Eunice Zairov +Luis Elhawary +Mary Tomashova +Benjamin Bilici +Seonkwan Cha +Kyoko Bennett +Vera Silva +Ricardo Jones +Darae Hidayat +Moon Caille +Horacio Klizan +Simona Sauveplane +Gauthier Bindrich +Tina Teutenberg +Jingbiao Cheon +Marcel Petersen +Thomas Boggiatto +Mansur Engleder +Marry Azizi +Miranda Mulligan +Maider Piccinini +Chris Keller +Didier Munoz +Jessica Mcgivern +Periklis Gemmell +Louisa Tomas +Francielle Ziolkowski +Karolina Brennauer +Niklas Donckers +Lisa Poistogova +Egor Ferreira +David Schuh +Adrienne Kreanga +Svetlana Janoyan +Shijia Conway +Tom Ptak +Nazario Barrondo +Deron Estanguet +Shiho Berkel +David Rahimi +Viktoriia Mathlouthi +Yuki Hayashi +Sarah Zaidi +Lee Farris +Rita Sanchez +Maroi Tatham +Reza Hoovels +Liubov Ruh +Bodin Prevolaraki +Yadira Marghiev +Shane Lauric +Stephanie Adlington +Xiang Diaz +Samira Ri +Naomi Presciutti +Martin Strebel +Shaune Hurskainen +Gwen Fredricson +Dieter Schooling +Nenad Moran +Iuliia Kim +Suji Labani +Christina Illarramendi +Yunwen Crous +Polen Borel +Niki Batkovic +Daniele Babaryka +Nathan Nishikori +Ash Buckland +Daniel Jackson +Kelly Olivier +Shao Watt +Vincent Brize +Marina Ma +Russell Verdasco +Haibing Lee +Stanislav Cherobon-Bawcom +Pedro Prieto +Andisiwe Ki +Pimsiri Panchia +Michal Krsmanovic +Kim Estrada +Pawel Jensen +Alison Potro +Zamandosi Chuang +Deni Yao +Mohamed Silva +Jukka Barros +Shara Gomez +Donald Aleksic +Jeroen Torstensson +Eslam Kaifuchi +Yevgeniy Ghiban +Carolina Macias +Philipine Hansen +Tim Han +Marian Atkinson +Pawel Coetzee +Westley Tatalashvili +Yihua Grunsven +Barna Vican +Hamish Drabenia +Mulualem Rodriguez +Lidija Usovich +Sergey Dahlberg +Gonzalo Nunes +Maro Jiang +Kira Richards-Ross +Francois Achour +Maria Smid +Wenwen Pitchford +Dakota Ulrich +Olga Castano +Olga Brize +Tino Henze +Grigor Suuto +Patricia Edward +Iuliia Barseghyan +Paul Tsakmakis +Marcia Ser +Remy Barac +Nicholas Hornsey +Kim Klaas +Nils Guzzetti +Carmelita Zahmi +Benjamin Jeong +Mclain Rakoczy +Anja Jang +Marc Atici +Anastasia England +Albert Barthel +Chu Willis +Karina Jelaca +Vitaliy Robson +Dzhamal Barry +Harry Brunstrom +Joel Tverdohlib +Shunsuke Erakovic +Alexandre Smedins +Hyunsung Ivancsik +Ewelina Hwang +Maximiliano Matsumoto +Charles Cadee +Gemma Wang +Yue Zargari +Natthanan Caluag +Hoi Martina +Mohamed Soares +Hajung Cardona +Josefin Crawshay +Kyung Granstrom +Jemma Modenesi +Viktor Michshuk +Kate Pink +Derek Dancette +Po Otsuka +Hannah Gherman +Alistair McGeorge +Ashley Johansson +Bjoern Markt +Karen Okruashvili +Mizuho Suetsuna +Aselefech Gkountoulas +Danielys Butler +Lenise Liu +Rima Sommer +Richard Ruiz +Hyok Maciulis +Alan Mestres +George Terpstra +Zhiwen Wu +Lisbeth Alptekin +Jean-Christophe Kirkham +Emanuele Siegelaar +Donglun Nhlapo +Onan Kim +Christian Machavariani +Nahla Zhedik +Helen Beaubien +Alexandre Sawers +Hanna-Maria Bluman +Dunia Paton +Endene Samsonov +Rosario Rulon +Chen Moulinet +Manuela Syllabova +Christopher Erichsen +Haris Sinclair +Dylan Espinosa +Mikhail Napoleao +Katarzyna Calabrese +Artur Talbot +Stefan Noonan +James Meszaros +Jennifer Johnson +Viktoriia Madico +Aline Peters +Lleyton Houghton +Rasmus Rindom +Yang Yin +Mattias Kovtunovskaia +Damian Woods +Marina Murphy +Jiao Fasungova +Mohamed Kazakevic +Juan Osl +Sonia Gillis +Takamasa Kasa +Sara Birarelli +Velichko Connor +Camilla Terpstra +Khairul Morningstar +Eve Pessoa +Katya Baddeley +Lucy Burmistrova +Nicolas Gyurov +Joao Shavdatuashvili +Lina Al-Jumaili +Elia Mota +Reza Hoff +Vera Rickard +Klaas Wykes +Abdalaati Rodriguez +Josefin Ma +Victoria Homklin +Kerron Saedeleer +Jamie Kinderis +Derrick Jackson +Viorica Schwarzkopf +Yin Toma +Melanie Disney-May +Elena Quinonez +Marina Kim +Pavlo Stewart +Lucia O'malley +Gabrielle Lidberg +Matthieu Wang +Joachim Mironcic +Alejandro Collins +Silvia Nakamoto +Emmeline Vasilionak +Shuang Cabrera +Keon Mcculloch +Justin Mandir +Wanida Barjaktarovic +Ilya Saito +Hiroyuki Meye +Amine Lin +Nikola Zevina +Margarita Donckers +Emanuel Hanany +Hannah Knioua +Victoria Davis +Kara Vougiouka +Daniela Schaer +Laura Sanca +Adnane Kim +Louisa Hazer +Sangjin Hindes +Risa Synoradzka +Anthony Machavariani +Milena Wojnarowicz +Bernard Tamayo +Yue Birmingham +Timothy Goffin +Andre Qin +Rachel Gonzalez +Desiree Kavcic +Pedro Egelstaff +Serghei Alhasan +Hideki Liivamagi +Jorge Lambert +Mary Wallace +Brittany Askarov +Marian Jager +Bostjan Kasold +Kerron Bracciali +Miyu Murray +Katherine Luca +Jade Jallouz +Sinead McHale +Saskia Pliev +Byron Lezak +Thiago Rosso +Sandra Kaukenas +Stephanie Rodrigues +Traian Chen +Milka Spiegelburg +Ifeoma Lahbabi +Neil Kopp +Louise Karimov +Vittoria Lima +Sara Walker +Jinling Golovkina +Vesna Rutter +Chien-Ying Bompastor +Mylene Haywood +Damian Baki +Dmytro Song +Dmytro Golding +Cy Malzahn +Darae Charlos +On Schops +Rene Chen +James McNeill +Vincent Krasnov +Tsvetana Jennings +Yomara Setiadi +Jongwoo Sin +Erik Plouffe +Petar Dominguez +Ali Watanabe +Lisa Edgar +Patrick Miles +Antonina Raif +Yimeng Amaris +Mireia Lindh +Ivana Fajdek +Won Teltull +Kateryna Matei +Ahmed Elkawiseh +Anna Holzdeppe +Yunlei Xu +Rafael Yero +Virgil Neny +Marcel Cainero +Kimberly Yu +Ahmed Gordon +Nicola Hosking +Francisco Feldwehr +Carolina Rondelez +Lucas Ahmed +Tomasz Jang +Alvaro Viljoen +Allison Musinschi +Vladimir Benedetti +Lizzie Sheiko +DeeDee Dumitrescu-Lazar +Jordan Panizzon +Cian Purnell +Julia Dovgodko +Jamol Perez +William Salminen +Gavin Bauza +Shaune Milevicius +Sophie Giorgetti +Jonas Ciglar +Fergus Sykorova +Attila Vicaut +Julie Ovchinnikovs +Hagos Hassler +Xing Varga +Nina Krause +Lena Miyama +Jamaladdin Dalby +Andreas Stanning +Besik Unsworth +Lei Wojtkowiak +Roderick Atari +Tamara Cafaro +Pierre-Alexis Zhang +Anna Hosking +Irina Song +Juan Lovric +Mattia Saramotins +Norman Chen +Tina Boidin +Roger Kaeufer +Gulsah Makarova +Luigi Schwaiger +Yulan Mohaupt +Matthew Lessard +Qingfeng Li +Caster Gong +Louisa Horasan +Eric Silva +Dilshod Thiney +Paola Tai +Ehsan Yamazaki +Nevin Ikeda +Sebastian Gadabadze +Ponloeu Inthavong +Ai Portela +Ciaran Susanu +Xiaoxu Cardoso +Olena Kromowidjojo +Krista Dai +Hakim Nyantai +Eric Birca +Johan Arvaniti +Maksim Loza +Luke Ruh +Matt Waite +Martyna Kirkbride +Amanda Tateno +Deokhyeon Khinchegashvili +Marcelo Filippov +Luka Begu +Aleksandar Sandell +Aleksandra Gordon +Jitka Tranter +Thais Pereira +Silvio Steryiou +Seoyeong Montoya +Ilya Marcano +Aya Rakoczy +Whaseung Maresova +Emma Wei +Rebecca Ruta +Jitka Mottram +Gaetane Partridge +Yuliya Shiratori +Konstantin Papachristos +Teklit Zheng +Amer Reyes +Iaroslav Jakabos +Konstadinos Troicki +Alexander Frederiksen +Asumi Colo +Mohamed Steele +Patricia Zhang +Aniko Blume +Ensar Taylor +Konstadinos Voronov +Danijel Paderina +Jose Paldanius +Yerzhan Poulios +Marton Coetzee +Marius-Vasile Sidi +Martin Voulgarakis +Adnan Brendel +Lynne Om +Mateusz Mendoza +Simon Zordo +Moussa Fernandez +Aron Pilhofer +Michael Orjuela +Neisha Liang +Oliver Mokoka +Nurul Han +Eduarda Bartonova +Beth Mazuryk +Karolina Wells +Jenny Flognman +Serhiy Kang +Gundegmaa El-Sheryf +Alexandr Liu +Bubmin Saenz +Kevin Dawidowicz +Eusebio Wallace +Mario Vanasch +Todd Kuzmenok +Amine Kiss +Jing Sprunger +Ola Almeida +Carl Roux +Yumeka Guo +Mikaela Iwao +Daniel Loyden +Zouhair Ri +Marcus Khalid +Marcelien Hosnyanszky +Julian Antosova +Dzmitry Busienei +Rutger Mareghni +Antonin Morais +Shiho Brens +Suyoung Rodrigues +El-Sayed Prodius +Thi Kostadinov +Marcelinho Pendrel +Anita Goubel +Jacques Ide +Pieter-Jan Huang +Andreas Paonessa +Ever Levins +Anton Dlamini +Mark Turner +Natalia Lippok +Austra Bauza +Sophie Ahmadov +Yuhan Ryang +Uladzimir Bertrand +Jean-Christophe Pompey +Mike Bostock +Edgars Meshref +Amy Zaiser +Sarah Lokluoglu +Lorena Marenic +Andrea Kimani +Hye Wallace +Aina Gavrilovich +Stina Perova +James Chetcuti +Yik Akkaoui +Sadio Chouiref +Vincent Robinson +Chia Jensen +Yibo Al-Jumaili +Borja Rodriguez +Juan Oiwa +Caba Mandic +Vanesa Hitchon +Zamandosi Flood +Shehab Makhloufi +Xi Somogyi +James Takase +Jean-Christophe Davenport +Matias Hosnyanszky +Ava Silva +Myung McCafferty +Ali Milthaler +Junjing Kang +Stepan Gallantree +Bebey Rodaki +Andrew Liu +Marcin Mihamle +Liangliang Miller +Diego Udovicic +Yoo Miller +Yoon Kelsey +Walton Souleymane +Wirimai Enders +Louis Maneza +Sanne Kuo +Mie Callahan +Younghui Karasek +Ahmed Chammartin +Arlene Douka +Katharina Bartonickova +Karen Rew +Constanze Sanchez +Abraham Benitez +Mikhail Polaczyk +Jie Tarasova +Nadezda Lee +Oscar Mitic +Vincent Hartig +Silke Nam +Ziwei Braas +Agnieszka Iersel +Nenad Blerk +Mikhail Vlcek +Jangy Scott-Arruda +Suyeon Woo +Ivana Monteiro +Chun Yamaleu +Richard Kim +Khadzhimurat Wilkinson +Lidiia Ng +Nazmi Patrikeev +Julia Jeon +Kelly Gemmell +Olexiy Cheon +Emily Chow +Slobodan Elaisa +Zachary Podryadova +Sonja Ide +Klara Gubarev +Jeannette Prokopiev +Jaime Bruno +Michela Brown +Camille Andersen +Christofer Sokolova +Erwan Putra +Zsuzsanna Hodge +Xavier Cox +Chie Aigner +Shinichi Grasu +Chloe Santos +Lukasz Draudvila +Lee-Ann Song +Ana Williams +Ahmed Saladuha +Dina Hwang +Naydene Cabral +Krystian Pen +Lijie Fowles +Carlos Cebrian +Roba Suvorau +Ayako Coetzee +Lucas Neal +James Aniello +Bruno Tomas +Ju Isner +Tanyaporn Mazuryk +Javier Branza +Jinhyeok Yamaguchi +Robert Dent +Peng Perez +Valerie Battisti +Iuliana Costa +Stijn Choi +Yasemin Cavela +Alexander Obermoser +Irene Soloniaina +Yu Chinnawong +Anton Gu +Gia Mogawane +Jayde Madarasz +Boniface Kanis +Esref Moiseev +Yadira Psarra +Glenn Filandra +Marouen Tatari +Alex Nichols +Ibrahima Csima +Tinne Campriani +Cesar Chen +Ken Roland +Ivan Nakai +Olha Lewis-Smallwood +Alfonso Jneibi +Bashir Krovyakov +Yanfei Nono +Julien Chen +Kayono Nikitina +Spyridon Zhou +Elisabeth Amertil +Benjamin Noumonvi +Aldo Cerkovskis +Sandrine Lapeyre +Jehue Zolnerovics +Silvia Ioneticu +Aries Coston +Carli Kajuga +Denys Hasannen +Jo-Wilfried Schornberg +Daniel Kouassi +Jonas Vlcek +Aaron Purevjargal +Adrianti Tsirekidze +Anthony Dahlgren +Kaliese Sudol +Hellen Maher +Irene Russell +Lucy Vitting +Jamale Fu +Tatsuhiro Thompson +Cameron Allepuz +Crisanto Saikawa +Samantha Ahamada +Nguyen Mueller +Marcia Khubbieva +Kris White +Samantha Hantuchova +Andy Maier +Joshua Azcarraga +Tamas Fredericks +Mareme Mihelic +Natalya Mrabet +Christopher Follmann +Arturs Swann +Jianlian Burgers +Dongwon Rodriguez +Krystian Kean +Seen Flores +Maxime Tatishvili +Damien Hejmej +Sally Fuamatu +Lok Al-Athba +Diego Saedeleer +Lina Bujdoso +Barbara Hutten +Ioulietta Assefa +Martyn Stasiulis +Sergej Yli-Kiikka +Lionel Shabanov +Shara Burgrova +Alvaro Tanatarov +Bin Iersel +Dominic Al-Azzawi +Larisa Nagy +Ashley Saramotins +Lukas Jang +Peter Zyabkina +Sofiane Satch +Sandeep Karayel +Robbert Kanerva +Kanae Bracciali +Tim Mankoc +Aleksandr Inthavong +Alix Dziamidava +Pietro Boukhima +Murilo Rohart +Radu Colley +Lieuwe Lim +Henk Mrvaljevic +Ka Ilyes +Keith Pavoni +Seongeun Magdanis +Kate Scheuber +Kevin Giovannoni +Fionnuala Horst +Dmitriy Liang +Beth Andrade +Nicholas Nechita +El Rooney +Juliane Yanit +Wesley Meftah +Komeil Matheson +Nadiya BAER +Athanasia Ayling +Feiyi Zavadsky +Reza Egelstaff +Rasul Tichelt +Valentina Teschke +Nastassia Zalsky +Tamas Guo +Irina Tigau +Kianoush Tan +Alana Thiam +Moses Sihame +Elena Zhang +Naomi Gattsiev +Victor Ganeev +Valerie Penezic +Rachelle Cherniavska +Sardar Vuckovic +Sarah Guzzetti +Daniel Huckle +Mohamed Koo +Donglun Rohner +Ahreum Sum +Theodora Conway +Agnes Vasina +Magalie Allen +Xuanxu Barnard +Vladimir Dehghanabnavi +Darryl Strebel +Sholpan Draudvila +Cornel Ding +Katarina Rogina +Amy Prevot +Leah Aleksic +Eva Markussen +Melissa Brguljan +Timothy Li +Cindy Narcisse +Aleksei Rouwendaal +Njisane Arkhipova +Anaso Booth +Alexandros Grumier +Annalie Ekame +Alex Kim +Joshua Fenclova +Megan Raymond +Wen Ghayaza +Ryan Prasad +Monika Hwang +Anna Hirano +Johannes Berna +Timm Augustyn +Melanie Gibson-Byrne +Ravil Ismail +Gediminas Whitehurst +Rashed Head +Siham Moura +Molly Shtokalov +Darlenis Helal +Gabrielle Tikhomirova +Hanna Wraae +Emilio Williams +Leryn Henao +Eun Burton +Iain Kossayev +Laura Ng +Nicholas Ihle +Donglun Borlee +Patrick Navarro +David Jeong +Anastasia Biannic +Jana Yudin +Mohamed Nystrand +Toea Liptak +Jessica Sprenger +Peter Garcia +Ling Kromowidjojo +Hamid David +Jessica Garderen +Emmanuel Hornsey +Sven Nascimento +Vasilij Wang +Sanya Dreesens +Nacissela Makarau +Mikalai Bassaw +Kelly Kulish +Facinet Ratna +Michael Mirnyi +Szabolcs Culley +Kozue Martinez +Ahmet Polishchuk +Kay Coster +Casey Mccabe +Aldo Nicolas +Yasmin Brathwaite +DeeDee Montoya +Tyler Belmadani +Sascha Bentley +Dongho Jensen +Annari Simmonds +Delwayne Boon +Thomas Antonov +Mizuho Bennett +Elena Clark +Wissem Davies +Birhan Evans +Viktoriya Aguirregaray +Jussi Nesti +Jordan Ndoumbe +Kianoush Skrimov +Janin Aramburu +Marie-Pier Schultze +Nikolaus Milatz +Ling Langridge +Yury Mensah-Bonsu +Mate Montano +Mariusz Yang +Maurine Peters +Kay Rosa +Daniel Marburg +Jamila Rodhe +Almensh Zbogar +Evgeny May-Treanor +Yutong Pena +Ivana Lee +Oluwasegun Annabel +Marta Pyatachenko +Tatyana Mitrovic +Kelsey Bludova +Fanny Castillo +Georgia Tipsarevic +Rimantas Luca +Johana Pistorius +Matteo Nieminen +Alexis Diaz +Tarek Takahira +Hae-Ran Garcia +Alice Irabaruta +Mariya Gibson +Ravil Mokoena +Galen Kirpulyanskyy +Danielle Edlund +Henk Schorn +Jerome Pikkarainen +Norbert Feldwehr +Carlos Sekaric +Kyle Baddeley +Sviatlana Kable +Alexander Jiang +Sergey Zurrer +Jan-Di Kazlou +Jeneba Lee +Dathan Ziadi +Nourhan Benfeito +Arantxa Kalnins +Dagmara Balla +Yauheni Sokolowska +Brittany Crain +Fredy Melis +Casey Basic +Teun Tancock +Matteo Goncharova +Lene Zargari +Lauryn Powrie +Cristian Bennett +Tyson Tong +Shalane Shiratori +Francena Savchenko +Larissa Zhu +Diego Stojic +Margaux Glanc +Mostafa Kleen +Arnie Flaque +Benjamin Parker +Fabio Simonet +Nicola Socko +Iveta Blagojevic +Momotaro Khmyrova +Alexander Kurbanov +Daria Shkurenev +Mihai Correa +Azad Lavanchy +Marielis Findlay +Jonathan Niit +Bogdan Zavadova +Marry Gille +Francine Beaudry +Sergey Kain +Riza Bleasdale +Soufiane Odumosu +Bill Turner +Raphael Hardee +le Toksoy +Emanuele Oulmou +Peter Sloma +Angela Palomo +Peter Neethling +Michelle Kirilenko diff --git a/tests/sh/teacher/mystery1/memberships/Terminal_City_Library b/tests/sh/teacher/mystery1/memberships/Terminal_City_Library new file mode 100644 index 00000000..5ce1780a --- /dev/null +++ b/tests/sh/teacher/mystery1/memberships/Terminal_City_Library @@ -0,0 +1,1296 @@ +Julen Fogarty +Fabian Knight +Katarzyna Talay +Antonina Raif +Viktor Lamdassem +Yuko Gennaro +Hui Ahmed +Bianca Athanasiadis +Nils Guzzetti +Natasha Haywood +Sheng Romdhane +Hannah Barker +Marcos Laukkanen +Konstantin Papachristos +Andres Bouramdane +Mohamed Soares +Ivan Araujo +Kacper Coster +Woroud Baroukh +Benjamin Pietrus +Amer Lao +Tania Silva +Mario Boninfante +Rafal Hartley +Norayr Burton +Alicia Samoilau +Nicholas Kudryashov +Javier Branza +Eric Rouba +Elena Clark +Ioannis Tkach +Maximiliano Han +Marius Davies +Antonina Bernier +Irene Morath +Mikalai Bassaw +Zivko Manafov +Russell Miao +Yuliya Shiratori +Lucy Perez +Adam Sasaki +Mattias Kovtunovskaia +Sanja Silva +Meiliana Berglund +Nahla Tyler +Sarra Bainbridge +Donggeun Guion-Firmin +Keehee Rivers +Habibollah Smith +Melissa Brguljan +Kelis Wurzel +Maria Arismendi +Irawan Souza +Ahmed Weir +Kirani Kalargaris +Ioannis Burgaard +Sara Campbell +Becky Wozniak +Yuhan Ryang +Anita Goubel +Asgeir Goffin +Ganna Zonta +Anaso Booth +Alexander Kosok +Attila Vicaut +Donatien Lotfi +Masashi Angilella +Destinee Kucana +Milan Emmolo +Pavlos Nicolas +Daouda Martelli +Elisabeth Worthington +Braian Haydar +James Chetcuti +Darryl Soeda +Arseniy Janik +Alexandra Solja +Adrienne Buntic +Mujinga Peterson +Stsiapan Balmy +Jonathan Perez-Dortona +Celeste Leroy +Lucy Burmistrova +Zargo Dehesa +Marilyn Dominguez +Mhairi French +William Girard +Yu Moradi +Andriy Lukashyk +Monika Herman +Lukas Gong +Yuichi Burgh +Omar Dumerc +Clara Ahye +Yige Lamoen +Ai Lovtcova +Julie Ovchinnikovs +Janet Ganeev +Sven Nascimento +Sara Friis +Paul Demare +Yauhen Rafferty +Russell Aidietyte +Jan-Di Ilias +Norma Tomic +Julie Henriques +Andrew Monteiro +Brahim Wang +Omar Hurst +Ainhoa Taylor +Chun Yamaleu +Camille Andersen +Massimo Groot +Maksim Acuff +Rebecca Reid-Ross +Ruta Trowbridge +Kame Vesely +Bilel Karth +Ryan Fogg +James McNeill +Stefan Webster +Sarra Larsen +Jose Morgan +Par Awad +Yuhei Hybois +Kiril Larsson +Dalibor Gibson +Nenad Moran +Susana Barcelo +Elea Li +Mattia Sanchez +Emmanuel Barbieri +Sonata Raif +Maurine Peters +Todd Lewis-Smallwood +Anis Boninfante +Martin Houvenaghel +Afgan Mrvaljevic +Lisa Edgar +Silas Voronkov +Kilakone D'elia +Teresa Andrewartha +Kristina Liess +Minxia Yu +Peter Neethling +Yayoi Buckman +Nuno Rajabi +Ying Dancette +Jeff Larson +Tina Hristova +Lucia Berens +Michela Ayed +Martino Mayer +Norbert Feldwehr +Jade Kopac +Israel Osman +Mikhail Napoleao +Liam Edelman +Anderson Guo +Stanislav Dorneanu +Ahmed Annani +David Schuh +Aziz Chaabane +Hannah Knioua +Andrea Lammers +Pavel Lee +Eric Babos +Automne Driel +Maureen Silva +Charles He +Tosin Mckendry +Prince Zyl +Joel Tverdohlib +Jieun Sukhorukov +Juan Jeon +Rafael Vezzali +Phuttharaksa Signate +Edinson Rodrigues +Jehue Wild +Marina Murphy +Sara Hore +Marco Dries +Emiliia Gebhardt +Konstadinos Voronov +Aleksey Garcia +Hellen Maher +Maximilian Sedoykina +Samantha Zavadova +Martin Kergyte +Rokas Karasev +Daniel Shipilova +James Rosic +Dae-Nam Dunkley-Smith +Kari Boulleau +Teklemariam Fabre +Joshua Grechishnikova +Samson Burgaard +Azad Lavanchy +Milos Pavoni +Ashleigh Aissou +Sungdong Willis +Melissa Jovanovic +Kelsey Bludova +Cristiane Forciniti +Alexander Kurbanov +Radoslav Susanu +Dariya Bratoev +Alexander Hansen +Yennifer Haydar +Yonas Farrell +David Ferreira +William Salminen +Ying Marinova +Betsey Cunha +Faith Kim +Kyuwoong Pacheco +Bahar Febrianti +Evgeniya Maneva +Jessica Steger +Jose Banks +Katerin Pliev +Mario Vanasch +Marcin Mihamle +Karlo Romagnolo +Fabrizio Lanigan-O'keeffe +Francisco Lahbabi +Khalil Shi +Stephanie Hansen +Jake Claver +Juan Ananenka +Lieuwe Lim +Birhan Ryan +Kateryna Henzell +Vera Silva +Job Kretschmer +Ramon Kirkham +Boniface Kanis +Dagmara Balla +Liangliang Miller +Victoria Monteiro +Joe Germuska +Shana Halsall +Maris Izmaylova +Zohar Iwashimizu +Nelson Meilutyte +Claudia Butkevych +Diego Shing +Wen Ghayaza +Roel Garcia +Hedvig Alameri +George Rupp +Eva Hirata +Matiss Rosa +Nicola Belikova +Robert Ryan +Xiaoxiang Lan +Jie Tarasova +Benjamin Parker +David Dawidowicz +Gabrielle Lidberg +Zafeirios Ryu +Yaroslava Mehmedi +David Perez +Tomas Kaki +Monika Heidler +Elena Michan +William Bindrich +Salma Cely +Jonas Ciglar +Karen Brandl +Flor Magnini +Dragos Stone +Bartlomiej Marroquin +Ediz Raja +Steven Schlanger +Xavier Hayashi +Joel Giordano +Ashleigh Bruno +Jemma Wang +Glenn Gonzalez +Artiom Engin +Anett Kamaruddin +Fernanda Armstrong +Heather Billings +Slobodan White +Attila Sullivan +Elisa Ouedraogo +Claudia Eshuis +Pavel Lepron +Muhamad Lascar +Dmitriy Liang +Sabine Moffatt +Debbie Mohamed +Colin Vila +Elena Mekic +Vladimir King +Erik Plouffe +Ibrahima Csima +Lena Bithell +Bohdan Kostelecky +Dorian Sankuru +Vladimir Frayer +Ana Pavia +Tanyaporn Mohamed +Yifang Jang +Ka Ma +Zsofia Wang +John Keefe +Jirina Hojka +Daria Schmid +Jurgen Arndt +Jermaine Qin +Thomas Peralta +Iveta Blagojevic +Carlos Liu +Marcel Sigurdsson +Henk Schorn +David Jr +Megan Raymond +Katerina Saenz +Pascal Leroy +Eric Lemaitre +Marion Reynolds +Gauthier Bindrich +Vignir Charter +Shaune Milevicius +Jennifer Marco +Spas Traore +Asumi Colo +Sena Pietrus +Guzel Kahlefeldt +Mostafa Kleen +Sam Tian +Eva Mocsai +Igor Turner +Marta Pyatachenko +Andrew Wang +Ole Suhr +Monika Hwang +Jaime Ramadan +Sinta Denisov +Etenesh Liptak +Jamaladdin Dalby +Adrian Melzer +Akzhurek Whitty +Ivan Hollstein +Dominique Hall +Marcello Mendoza +Jens Lavrentyev +Kerron Bracciali +Olga Jankovic +Konstadinos Sauer +Simon Matsuda +Brittany Brzozowicz +Matteo Verschuren +Anthony Gerrand +Roline Rolin +Giovanni Kovacevic +Jorge Apithy +Suzana Teutenberg +Francielle Ziolkowski +Shinichi Hahn +Soulmaz Zolnerovics +Christos Jo +Layne Halsall +Gabor Palies +Janis Hansen +Grace Williams +Toshiyuki Nyasango +Marc Clair +Mohamed Kazakevic +Jonathan Glanc +Ahmed Sorokina +Zamandosi Chuang +Tiago Gillow +Sandra Kaukenas +Natalya Prorok +Matt Waite +Stanislav Krug +Jimmy Akizu +Jason Hostetler +Sam Scott-Arruda +Mark Arrighetti +Kristine Lynsha +Murray Nurudinov +Jessica Manker +Renata Rasic +Sergey Abalo +Aleksandr Kim +Xiaodong Dulko +Thais Pereira +Elena Costa +Peter Jang +Haibing Salvatori +Maria Kirkham +Jiaxing Bespalova +Ivo Bagdonas +Emmanuel Montoya +Artem Sanchez +Donatien Otoshi +Chia Bleasdale +Josefin Lamdassem +Wenwen Samilidis +Yunwen Crous +Lance Maksimovic +Aleksandar Abian +Nanthana Chen +Maryna Le +Iosif Wang +Dalibor Vidal +Josefin Crawshay +Linus Cha +Nyam-Ochir Yauhleuskaya +Hassan Nichols +Almensh Tuara +Mona Taibi +Hristo Avan +Branden Cavela +Imke Bosetti +Anastasia Gal +Tugba Brecciaroli +Oiana Mirnyi +Simon Zordo +Roderick Huang +Kerron Saedeleer +Kevin Dawidowicz +Laurence Intanon +Xiaojun Lee +Iurii Parker +Paolo Sirikaew +Kunzang Kim +Boglarka Vacenovska +Todd Istomin +Arlene Ketin +Hope Cseh +Szabolcs Culley +Sebastian Iwabuchi +Alexander Mccabe +El-Sayed Prodius +Andreas Soares +Norma Aanholt +Kenenisa Tomasevic +Shara Burgrova +Tsvetana Rogers +Zac Ashwood +Ruggero Dong +Martin Vanegas +Nguyen Barshim +Oleh Chinnawong +Melanie Disney-May +Urska Anacharsis +Rene Antosova +Bruno Tomas +Matthew Chakhnashvili +Feiyi Zavadsky +Sergej Ayalew +Jordan Ndoumbe +Bruno Oliver +Amina Pesce +Keith Pavoni +Xin Cuddihy +Mirco Pavoni +Athina Kula +Georgii Scheibl +Laurence Zyabkina +Laura Assefa +Glenn Liivamagi +Shalane Shiratori +Evi Junkrajang +Roberto Tsakonas +Lihua Ivanova +Mannad Khitraya +Carl Nielsen +Julia Kaniskina +Aksana Melian +Ligia Tancock +Yang Yin +Samira Grubisic +Jennifer Johnson +Stacey Frolov +Natalia Sombroek +Hayley Fischer +Ubaldina Ziegler +Aleksei Rouwendaal +Kenny Faminou +Ida Deak-Bardos +Martin Murray +Allan Liu +Bertrand Nakamoto +Narumi Hoketsu +Seen Flores +Joshua Capkova +Silvia Chaika +Marit Mickle +Jessica Basalaj +Ning Chen +Marta Marjanac +Hannah Jumah +Andrey Kim +Neymar Kaczor +Troy Garrigues +Bebey Rodaki +Fredy Ezzine +Mary Tomashova +Charles Zwarycz +Niklas Capelli +Luigi Marshall +Ibrahima Louw +Alessio Ariza +Kate Bourihane +Tiffany Zeid +Rodrigo Santos +Nedzad Braithwaite +Btissam Brunstrom +Olivia Gascon +Matthew Dalby +Clara Jeong +Thiago Gu +Abdelaziz Durant +Ebrahim Maeyens +Ekaterina Perera +Esref Moiseev +Kristi Melo +Aron Pilhofer +Nicole Shumak +Gemma Gaiduchik +Sibusiso Yudin +Darryl Strebel +Yang Fraser +Nguyen Calderon +Dartey Henv +Iain Hartig +Johannes Willis +Jessica Fukumoto +Annari Simmonds +Maryna Desprat +Huajun Kerber +Barry Utanga +Pui Na +Vitali Oliver +Rosie Golas +Gilles Jang +Jun Podlesnyy +Christa Kvitova +Jonathan Gudmundsson +Pietro Walker +Xin Reis +Pops Terlecki +Xia Lansink +Goldie Marais +Savva Ford +Yahima Menkov +El Toth +Marlene Nicholson +Oleksiy Ferrer +Craig Csima +Ning Knowles +Jur Gebremeskel +Amy Zaiser +Maria Emmons +Nicola Socko +Dongho Jensen +Piotr Rabente +Victor Kondo +Jerome Amoros +Martin Amb +Dilshod Duong +Aleksandr Calder +Iryna Radovic +Marina Neuenschwander +Karolina Brennauer +Prisilla Nakamura +Alyssa Geikie +Geraint Traore +George Gogoladze +Pavlos Castro +Magdalena Kondratyeva +Gemma Milburn +Amanda Kalnins +Raul Baumrtova +Lijie Fowles +Benjamin Bussaglia +Daria Fouhy +Jeremiah Dean +Sofya Mortelette +Eric Sawa +Herve Kasa +Shane Wu +Vladimir Benedetti +Richard Hybois +Kristina Sireau +Adrian Lidberg +Alexis Mallet +Kurt Tran-Swensen +Leyla Szabo +Joao Dovgodko +Antoinette Silva +Risto Bertrand +Jens Seierskilde +Suwaibou Klemencic +Susana Neymour +Tinne Campriani +Rasul Tichelt +George Terpstra +Petra Sakai +Mi-Gyong Chen +George Liu +Andile Li +Vera Frangilli +Anfisa Whalan +Andrea Reilly +Patrik Brown +Kien Mottram +Stephanie Adlington +Eve Pessoa +Mandy Hinestroza +Silke Gallopin +Shugen Elkhedr +Joel Kammerichs +Riki Solomon +Hanna-Maria Bluman +Lisa Kamaruddin +Ahmed Gordon +Wing McMillan +Janelle Ovchinnikovs +Lene Zargari +Peter Wagner +Jan Sandig +Sergey Dahlberg +Kathleen Schmidt +Paulo Seric +Bryan Razarenova +Illse Mylonakis +Simona Skornyakov +Muller Nikcevic +Tino Henze +Mona Colupaev +Yi Daba +Michael Sjostrand +Anna Hosking +Alexey Gille +Henk Mrvaljevic +Sa-Nee Saldarriaga +Jakub Gondos +Kelly Drexler +Steven Stevens +Lina Hassine +Dorothy Abdvali +Carlos Hall +Ryan Welte +Christophe Tanii +Jens Tuimalealiifano +Hamza Tomecek +Maria Figlioli +Apostolos Sharp +Ondrej Houssaye +Diletta Sukochev +Sonia Williams +Lars Sobirov +Emma Chadid +Nanne Maree +Gil Warfe +Mike Bostock +Sinead McHale +Lindsay Savard +Vardan Romeu +Attila Tafatatha +Marina Kim +Daigoro Johansson +Kyung Steffensen +Lena Gasimov +Jinhui Brens +Danyal Achara +Esteban Storck +Igor Kasa +Jolanta Vives +Juliane Kim +Emma Wei +Hilder Zairov +Fateh Kovalev +Reinaldo Mutlu +Georgios Antal +Suhrob Jacob +Miho Franco +Sarah Ogimi +Vladimir Desravine +Alexander Lohvynenko +Tapio Gorman +Juan Lacrabere +Reika Moretti +Hossam Franek +Gerald Afroudakis +Anna Martinez +Wenling Aguiar +Ashley Kukors +Kellie Leon +Ivana Lee +Grega Horton +Nedzad Crisp +Paul Casey +Jamila Rodhe +Rebecca Orlova +Fabiana Kasyanov +Niclas Tymoshchenko +Jere Guidea +Sajjad Ulrich +Bebey Adamski +Lee Farris +Tamara Cafaro +Ravil Ismail +Nataliya Gherman +Olga Kasza +Yoshimi Szucs +Gabrio Dowabobo +Shane Gemmell +Olga Varnish +Teerawat Gueye +Yusuf Riner +Diguan Muff +Bianca Sekyrova +Elena Modenesi +Jan Garcia +Pedro Egelstaff +Valentino Ferguson-McKenzie +Gonzalo Gough +Matyas Lopez +Traian Chen +Cesar Chen +Fanny Castillo +Heiki Outteridge +Katarzyna Calabrese +Christopher Wilson +Anderson Schenk +Justine Ferrari +Takayuki Dundar +Ade Oconnor +Norbert Prokopenko +Tyler Payet +Margarita Ariza +Adam Yumira +Abdalaati Rodriguez +Asgeir Lamble +Nathalie Ionescu +Chantae Matuhin +Francesca Rowbotham +Gareth Culley +Andrei Masna +Michael Yamamoto +Tetsuya Cabrera +Alan Cerches +Roland Scott +Inaki Milanovic-Litre +Didier Munoz +Agnieszka Knittel +Maureen Makanza +Laura Wu +Daniel Silva +Lauren Subotic +James Seferovic +Tanoh Mehari +Daniela Gavnholt +Sviatlana Kable +Kumi Lewis-Francis +Deokhyeon Khinchegashvili +Mohammad Goderie +Francisco Lips +Johnno Listopadova +Patricia Bauer +Matthew Toth +Carmelita Zahmi +Yana Takatani +Kylie Ignaczak +Peter Malloy +Wesley Meftah +Chui Jacobsen +Luigi Luca +Chris Keller +Josefa Zambrano +Jiawei Crisp +Manuel Silva +Nikolaus Milatz +Gesa Su +Daniela Rajabi +Ju Isner +Malek Tomicevic +Ligia Jefferies +Romain Haig +Thomas Aly +Ed Papamihail +Younghui Karasek +Jordis Botia +Christen Gonzalez +Benjamin Kempas +Krystian Pen +Mikaela Iwao +Tsilavina Wozniacki +Kim Milczarek +Tatyana Flognman +Mervyn Mcmahon +Vanesa Hitchon +Zane Cane +Caroline Warlow +Byungchul Bouqantar +Toea Robert-Michon +Aksana Zhang +Paula Botia +Tina Boidin +Keith Beresnyeva +Teerawat Iersel +Andres Deng +Kenneth Howden +Martino Wallace +Yura Motsalin +Tim Han +Jaqueline Shcherbatsevich +Lee-Ann Song +Rebecca Teply +Shuai Huang +Thomas Frolov +Vlado Gu +Amy Kim +Mehdi Li +Maksim Muttai +Carolina Macias +Ferdinand Clair +Kelita Webster +Patrick Navarro +Sebastian Berdych +Atthaphon Starovic +Roberto Miller +Shinta Gong +Isabelle Grigorjeva +Carlos Yakimenko +Pavlo Stewart +Elyes Viteckova +Olga Schofield +Mie Hall +Nenad Blerk +Linyin Manojlovic +Annette Ouechtati +Yu Chinnawong +Candace Nagga +Lina Al-Jumaili +Adam Costa +Casey Mccabe +Mechiel Schulz +Yunlei Xu +Pajtim Nesterenko +Alberto Vidal +Euan Gunnarsson +Matthias Mendes +Marius-Vasile Biezen +Deron Estanguet +Simone Fesikov +Tarek Luis +Maynor Lemos +Borja Rodriguez +Ons Buljubasic +Caroline Ghislain +Kimberley Colhado +Maksim Culley +Khadzhimurat Wilkinson +Shane Dodig +Joseph Nolan +Jitka Mottram +Vanessa Figes +Esthera Koschischek +Jessica O'Connor +Tsimafei Helebrandt +Angel Souza +Sehryne Akrout +Kazuki Leroy +Courtney Bischof +Phillipp Absalon +Dakota Ulrich +Adelinde Mangold +Maria Smith +Tomasz Lanzone +Jana Rendon +Rodrigo Surgeloose +Yura Straume +Aretha Hatton +Ellie Danilyuk-Nevmerzhytskaya +Alistair Baccaille +Timm Augustyn +Davit Nibali +Gulnara Deeva +James Meszaros +Luigi Sofyan +Julia Dovgodko +Nikolina Otoshi +Viktor Santos +Nourhan Benfeito +Crisanto Saikawa +Taehee Bondaruk +Murat Huertas +Emmanuel Hornsey +Khairul Steffen +Eric Silva +Anna Savinova +Liubov Johansson +Andrew Guilheiro +Dipna Hammon +Augustin Lozano +Ilka Macias +Michal Bazlen +Niclas Calzada +Jongwoo Bognar +Dora Veljkovic +Ilona Harrison +Shara Gomez +Jessica Schwizer +Alex Kim +Nikolina Khuraskina +Yakhouba Garcia +Viktoriya Aguirregaray +Job Maestri +Natalie Barbosa +Mohanad Raudaschl +Akvile Saedeleer +Esref Pikkarainen +Judith Williams +Moritz Muller +Pal Amorim +Richard Kaniskina +Austra Bauza +Jane Hornsey +Gia Mogawane +Malek Greeff +Judith Zhu +Mario Husseiny +Carrie Spellerberg +Seen Dehesa +Sverre Dawkins +Raphaelle Batum +Jefferson He +Joseph Bartley +Ryosuke Ciglar +Carles Solesbury +Fabio Morkov +Mourad Nimke +Norayr Toth +Schillonie Benaissa +Vita Eckhardt +Stanislau Dmytrenko +Teresa Kim +Gloria Dean +Rosie Tempier +Denis McIntosh +Roline Camilo +Dion Pavlov +Viktor Rangelova +Andre Shimamoto +Jose Pedersen +Cy Malzahn +Sergiy Markt +Song-Chol Kim +Cesar Qin +Niki Grangeon +Hannah Gherman +Claudia Kavanagh +Carl Roux +Konstadinos Troicki +Tontowi Benedetti +Yutong Olaru +Dragan Murphy +Simone Morin +Docus Muff +Damian Baki +Geoffrey Plotyczer +le Toksoy +Iuliia Oatley +Yauheni Sokolowska +Alison Hayytbaeva +Sven Vandenbergh +Jillian Lalova +Elizabeth Batki +Nicholas Bithell +Oscar Bultheel +Kasper You +Aman Schulte +Robin Padilla +Alexander Filipovic +Spyridon Zhou +Al Shaw +Yasunari Jokovic +Paula Zhudina +Aida Ganiel +Max Lee +Georgina Manojlovic +Rayan Titenis +Allan Melgaard +Aldo Nicolas +Madias Jeffery +Jenny Flognman +Jin Pontifex +Dirk Steuer +Julian Hjelmer +Gyujin Nikolaev +Olga Mekic +Ieuan Zbogar +Dane Montelli +Markiyan Monteiro +Pablo Pereyra +Angelo Uhl +Natalia Kitamoto +Pierre-Alexis Steinegger +Luke Mamedova +Jan Ryakhov +Luca Kipyegon +Gretta Tang +Risa Synoradzka +Mariko Hidalgo +Emmanuel Willis +Giorgia Kleinert +Maneepong Lin +Fabiana Boussoughou +Rubie Sukhorukov +Mitch Trafton +Lucy Nakaya +Sergey Lee +Kum Musil +Manuel Davis +Klaas Wykes +Maoxing Bedik +Blazenko Ostling +Shao Watt +Esther Robinson +Jinzhe Trinquier +Simon Franco +Wendie Spearmon +Matteo Goncharova +Tatiana Naby +William Vicaut +Peter Sloma +Pietro Warfe +Elisabeth Santos +Shane Lima +Agnes Vasina +Michal Rochus +Guido Kanerva +Zachary Schelin +Ekaterina Thibus +Hugues Kim +Sarah Kozlov +Alexander Jiang +Adam Moreno +Valentyna Townsend +Huajun Oates +Hedvig Crain +Kara Vougiouka +Arnaldo Abella +Maroi Tatham +Anastasiya Jebbour +Julien Buchanan +Irina Camara +Igor Martin +Jens Biadulin +Thiago Rosso +Jemma Mayr +Raghd Ikehata +Georgina Issanova +Errol Benes +Eun Honrubia +Ardo Mastyanina +Edwige Henderson +Virginie Zhang +Vincenzo Moolman +Jos Oliva +Maksym Castillo +Shijia Conway +Sanja Kusuro +Vasilij Blouin +Chia England +Joel Scanlan +Peng Masai +Magalie Allen +Astrid Kusznierewicz +Lulu Maguire +Yoann Gentry +Nataliya Lippok +Kathleen Jo +Lara Siegelaar +Silvia Wambach +Yana Elmslie +Alise Bellaarouss +Tim Csonka +Antonija Dilmukhamedov +Lyudmyla Dilmukhamedov +Desiree Khachatryan +Stijn Choi +Hagos Hassler +Gal Pascual +Hector Moutoussamy +Connor Touzaint +Alejandro Velasquez +Ekaterina Hernandez +Craig Galvez +Aleksejs Collins +Konstadinos Houghton +Vladislav Sivkova +Srdjan Stein +Tina Teutenberg +Kirsten Wang +Marcin Desta +Madeleine Mitchell +Mirna Seck +Alexey Guloien +Azad Honeybone +Clarissa Skydan +Erina Cabrera +Vincent Lawrence +Nadezda Plouffe +Ji Stewart +Denis Rezola +Jun Szczepanski +Taufik Toksoy +Daniel Worthington +Gia Yoon +Asgeir Dzerkal +Zengyu Driel +Charles Wang +Abby Cooper +Louisa Tomas +Mariusz Yang +Ediz Gorlero +Woojin Nazaryan +Christina Vesela +Alan Mestres +Danilo Chabbey +Sultana Angelov +Ancuta Emmons +Fetra Shemarov +Jean Andrunache +Jack Garcia +Niki Batkovic +Sin Cambage +Vincent Girke +Rebecca Simon +Westley Tatalashvili +Francine Beaudry +Sofiane Satch +Jessie Vlahos +Saheed Durkovic +Lankantien Kristensen +Aya Rakoczy +James Aniello +Yawei Fourie +Damian Kim +Pawel Jensen +Citra Comba +Vasyl Geijer +Mihail Flanigan +Dino Aicardi +Petr Smith +Dmitriy Bartman +Zara Jung +Sara Jeong +Rudi Noga +Rauli Schlanger +Tyler Belmadani +Dorothy Rossi +Evi Fang +Kim Estrada +Nathan Nishikori +Daniel Verdasco +Dorian Taylor +Alice Liu +Katerine Podlesnyy +Vincenzo Kermani +Blair Wei +Patricia Guo +Torben Jaskolka +Michal Chatzitheodorou +Andrew Negrean +Zhiwen Wu +Emily Chow +Viktor Steffens +Enzo Balciunas +Katharina Mizuochi +Jiawei Koedooder +Amy Mizzau +Marcin Guderzo +Fortunato Asgari +Louisa Bassaw +Silviya Saholinirina +Shota Michta +Haley Deetlefs +Bill Turner +Brian Boyer +Timea Nus +Radoslaw Sze +Elodie Arcioni +Jonathan Cornelius +Yun Milevicius +Nicolas Dotto +Matthew Helgesson +Edith Sofyan +Riccardo Cheng +Soslan Fernandez +Amanda Ndlovu +Leryn Henao +Elisabeth Wukie +Sabrina Burns +Rachelle Roleder +Laura Neben +Eric Rolin +Kelly Kulish +Huizi Accambray +Milena Hall +Jong de +Michael Houvenaghel +Samir Panguana +Christina Maneephan +Alberto Gryn +Roland Deak-Bardos +Louise Mrisho +Njisane Arkhipova +Line Emanuel +Yohan Miljanic +Won Davison +Alexa Loch +Milos Blazhevski +Jana Yudin +Jackelina Gadisov +Trixi Niwa +Pedro Harper +Zi Stanning +Matti Othman +Xavier Cox +Jinzhe Aubameyang +Jonelle Ayim +Lankantien Parker +Rasmus Honeybone +Adnane Srebotnik +Adam Hatsko +Josephine Caleyron +Lizzie Sheiko +Aleksandrs Castellani +Luis Gascon +Byron Lezak +Dragana Yonemoto +Mark Skudina +Kasper Addy +Aniko Ahmed +Nilson Belmadani +Sergey Leiva +Jianfei Erokhin +Simon Stepanyuk +Tomasz Gkountoulas +Aleksandar Sandell +Hotaru Terceira +Joshua Fenclova +Yang Conti +Stsiapan Kaun +Karim Kuczynski +Kurt Sano +Beatriz Smock +Sabina Williams +Hyo Ponsot +Sergey Britton +Mateusz Yi +Diego Connor +Ruslan Filho +Aleksandar Fasungova +Claudine Baltacha +Andja Gabriele +Marcus O'leary +Wael Li +Tatyana Bernado +Xiaojun Hachlaf +Ranohon Montano +Simone Brathwaite +Svetlana Janoyan +Tina Ortiz +Ivana Grubisic +Christina Illarramendi +Gabriel Langridge +Mclain Rakoczy +Ferenc Aydarski +Gauthier Alimzhanov +Reza Hoff +Artur Darien +Reid Demanov +Sergio Modos +Mizuho Suetsuna +Marcin Cash +Nicola Saranovic +Maria Yim +Salima Nakano +Annika Wang +Sviatlana Zucchetti +Christopher Stafford +Xiang Wukie +Mohammad Li +Bernardo Thompson diff --git a/tests/sh/teacher/mystery1/streets/Buckingham_Place b/tests/sh/teacher/mystery1/streets/Buckingham_Place new file mode 100644 index 00000000..0dc571cc --- /dev/null +++ b/tests/sh/teacher/mystery1/streets/Buckingham_Place @@ -0,0 +1,300 @@ +one earthlings startles invitingly pall +headwaiter mate impregnability +unmake drainpipe utilities pointillist +apropos impressively forborne finite exempt +griming vised thankfully burlap hypertension +landsliding landfill furlong mittens heartland +bully tortoise enlargers roamed undressing +yuks troubleshooting seaboards +springtime deaves reinitialize puttying +densities warranties penultimates dehumanizes perorations +untangles stays smashing spinets breadfruits +granulating toreadors finishes knob headhunter +longhairs pennyweights womanizers +depressive overused disturbs glandular pillowed +fallibly proportioning settling jumpier +vagueness lethal alienating potted +immortalizing parfaits ignited malnutrition +feisty senseless manly fifths tailspin supposed downstairs +ringer drainers agiler pinholes reedier +meekest revolvers gobblers panelists unassigned yew butterfly +nuts singsonged writs arm dimness +bearing shags kleptomania sprinted barkers +augury bullied letups shimming filmy golds +thunders forbid snowflake unstabler moralist +torrential attributable poniards newsletter stealthier +breastplates bundled nationalization +invaliding fitfully figured keystones +misdoing unplugged newspapermen grandstand +shrouding pushed botanists pivots domed +mealier formerly trivet avenues flukey humorously +twofold sniffling misdoes intros bookmarked +subordinated amateur ambition tarpons fluttery +gassier soldiering irritant wavelengths wriggling +tarots gruesomely pair minks enrapture +stupefy dukedoms emanating manikin enshrines +freaky meditated paginating suddenly farewells presentations +darted sizes tartly meddlers startled +strong love thumbnail aquifer samurai +parleys mobilizing repertoires sanitarium punts +entwining inkier exterminate remission purblind +inflammations resist impedes lighthouses allegro +additions pantomiming wrongdoing natives elusive opals +finagles assaying raving primmest libel repairable +gallbladders dismissed girders waxworks tenderly feasibly +temporaries peephole whams faultfinding metabolizing +floor huddles refinish flattering swamped +levied whets undersign bestiary +auras kite presumes toasty pair loping revelled teas abnormally +reality polarized preferably nominated +pawnshops bootie pealed violist haulers haled +palmettoes waste spot soggier annulled +steak shrews gunshots foregone kneel +inlets bran maraud salts hemmed +poniard mangled dither humblest demitasses proprietary +augury telemetry starlit landlubbers +portrayed battleships orderliness salver forming grits +alleyways disowning blogged argosies +supervisor adored unequalled dangle nonreturnables +sixteens defaulted bandoliers turtledove +gearwheels junks endlessly wear internship timidly maxim +waver windbreaker sunken disguising importations +shoots smoggiest lifestyles journeymen +reffed raft futzing dagger surrealism +unsupervised disrepute ingeniously annul divining +expressing rib snorted hexagons sway sharing neurosurgery +frazzled leaving aqueous stigma punning psalmists +desirous devaluation pudding alight squealed +marital unsubstantial peasant drying bee agglomerates +hansom methought adapts muezzins relish +eastward maydays gondola burger abstains predetermined gated +ornithology unarmed godfather roomer penises primitives +slumber ether mender edgy underhanded ablest affirmatively +sex barbershops leotards bobolink hormonal sump +indubitable yardages felons unquestionably versifies infinitesimals +aliasing inhibiting originally synthesizes +perjuries goblet pasta moves farrow urged dotes fluffs +liberals indentation horns erosion harrow snowstorm emulator +pretending expiation imperialist overdresses +bookmakers analogues dittoed effigy thunderheads +employee wafer pessimist alleyway envisages +orderings bedbug employ muskmelon benumb +shards ominous bawl worryings refills animators soften +merrier vanadium provides medleys obstinately summoner +fold swoons grievously dismantles +unbroken hothead jessamine yolk loath rake +bludgeoned inflationary dowdy fingers saunter +great diminutive puffiness bankbooks +insolvent more balms millions mommy river sullenest +intertwines obeisant gallon blame tub seeking firsts +lingered populates naughty galvanizes postulated +frailest shin wrestle faking goddamed allergist minute lobotomies +thrower industriously idolized unabashed understudied +shaking refereed mullet harmfulness hasp +tubeless irretrievable transits underwrites drainage +renegaded bilk gearbox expertise away beating +rapt preventative freedman trouts insulted peopling pales +earnest blabbing prohibitionist deserts runway +patents idiot marvel deadens shad sluggers essay talkative +sneer lows sidled sparingly ink geranium lighthearted +boudoirs merry juniper while liquifies phobias goad peanuts +hesitating inverse nighttime +loosely impish threaded formlessness signet +knotted pursues sightseer history software +admonishment underskirt speedway deviate fags +sandblasting plodding faggots grungy eventuality +workmen extemporaneous espouses straitening laxatives +harangue summing binderies membership +huskies sidesaddles restoration tawdriest gazillions +liven delimit jibe profited butterfly faithful +iodize wheezier ministration hotbed rehabbing nuzzle +esquire swallows smelly grounder shimmering sharpers hexed +legionnaires workdays rinds personality +governor floury earrings overusing +winsomer falsity paradigm rows wiry alas worship +spears goaded took despaired betrothal mink doled penetrative +ingot tasting uprights barks sottish troubleshooter +persevere ping deafening kisser innovators +gaudier noiselessly glamorously quasar beeping yesterdays +spinal klutzes yeastier initializing +foetuses brews blunderbuss emitting +hillier streak opines retirement straightedges nontransferable +mending envisions gizmos drags finnier wildest +adder malingerers euphony antiphonal departs spitfires +hypes dye illuminations disablement +sender waned bottomless saintlier lades plethora +shenanigan larynges penguin heatstroke +steins exiles underestimating guts billet flabbergasting +sieges flawlessly serialized kippers +enfeeble weathered bedridden liquidations +flints winners unfairest damaged +partnered pilaws hogs pluming avenge +tanker forwent sag pheromone snowdrifts syphons +mimes mountaineers exalted disfigure shelves nimble +flusters derivable potato establishment +regimen betterment sarape misused balladeer pilling +besiegers whitens dinky stupid +kettle borax partnering preppiest +fisherman dappling mustier fobs figuratively orthopaedists +jumpiest tundra hybridizing +inexhaustibly thrower metaphors intones slanted +insinuated garrison prettifying attests +stemming shrewdness prigs workweek feebleness abiding distrust +sternest rowel debater peas adversely enshrouds +premiss nowhere billion gatherings fetid traded +misappropriation donations printers +dethronement holler spurned divisors +reverts plaza obsequiously permutation +grandpas tyrants metastases personae hauler eyelash +outrage shelters soured surlier metronome moonlighted +mailmen maneuverable mattered seeding dehumanizes +spiniest dents weightless kookaburras misprinted disorders +intermediary selling jersey polymaths empathizing +doubling peaked owlish byline levitates suspense relabels +autumns wiping dhotis damming twentieth proportion +potentate bribes rifer moderate verbena desire framing +twaddle polite pretext mazourka situated +bilking darling tempera stresses earmarking +breezes fretted exhumed fertile +vineyards gingerbread ridgepoles helixes +deal heppest malignantly tallest ebony +flexible espressos prioresses linoleum deposed tourism +sophomore filtering prostitute wasps +parboiling sine rain unprofessional +surrey mudslide brilliants planing derail wilder +environmentally professor frenzies trolled +watermelons garrisoning imprisonments typified +busied besetting founders flurried state trill +hyphened flashiest advertise byline patrons fighter goldsmith +sightread teazles footfall washbasin molesting +grainiest lobbing shrouded largest jump geometries +eluded sophism stages pertly sewerage biplanes maturer travelogs +fords plaque droned spars misleading sunburn +serenely shits dialyses roistering registrars pointillists +bales napes warts mammary referrals fisherman training +panting battalion greedier allergens orotund +headers badge bullhorn agglutinating bearable +analogs departing anguished nylons +whitewall napkins overheats embittering grimmer beamed +SEE INTERVIEW #699607 +festoon dispenser kidder odysseys spoons buttonholing +arguably manse lessened logging pasts +holler burg spotlight quadrupeds glitzy froths harmony +bashfully blotter bushy prettifies +invent baseness heave flunking temerity +noose harms grebe attributively ruling +swat reissues founts envy gingko nuzzled albums +pippins deathblows hounds voodoo buffed +politer volunteers overtaxed quoted bakery +mute jasmine imbues pejorative implementing +flooded immortal rebuking enthralling +value bebops brasses mono toileting +kindle ghostwriter moodier original abridging +palliation fumbler elapsing marauders honorariums +invaluable sauntering spuriously phalanx marry plights +blameworthy bandages gentlemen playboys rosebuds +norms masterminding milkier demoralization leaven disallowing +supersedes ambivalent dearness organizational +sinks resemble noisiest peppy feedbag +wrapper grotesquely importunity retrograded struggle deviling +stymie gangrene rapine nevermore digested whirling +freshets adverbial addles amalgamating forest informants +motorboats sadism drouths swaggering foursquare ermine +paperweight pub pitied yearning reeving +polish penes tortoises immaturity trellis timetabling +horsehide putting raved meditate inertia thoughtfulness +savaged saviours disburses tonsil +bind ruffle mausolea enjoined whiskeys dozen tomato shortsightedness +hampering artworks jehad manifested +buffing peeking dart roils omission trumpery +kippered fruited snuffled unmitigated mansards spies +dumpster relate meadow hands boardwalk kites +takeaways goatskins detail ogre spurs +ruminant piggish fiesta remodel +nonstop suggester mess wheedles denied enjoyed +dishtowel ponytail spotlessly barman +blindest arraignments showroom provably +manful mandrills gangplanks glandular +manganese futurities suffragette +metamorphosis bounders leeriest hyperventilated waterfall +pitiable tarragons interring drawl +emotional reexamined revelries slipperier forwarding potentates +outliving suspending stippled hesitates rosary aliased +expatriated delivered quintuplets +razors assortment sparser yews +relabeled snoop resales hornier berets squeezers +jinn guttered untreated vegetarian waterspouts +broadest ashes piquant oftenest nether sheering surrounded +stewarding tanner foghorn repasts orders +weer badmouths rape lug utter donkey +gybing veered rely metering harmfulness bombshells +peeps regressing pasture skywriter +proportional trio gelled shivery inferiority +leaflets pilgrims guileful inflates playfully tarpaulins +ugh pompons simulate numbers martyr introverts aerie urgent +stage powering ermine enquire merrier stalker +undoubted urban illumined flotillas downtrodden gelatine +abbreviated skiers grumpy attesting gals roil +synthesizer tared dungarees headlights pluralities module +preponderating skylarks lawyer swordsmen stupefying motliest +upstream garnered sprightlier explodes intervenes drawings +antitrust brandies railroads toenails inveighs +laded gives quibbler nonplused parliament meadowlarks +dandled snafu angiosperm hamburgers adverser snowfall +dogmatism jousts bullshits esquires observable +request tended reported rhapsody grandstands +fantasied wonderlands mutually tiptoeing misdeeds +endue liquidation tinging redistributing +studied predisposes gauges agenda airfoils +himself reformation twenty types rotundness file blearier +jokers sharpest hookahs zinged shutting bestowing +linkage brothel faggots lisp runway relation harboring +plurality gazette lively impostures youngest +refunds supported headroom trekked outtakes interrogation +fashionable inhibits trumpeting pizazz +semimonthly shuddering signer roughshod +epitaphs stales dipper debarment wader +marinades flashily dispossessed +segmenting examine appoints granddads molt four monorails +gibe aspirating vulgarities fetishes lenses +extroversion vibrantly lubbers kiss haw +exult enslavement mutuality maturities ousted +arson hogwash tush bouquets donor disrupting landsliding +furtively rhapsodies inky laddered wringing rosebud +limpid hobos shimmering relying +likewise inquests kid pinnate insignias journeys +greyed hewing surtaxing hydrology transfigures horded +suborned whirlpools hobnails aligning agent logotype +hatefully homeopathy riskiest ilk flagpoles burglarizes +sundown delphinium normalized +amnesties trellising rolled misrepresentations +avast hankerings abominates sloughing +heartrending bullish removers fraternity dignified +mettlesome prowlers beautiful manager lollygagged +suburbs donut gunrunner supports denotes seraphim polyunsaturated +origination longevity snowballing foretasted sunlight obliteration +slipping tranquillizers perfumeries +disaster titled mitigated inseminates populating +thirsty burros disproved damned validate +hookworms what magpies weeknight lolls mixing +dragooning stipple gangway leafletted +possibles downfall inspire lobbies +substituted nightshirts delimiters hereof ulna benumb +hilltops beeped apologizes ties skewed fate +needles weekending provisioning emended transfusion +rifer pipers dogfish strafed stereotyped +junked wooer vaulters sodium dynamism +looting goodbys tweets uniquer bibulous lodestone +hospital gnarl fathomless barrings implies manners tunneled +debasement loathsomeness tabued wraith +shout shed telepathy reparations filthy brandish +instrumentalists fatally tattooists anonymity biography +prostrate refill dreads belaying +riposted adaptive bawling applauding mushes toileted sleazy +juggernauts leis downstream dismounts propriety hit +rite boogies argument shampooed semitone dork +voluntary ravages draftier purports +disproves uphold randomized flexes reassures snoopiest +quadruple hampers assureds blindsides blab pay woodmen motivations +daydreams jalopy remarking engraves +quasars delineate blanket unstudied hoax skiff diff --git a/tests/sh/teacher/mystery1/vehicles b/tests/sh/teacher/mystery1/vehicles new file mode 100644 index 00000000..cdfd17f6 --- /dev/null +++ b/tests/sh/teacher/mystery1/vehicles @@ -0,0 +1,31 @@ +*************** +Vehicle and owner information from the Terminal City Department of Motor Vehicles +*************** + +License Plate L337QE9 +Make: Honda +Color: Blue +Owner: Erika Owens +Height: 6'5" +Weight: 220 lbs + +License Plate L337DV9 +Make: Honda +Color: Blue +Owner: Joe Germuska +Height: 6'2" +Weight: 164 lbs + +License Plate L3375A9 +Make: Honda +Color: Blue +Owner: Dartey Henv +Height: 6'1" +Weight: 204 lbs + +License Plate L337WR9 +Make: Honda +Color: Blue +Owner: Hellen Maher +Height: 6'2" +Weight: 130 lbs diff --git a/tests/sh/teacher/mystery2/interviews/interview-010101010101 b/tests/sh/teacher/mystery2/interviews/interview-010101010101 new file mode 100644 index 00000000..7b7539fa --- /dev/null +++ b/tests/sh/teacher/mystery2/interviews/interview-010101010101 @@ -0,0 +1,3 @@ +Interviewed Ms. Church at 2:04 pm. Witness stated that she did not see anyone she could identify as the shooter, that she ran away as soon as the shots were fired. + +However, she reports seeing the car that fled the scene. Describes it as a blue Honda, with a license plate that starts with "L337" and ends with "9" diff --git a/tests/sh/teacher/mystery2/memberships/AAA b/tests/sh/teacher/mystery2/memberships/AAA new file mode 100644 index 00000000..3ed48cb0 --- /dev/null +++ b/tests/sh/teacher/mystery2/memberships/AAA @@ -0,0 +1,1304 @@ +Courtney Yankey +Robert Mothersille +Akvile Saedeleer +Daniel Hayashi +Roel Garcia +Vladimir Khousrof +Maung Cammareri +Al Shaw +Meagen Spellerberg +Thais Mihalache +Habibollah Smith +Mirna Seck +Margaux Jung +Snjezana Hostetler +Hanna Shaito +Sergey Barachet +Amine Lin +Thierry Ortiz +Mirac Ariyoshi +Tina Imboden +Jayde Madarasz +Yu Sakaguchi +Kaori Donahue +Lesley Bithell +Celeste Lapi +Marie-Andree Dalby +Carlos Dyatchin +Fabiana Boussoughou +Laurence Zyabkina +Gideon Kowal +Yasser Pannecoucke +Kayla Kim +Felix Verbij +Jolanta Vives +Emanuele Hussein +Jens Lavrentyev +Andrea Reilly +James Rosic +Daria Palermo +Maria Arismendi +Kelly-Ann Sundberg +Caroline Denayer +Shuai Muttai +Wallace Mejri +Kevin Giovannoni +Tianyi Boughanmi +Chia England +Lina Tjoka +Hovhannes Piccinini +Andriy Hrachov +Maja Orban +Iaroslav Jakabos +Hakim Svennerstal +Hamza Tomecek +Shane Wu +Niki Grangeon +Hyok Martinez +Roderick Nagai +Filippos Sinkevich +Danilo Chabbey +Kami Shabanov +Muradjan Maeda +Reza Egelstaff +Annamaria Yi +Dmytro Arms +Michal Jakobsson +Christin Brown +Shaunae Stoney +Nicolas Carou +Mathieu Pigot +Lukasz Rodrigues +Wouter Brennauer +Hamid David +Lauren Johnson +Guido Kanerva +Tina Lim +Marcia Amri +Konstadinos Voronov +Shana Halsall +Nanne Maree +Katya Kindzerska +Haojie Fernandez +Wesley Meftah +Inaki Miller +Marianna Ford +Kay Kouassi +Simon Martinez +Antonia Gercsak +Ardo Mastyanina +Austra Sekyrova +Guilherme Latt +Andre Takatani +Grainne Ross +Edwige Henderson +Odile Green +Koji Miyama +Ka Ilyes +Sarolta Michelsen +Malek Tomicevic +Viktor Santos +Nikola Zhang +Raphaelle Batum +Bianca Coleman +Selim Tregaro +Azusa Perkins +Melissa Guell +Irina Treimanis +Viktor Bielecki +Artur Teltull +Giovani Alflaij +Katarzyna Talay +Gabor Hochstrasser +Zsuzsanna Hodge +Carole Pyatt +Bumyoung Soares +Yawei Fourie +Shara Green +Priscilla Chitu +Beth Andrade +Leah Driel +Juan Shankland +Timm Augustyn +Linda Lotfi +Erasmus Flood +Cecilia Clapcich +Gabrielle Tikhomirova +Tinne Campriani +Raul Makanza +Arianna Lauro +Nicholas Bithell +Tamir Fazekas +Traian Chen +Rebecca Janic +Anett Kamaruddin +Kyle Koala +Peter Zyabkina +Asumi Colo +Stephanie Comas +Andreas Sinia +David Yaroshchuk +Henk Lee +Alex Kim +Anton Dlamini +David Male +Tilak Costa +Salima Nakano +Jorge Wilhelm +Urska Fijalek +George Gogoladze +Luis Petkovic +Almensh Zbogar +Inaki Milanovic-Litre +Carlos Mellouli +Natalia Benedetti +Jacques Ramonene +Jonathan Munoz +Laura Helgesson +Miryam Dunnes +Aries Coston +Anthony Kudlicka +Shinta Gong +Ivana Grubisic +Judith Williams +Lauren Subotic +Kevin Okori +Attila Sullivan +Ivo Bagdonas +Klaas Wykes +Jack Shafar +Fanny Castillo +Jamale Fu +Jongeun Kabush +Vincent Krsmanovic +Thomas Grubbstrom +Kobe Driebergen +Annabel Church +Hajung Cardona +Endene Samsonov +Aretha Hatton +Leandro Schuetze +Daniel Loyden +Rene Marques +Hassan Nichols +Ronja Marroquin +Glenn Liivamagi +Mohamed Silva +Rushlee Krsmanovic +Viktor Rangelova +Mebrahtom Fields +Darya Wu +Martin Mozgalova +Deron Estanguet +Olga Lobuzov +Niklas Donckers +Constantina Nagel +Kristina Walton +Joe Germuska +Adelinde Mangold +Benjamin Kempas +Andela Meauri +Levan Ingram +Marcin Dyen +Bilel Lazuka +Aleksandr Holliday +Kylie Ignaczak +Mohammed Sakamoto +Cian Purnell +Hope Cseh +William Polavder +Alberto Vidal +Martin Strebel +Brittany Askarov +Haakan Okrame +Sutiya Kida +Sibusiso Yudin +Stephanie Adlington +Gilles Zhang +Ivan Edelman +Rattikan Prapakamol +Yassine Bazzoni +Vaclav Mustapa +Konstadinos Houghton +Jan Gramkov +Sabrina Burns +Andreas Okruashvili +Tyler Borisenko +Nicholas Kudryashov +Lieuwe Lim +Luis Grand +Lynsey Bailey +Ling Langridge +Marc Ivezic +Scott Klein +Yumeka Cipressi +Jong Borysik +Lucia Price +Jangy Scott-Arruda +Monika Heidler +Gia Yoon +Rebecca Simon +Gabor Palies +Patricia Zhang +Sebastian Bayramov +Jarrod Kovalenko +Thuraia Voytekhovich +Par Awad +Sanah Ye +Alana Thiam +Apostolos Sharp +Anfisa Whalan +James Seferovic +Lyubov Gunnewijk +Sergey Abalo +Nick Osagie +El Rooney +Kevin Jeptoo +Natallia Sidi +Ekaterina Hernandez +Hui Ahmed +Louis Zhou +Agnieszka Iersel +Ling Kromowidjojo +Corine Kashirina +Joanna Ayvazyan +Lisa Peralta +Yige Rhodes +Ferenc Aydarski +Zac Ashwood +Paul Tsakmakis +Peter Wagner +Kamilla Rietz +Tina Ortiz +Christopher Philippe +Marcus O'leary +Fantu Nikcevic +Aldo Nicolas +Raissa Araya +Melaine Souleymane +Alexandr Liu +Luigi Marshall +Jehue Wild +Lyudmyla Dilmukhamedov +Francisca Mocsai +Cory Munoz +Ancuta Emmons +Xiaoxu Cardoso +Lucy Miller +Alex Nichols +Irene Russell +James Siuzeva +Aleks Eisel +Keith Pavoni +Jayme Suarez +Anna Hosking +Viktor McLaughlin +Ainhoa Taylor +Jaime Zhang +Thomas Antonov +Crispin Terraza +Omar Atkinson +Yulia Hostetler +Viorica Schwarzkopf +Mostafa Kleen +Debbie Mohamed +Coolboy Tian +Marin Absalon +Marjo Janusaitis +Luc Reyes +Marouan Ilyes +Jorge Lambert +Gilberto Bergdich +Christopher Gkolomeev +Pascal Davaasukh +Jennifer Medwood +Yadira Marghiev +Inaki Murphy +Sonata Raif +Joshua Capkova +Iuliana Costa +Bruno Szarenski +Natalia Kim +Lubov Begaj +Maria Steiner +Jakub Gondos +Richard Cremer +Kanako Zhang +Bashir Krovyakov +Shuo Emmanuel +Bianca Sekyrova +Iker Franek +Lucy Perez +Casey Hardy +Tian Abdvali +Daniel Verdasco +Mikhail Polaczyk +The Joker +Richard Timofeeva +Dilshod Allen +Aleksandar Atafi +Yifang Narcisse +Sonja Ide +Miranda Mulligan +Craig Jaramillo +Joyce Broersen +Jun Zhudina +Marcus Lahbabi +Michael Hammarstrom +Yage Bruno +Emma Celustka +Takamasa Kasa +Danila Henao +Ayouba Carrington +Roc Bari +Hyok Maciulis +Nathan Zhang +Nazmi Patrikeev +Conrad Ji +Diego Smith +Beatriz Nooijer +Chia Bleasdale +Carine Karakus +Rene Chen +Damir Hendershot +Rahman Carboncini +Hakim Nyantai +Carla Anderson +Tatyana Mitrovic +Viktor Michshuk +Jennifer Athanasiadis +Benjamin Bilici +Xavier Hayashi +Renal Boskovic +Krista Dai +Martina Voronov +Zara Jung +Lauryn Bae +Mechiel Maric +Mahmoud Hession +Rafal Sidorov +Claudia Platnitski +Dorothy Abdvali +Marcin Cele +Todor Hernandez +Dirkie Yun +Tina Teutenberg +Marko Baltacha +Christopher Shubenkov +Hannah Barker +Sarah Zaidi +Keri-anne Kauter +Sajjad Ulrich +Joseph Lin +Mario Boninfante +Gonzalo Mirzoyan +Nikolina Khuraskina +Rand Fanchette +Aoife Pyrek +Fateh Kovalev +Xiangrong Palmer +Adrienne Buntic +Novak Solja +Luciano Ahmad +Ravil Mokoena +Gulsah Makarova +Jemma Mayr +Nazario Barrondo +Ryunosuke Hagan +Paul Khadjibekov +Tarik Atangana +Ellen Liivamagi +Michael Hultzer +Maksim Chibosso +Kristina Munro +George Matsuda +Fabio Truppa +Rosie Rapcewicz +Joan Fudge +Irina-Camelia Wilson +Nathalie Ionescu +Rhys Faber +Dobrivoje Mogawane +Ferenc Savsek +Mercy Brusquetti +Ayman Kaliberda +Francisco Irvine +Nadiezda Catlin +Kevin Zavala +Jelena Febrianti +Huajun Kerber +Jong Stoney +David Rossi +Zied Rumjancevs +Szabolcs Culley +Lisbeth Savani +Yu Chinnawong +Marvin Peltier +Atthaphon Starovic +Antoinette Silva +Jose Paldanius +Glenn Gonzalez +Artem Sanchez +Thomas Doder +Sarra Bainbridge +Paola Tai +Carolina Wang +Siham SCHIMAK +Inna Yu +David Schuh +Jade Kopac +Tyler Marennikova +Byungchul Lee +Edino Fuchs +Erica Nakagawa +Caroline Warlow +Yasemin Cavela +Fernanda Purchase +Christos Jo +Rebecca Gao +Petr Waterfield +Ana Reilly +Olga Jones +Shuang Cabrera +Stefan Li +Todd Kalmer +Rubie Sukhorukov +Larry Lapin +Ariane Nazarova +Christophe Tanii +Christina Petukhov +Mojtaba Polyakov +Petr Schiavone +Teresa Jing +Charline Chen +Xin Cuddihy +Anne-Sophie Gustavsson +Aymen Bespalova +Silvia Konukh +Kenny Faminou +Mervyn O'malley +Irada Velthooven +Sheng Romdhane +Olena Krsmanovic +Suzanne Viguier +Aleksandr Rutherford +Jane Paonessa +Nur Beisel +Katerina Riccobelli +Errol Benes +Clemens Mulabegovic +Gundegmaa El-Sheryf +Minxia Yu +Boniface Kanis +Gonzalo Pacheco +Brady Ruciak +Sverre Dawkins +Soufiane Odumosu +Liam Maley +Michal Bazlen +Clara Jeong +Mathew Phillips +Ihar Radwanska +Marquise Mohaupt +Lorena Marenic +Timo Caglar +Katie Park +Davit Asano +Rosie Fredricson +Sofya Mortelette +Ibrahima Louw +Peter Ochoa +Veronika Erichsen +Lauren Janistyn +Seoyeong Montoya +Radoslaw Sze +Alexis Diaz +Marina Ma +Francesca Rowbotham +James Yallop +Roberta Callahan +Valerie Penezic +Duhaeng Agren +Zurabi Lunkuse +Kristina Sireau +Limei Ioannou +Zicheng Bardis +Jennifer Marco +Sergej Yli-Kiikka +Marisa Rocamontes +Shuai Sudarava +Ryan Pota +Milos Pavoni +Elizabeth Cheon +Jan Merzougui +Anderson Guo +Athina Kula +Tavevele Kelly +Slobodan White +Zara Luvsanlundeg +Jinhui Brens +Didier Munoz +Katerin Pliev +William Vicaut +Ahmed Elkawiseh +Alexandru Govers +Meiyu Iljustsenko +Gal Pascual +Mona Colupaev +Maria Drais +Chana Borges-Mendelblatt +Krista Coci +Matteo Nieminen +Nicholas Howden +Helen Cheywa +Kasper You +Taoufik Geziry +Aleksei Rouwendaal +Stefan Noonan +Juan Kim +Werner Totrov +Michael Gigli +Heiki Outteridge +Petr Vicaut +Jade Jallouz +Rares Hsing +Agnese Bartakova +Ryosuke Ciglar +Ewelina Safronov +Yuliya Gomes +Michael Sjostrand +Yuderqui Mrak +Niki Batkovic +Kristina Hochstrasser +Timothy Francisca +Joao Ziadi +Iain Kossayev +Andres Liu +Lauryn Fujio +Murilo Rohart +Jarmila Hallgrimsson +Stefanie Thi +Adonis Kitchens +John Keefe +Alberto Bauza +Sultan Wilson +Tomasz Lanzone +Kamila Sakari +Darae Elsayed +Joseph Last +Carole Adams +Lina SCHIMAK +Alistair McGeorge +Madonna Kim +Jaele Sharp +El Toth +Sarra Larsen +Elea Li +Junjing Kang +Jaime Bruno +Carlos Hall +Kurt Tran-Swensen +Anabel Dominguez +George Fuente +Ibrahim Seoud +Line Emanuel +Christian Brata +Kanae Uriarte +Artur Munkhbaatar +Pawel Jensen +Hui Akutsu +Jemma Wang +Kate Bourihane +Nikolaus Milatz +Irina Song +Raul Baumrtova +Endri Clijsters +Jitka Tranter +Radhouane Klamer +Zamandosi Chuang +Lina Hassine +Gabrielle Raudaschl +Ingrid Papachristos +Vincent Lawrence +Robert Choi +Mizuho Suetsuna +Hang Slimane +Omar Hurst +Eva-Maria Speirs +Alena Davis +Zhe Hochstrasser +Katrien Na +Pavlo Stewart +Adrienne Kreanga +Paul Kitamoto +Josefin Lamdassem +Brendan Mendy +Grigor Suuto +Teresa Kim +Jiao Faulds +Iosif Wang +Charlotte Kachalova +Sally Fuamatu +Johan Arvaniti +Sarah Dovgun +Tapio Gorman +Mhairi French +Tamas Guo +Olha Lewis-Smallwood +Dmitriy Montano +Rodrigo Burke +Peng Kim +Chia-Ying Djokovic +Rodrigo Santos +Mai Csernoviczki +Asier Filonyuk +Ali Jallouz +Zamandosi Flood +Jianbo Janikowski +Ka Caulker +Kristian Surgeloose +Matias Tait +Mariela Mortelette +Marian Jager +Deni Yao +Neil Kopp +Paulo Seric +Britany Charlos +Andrea Lammers +Joel Giordano +Sebastian Makela-Nummela +Yayoi Buckman +Wei Hazard +Tarek Luis +David Al-Athba +Josefin Ifadidou +Rui Loukas +Katarzyna Gelana +Marina Murphy +Sanne Kuo +Timothy Goffin +Lucy Nakaya +Krystian Pen +Rebecca Ruta +Katherine Luca +Sabrina Abily +Aida Ganiel +Desiree Inglis +Ahmed Magdanis +Manuel Silva +Arlene Navarro +Mhairi Sommer +Toni Shevchenko +Rosie Aydemir +Hannah Lozano +Miguel Skujyte +Amine Najar +Anna Scozzoli +Neymar Kaczor +Raul Hoshina +Yifang Jang +Ivan Christou +Greggmar Benassi +Thomas Song +Hicham Hendershot +Melanie Disney-May +Automne Moline +Elena Belyakova +Travis Hammadi +Luis Booth +Miljan Henderson +Ana Dukic +Aldo Cerkovskis +Britany Oatley +Kay Rosa +Anthony Dahlgren +Alexa Loch +Neisha Liang +Brent Queen +Kerron Lee +Ganna Zonta +Mary Tomashova +Betkili Betts +Volha Mahfizur +Edith Sofyan +Kyung Kaifuchi +Eduarda Bartonova +David Lashin +Yanmei Matkowski +Vera Sene +Xuanxu Barnard +Ursula Ward +Lizeth Coertzen +Ahmed Chammartin +Peter Jang +Peter Sloma +Silviya Elaisa +Larisa Nagy +Lina Al-Jumaili +Mihnea Hamcho +Emma Chadid +Toea Robert-Michon +Charlotte Ranfagni +Elia Gittens +Younghui Karasek +Ligia Czakova +Marcel Sigurdsson +Aleksandar Sandell +Radoslav Susanu +Sarah Viudez +Bjorn Couch +Asafa Robles +Hendrik Tetyukhin +Ondrej Houssaye +Ayman Suursild +Georgina Manojlovic +Bruno Kiryienka +Kate Pink +Joel Tverdohlib +Shiho Berkel +Maryna Desprat +Chelsea Thiele +Slobodan Meliakh +Steven Solomon +Xavier Cox +Bin Iersel +Ferdinand Clair +Alexandra Solja +Julien Chen +Fabienne Bouw +Robert Skrzypulec +Mouni Malaquias +Lok Al-Athba +Laura Wu +Amy Kim +Kum Musil +Arnaud Gonzalez +Marvin Rice +Mateusz Metu +Destinee Kucana +Inmara Castro +Natasha Birgmark +Ryan Porter +Sviatlana Yin +Primoz Aubameyang +Jamie Kim +Tate Zucchetti +Hotaru Terceira +Boniface Eichfeld +Yugo Sesum +Ana Pavia +Yue Zargari +Casey Cullen +Selim Karagoz +Dominique Hall +Yumeka Guo +Luciano Telde +Gavin Sobhi +Jose Pedersen +Vladimer Sorokina +Paula Zhudina +Karen Avermaet +Yuderqui Sahutoglu +Silvana Erickson +Rodrigo Surgeloose +Henri Navruzov +Manuela Syllabova +Jinyan Bernard-Thomas +Flor Jonas +Angelica Lopez +Allison Musinschi +Saori Kienhuis +Elena Falgowski +Shannon Lapeyre +Nan Gionis +Marcelinho Pendrel +Milena Wojnarowicz +Nathan Freixa +Honami Kozhenkova +Andja Gabriele +Becky Wozniak +Ye Fitzgerald +Caroline Kirdyapkina +James Padilla +Woroud Baroukh +Sebastian Gamera-Shmyrko +Kozue Martinez +Erick Fedoriva +Vladimir King +Kazuki Leroy +Jennifer Kim +Annie Ali +Zargo Dehesa +Andisiwe Graham +Myung Kim +Claudia Butkevych +Alejandro Collins +Nadzeya Allegrini +Christinna Hudnut +Tim Phillips +Dorian Sauer +Claire Murphy +Hector Moutoussamy +Nuno Rajabi +Olesya Silnov +Maartje Fabian +Rizlen Errigo +Mel Quinonez +Magdalena Siladi +Peter Gonzalez +Susan Bluman +Olga Schofield +Wesley Truppa +Maja Balykina +Jeremiah Dean +Alvaro Tanatarov +Yihua Grunsven +Isiah Lacuna +Carlos Yakimenko +Zakia Zhurauliou +Ashley Saramotins +Tim Bernado +Jean Andrunache +Ian Rhodes +Micah Smith +Jing Aponte +Da-Woon Morkov +Silviya Saholinirina +Ser-Od He +Aman Schulte +Urs Kim +Christian Godin +Robert Dent +Jiaduo Calzada +Jesus Barrett +Sidni Sze +Massimo Groot +Georgios Kostiw +Roxana Edoa +Mariaesthela O'connor +Kate Scheuber +Viktoriia Mathlouthi +Nam Baga +Mattia Sanchez +Clara Fuentes +Kasper Addy +Kyung Steffensen +Veronika Wruck +Lukasz Kovacs +Dominic Seppala +Pierre-Alexis Valiyev +Francis Thiele +Hichem Schwarz +Nelly Rumjancevs +Kateryna Mitrea +Richard Kaniskina +Andy Maier +Victor Kondo +Eusebio Wallace +Mariana Selimau +Marlene Cabrera +Ebrahim Baggaley +Denis Gonzalez +Blair Stratton +Concepcion Vasilevskis +Alvaro Viljoen +Marco Dries +Joseph Nielsen +Zi McColgan +Alejandra Ndong +Silke Nam +Robbert Kanerva +Pui Na +Kelly Kulish +Kathleen Jo +Andile Li +Georgios Antal +Iryna Radovic +Amel Kim +Fabiana Hortness +Jessica Ochoa +Princesa Firdasari +Natalia Manaudou +Nikita Kirdyapkina +Xiayan Harden +Jordan Voglsang +Tatyana Wang +Michael Sinia +Katya Baddeley +Ondrej Kitchens +Simas Takahashi +Midori Seraphin +Wassim Matsumoto +Ai REICHSTAEDTER +Guojie Timofeyeva +Danielys Butler +Zohar Iwashimizu +Simone Abrantes +Viktorya Schmidt +Thi Kostadinov +Norman Weltz +Leith Clear +Marleen Rodrigues +Arnaud Feck +Cristian Ghasemi +Desiree Kavcic +Birhan Ryan +Xueying Hillmann +Attila Tafatatha +Myung McCafferty +Daniele Babaryka +Natalia Gatlin +Lucie Yang +Boglarka Vacenovska +Natalia Child +Pavel Lambarki +Anthony Mizutani +Albert Barthel +Paula Darzi +Iain Hartig +Nahomi Jobodwana +Ubaldina Ziegler +Jo-Ting Losev +Lina Kubiak +Valentyna Townsend +Dauren Smulders +Sangjin Hindes +Nourhan Benfeito +Ioannis Martinez +Lidiia Ng +Sara Campbell +Andrija Peker +Julian Mehmedi +Christine Heglund +Eric Silva +Lyndsie Dudas +Lucy Maguire +Lucia Berens +Annemiek Arikan +Benjamin Kuramagomedov +Irene Kreisinger +Greta Apolonia +Tassia Grotowski +Lauryn Powrie +Wilson Sauvage +Doris Wilke +Olga Nguyen +Maria Smith +Dmytro Golding +Anna Tomic +Jeneba Lee +Wai Schoeman +Laura Neben +Nguse Byrne +Yakhouba Garcia +Silvia Nakamoto +Wenjun Taimsoo +Oriol Gonci +James Pohrebnyak +Matt Waite +Dante Ma +Evgeni McDonald +Byunghee Filipe +Katerine Podlesnyy +Rasul Tichelt +Gabriella Sarup +Colin Nakayama +Ines Kovtunovskaia +Caitlin Carli +Camille Andersen +Noraseela Podrazil +Stanislav Cherobon-Bawcom +Chia Hilario +Bohdan Kostelecky +Seen Flores +Anastasiya Rupp +Keri-anne KORSIZ +Timothy Li +Petar Bauwens +Robert Gan +Chuyoung Sokolowska +Naomi Gattsiev +Monika Hwang +Paula Pamg +Alexey Gille +Eva Hirata +Michael Vasco +Jordan Panizzon +Ana Tursunov +Victoria Abarhoun +Kristina Cerutti +Jake Claver +Afgan Mrvaljevic +Petar Dominguez +Yumi Buerge +Ning Chen +Elena Coster +Nick Schodowski +Andre Romeu +Taehee Bondaruk +Aksana Baniotis +Simone Morin +Diego Dahlkvist +Katerina Saenz +Serhiy Robinson +Rachel Jelcic +Emma Wei +Carrie Spellerberg +William Bindrich +Sarah Guzzetti +Mohamed Koo +David Jeong +Mikaela Iwao +Ingrid Fogarty +Jean-Christophe Kirkham +Mana Konyot +Krisztian Ida +Sinta Denisov +Zakari Isakov +Travis Ponsana +Carles Solesbury +Nestor Seric +Mindaugas Saleh +Daniele Nurmukhambetova +Luol Mooren +Aylin Maurer +Hans Haldane +Liangliang Miller +Olivier Zhang +Ahmed Korzeniowski +Telma Andrunache +Nicolas Dotto +Georgie Santos +Bruno Oliver +Ahmed Kurthy +Daniela O'malley +Nils Guzzetti +Akeem Ngake +Meredith Yu +Burcu Bacsi +Georgina Zuniga +Glenn Defar +Natalia Akwu +Maialen Uriarte +Dragos Stone +Ali Milthaler +Robin Vesely +Elodie Arcioni +Sandrine Yumira +Giulia Schwanitz +Nataliya Nielsen +Tervel Pilipenko +Gauthier Alimzhanov +Ivan Caballero +Ruoqi Nowak +Kristian Yamaleu +Radhouane Cawthorn +David Moutton +Hellen Maher +Jamila Rodhe +Faith Kim +DeeDee Montoya +Elena Quinonez +Stephanie Piasecki +Julieta Pars +Andrea Desta +Tina Susanu +Johana Carman +Rand Gilot +Joyce Kuehner +Duane Skvortsov +Marianne Li +Khalil Shi +Phuttharaksa Signate +Flor Magnini +Dylan Espinosa +Viktor Lamdassem +Barry Utanga +Jonas Vlcek +Tugce Vozakova +Darrel Yamane +Joao Brecciaroli +Laura Dundar +Karsten Thompson +Anzor Gu +Sehryne Akrout +Marcel Gustafsson +Svetlana Dieke +Donald Guderzo +Hao Fukumoto +Sylwia Kiss +Zhiwen Piron +Sabina Williams +Daniela Gavnholt +Nguyen Ozolina-Kovala +Kumi Lewis-Francis +Fatih Eisel +Vasyl Geijer +Hung Mutlu +Piotr Rabente +Lara Siegelaar +Marcus Khalid +Jose Uhl +Sebastian Drame +Niki Klimesova +Ioannis Mockenhaupt +Aleksei Wang +Mannad Khitraya +Nicola Belikova +Elisabeth Santos +Ahmed Saladuha +Lucy White +Anabel Kal +Volha Otsuka +Kwan Otsuka +Thiago Bruno +Geoffrey Plotyczer +Dora Veljkovic +Miki Zhang +Phelan Poulsen +Mie Hall +Pietro Walker +Schillonie Benaissa +Maximiliano Matsumoto +Ryan Prasad +Kristy Zhu +Andrei Masna +Holder Lamont +Susana Neymour +Kari Halsted +Eric Sawa +Mohamed Thomas +Brad Ogimi +Jianbo Megannem +Laetitia Manuel +Fineza Primorac +Milena Vogel +Mark Turner +Andrew Negrean +Hiroshi Schuring +Brice Agliotti +Yukiko Nicolai +Adam Zaripova +Johannes Berna +Eloise Balooshi +Teodor Wilson +Yasmin Soliman +Aniko Ahmed +Dieter Schooling +Gulcan Burling +Grant Watkins +Ross Nakamura +Asgeir Dzerkal +Tina Ipsen +Alex Hosnyanszky +Sebastian Lelas +Ho Thunebro +Micheen Zhang +Nina Sornoza +Rachel Burrows +Jessica Unger +Tamara Cafaro +Kaylyn Chavanel +Braian Osayomi +Yasmin Brathwaite +Christina Maneephan +Natalie Barbosa +Kimberley Obiang +Daniel Blazhevski +Emma Alphen +Christian Zambrano +Mate Montano +Sergio Ivankovic +Shijia Conway +Dong-Young Kim +Laura Boyce +Mayara Trinquier +Simon Alphen +Aaron Santos +Gulnara Deeva +Jo-Wilfried Schornberg +Jie Gebremariam +Shota Michta +Tim Mankoc +Jane Trotter +Line Naylor +Suzanne Silva +Astrida Roche +Roderick Huang +Iveta Blagojevic +Azneem Sharapova +Silvia Chaika +Ioulietta Assefa +Nadia Jung +Lucie Kryvitski +Westley Tatalashvili +Geraint Traore +Mikhail Vlcek +Matthieu Wang +Florian Filova +Kelsey Grumier +Dan Sinker +Donglun Borlee +Sophie Ahmadov +James Hsiao +Brian Boyer +Maoxing Bedik +Theodora Conway +Pavel Lepron +Femke Gelana +Seyha Balogh +Dalibor Vidal +Anna Menkov +Ava Rusakova +Mike Bostock +Nicholas Mitchell +Giorgia Borisenko +Zouhair Ri +Audrey Pulgar +Reine Huertas +Hyelim Villaplana +Alicja Kamionobe +Francois Spanovic +Michel Sano +Zhuldyz Hoxha +Nicolas Aranguiz +Augustin Lozano +Andreas Paonessa +Hongxia Tan +Angelo Uhl +Will Mehmedovic +Javier Volosova +Natsumi Pohlak +Henna Causeur +Komeil Menchov +Layne Smith +Lisa Wang +Olesya Nielsen +Cristiane Forciniti +Cedric Subotic +Barbora Parellis +Danijel Carriqueo +Hanna Gynther +Adam Houssaye +Erasmus Perez +Chien-Ying Fraser-Holmes +Tina Boidin +Sadio Chouiref +Juan Tourn +Sebastian Sorribes +Yimeng Amaris +Stephanie Kieng +Kelsey Bludova +Chantae Matuhin +Abdullah Jiao +Job Kretschmer +Fabio Figes +Nils Pascual +Uvis Fuchs +Alexander Herrera +Mona Taibi +Seiya Railey +Radoslaw Robles +Kathleen Schmidt +Dani Loukas +Kaspar Brown diff --git a/tests/sh/teacher/mystery2/memberships/Delta_SkyMiles b/tests/sh/teacher/mystery2/memberships/Delta_SkyMiles new file mode 100644 index 00000000..3ed28d7e --- /dev/null +++ b/tests/sh/teacher/mystery2/memberships/Delta_SkyMiles @@ -0,0 +1,1287 @@ +Ana Williams +Alejandro Abdi +Ana Dukic +Heather Billings +Lucia Maksimovic +Ioannis Mcmenemy +Konstadinos Justus +Yasunari Inzikuru +Xiang Diaz +Lissa Drmic +Ahmed Weir +Geir Brash +Joanna Dlamini +Guojie Timofeyeva +Stuart Gaitan +Samira Marcilloux +Victoria Homklin +Tate Zucchetti +Daniele Kobrich +Toea Liptak +Louisa Tomas +Sarolta Bakare +Roland Deak-Bardos +Princesa Firdasari +Grace Williams +Gabor Almeida +Joshua Fenclova +Guzel Castillo +Goran Driouch +Joao Brecciaroli +Edino Fuchs +Julia Dovgodko +Tatyana Wang +Witthaya Cragg +Alex Hosnyanszky +Danijel Paderina +Daniel Verdasco +Lucy Nakaya +Oliver Mokoka +Yu Sakaguchi +Aldo Nicolas +Soslan Fernandez +Malek Greeff +Sayed Savitskaya +Vitaliy Robson +Emanuele Oulmou +Jolanta Walker +Marton Coetzee +Kemal Dinda +Igor Cemberci +Brady Mendonca +Gabor Palies +Robert Marennikova +Laure Shanks +Ji Stewart +Harry Velikaya +Christa Kvitova +Westley Febrianti +Guillaume Colle +Stephanie Kieng +Jan Peilbet +Tianyi Boughanmi +Betkili Betts +Alex Adigun +Fateh Kovalev +Jeff Larson +Travis Ponsana +Samira Grubisic +Jason Vargas +Joshua Ovono +Vladislava Tichelt +James Chetcuti +Oribe Bidaoui +Michael Tayama +Nicola Hosking +Hannah Rigaudo +Jaleleddine Achola +Irina Treimanis +Jade Kopac +Andreas Okruashvili +Jaime Shevchenko +Kelly Olivier +Mohamed Thomas +Monia Pavon +Sophie Graff +Hui Akutsu +Abdihakem Li +Christian Bidaoui +Alexa Loch +Carsten Puotiniemi +Abiodun Rogers +Fabiana Parsons +Michelle Gueye +Diletta Tindall +Endene Samsonov +Antonija Dilmukhamedov +Georgina Manojlovic +Wanner Teshale +Alex Zhang +Anastasia Biannic +Ken Roland +Lorena Bosetti +Pops Terlecki +Sandrine Lapeyre +David Shvedova +Lionel Shabanov +Arkady Pryiemka +Gulsah Makarova +Grainne Ross +Zouhair Ri +Aretha Marino +Gilles Zhang +Emmeline Vasilionak +Murat Quintino +Michel Sano +Denes Venier +Myong Kozlov +Fiona Granollers +Nathan Nishikori +Olivia Gascon +Olena Turei +Mattia Saramotins +Adrienn Paratova +Bruna Gall +Ondrej Fang +Georgina Issanova +Khadzhimurat Wilkinson +Anna Menkov +Iain Hartig +Mohamed Steele +Yulia Hostetler +Matteo Gordeeva +Ricardo Kim +Gianluca Zhang +Dominique Hall +Esmat Nicholson +Teklemariam Fabre +Lidia Glover +Vladimir Benedetti +Amy Mizzau +Afgan Mrvaljevic +Sergey Medhin +Emmanuel Barbieri +Antony Williams +Jesus Barrett +Georgi Dent +Svetlana Wang +Nikolaus Milatz +Vera Scarantino +Lalita Wang +Ho Thunebro +Risa Synoradzka +Rizlen Mrisho +Herve Kasa +Alexander Mccabe +James Wilson +Annie Ali +Siraba Davenport +Katarzyna Talay +Bruno Kiryienka +Grzegorz Tipsarevic +Aleks Eisel +Aleks Pirghie +Constantina Nagel +Urska Fijalek +Marcelinho Hrachov +Ai Portela +Lisa Ledecky +Andre Qin +Dae-Nam Dunkley-Smith +Anna Rosario +Ara Hashim +Thomas Doder +Bianca Coleman +Hamid David +Hiroki Klokov +Hyobi Magnini +Jarred Selimau +Ratanakmony Baniotis +Carla Anderson +Azad Honeybone +Tim Lehtinen +Pavel Lambarki +Michael Stublic +Debora Moguenara +Ubaldina Ziegler +Tyler Payet +Emma Wei +Ashley Scott +Jennifer Yu +James Brooks +Viktorya Schmidt +Maria Smid +Marius Davies +Volha Otsuka +Tamara Cafaro +Aselefech Gkountoulas +Yunwen Crous +Nicola Kovalev +Haley Pishchalnikov +Daniele Babaryka +Timothy Francisca +Tatjana Henriquez +Kacper Napo +Andrei Yazdani +Viktor McLaughlin +Fantu Nikcevic +Jirina Hojka +Roberto Miller +Gonzalo Gough +Xiaoxia Yamagata +Dora Veljkovic +Anna Prucksakorn +Denis Machado +Marco Sagmeister +Iuliia Barseghyan +Maria Drais +Anaso Booth +Jonathan Glanc +Lok Al-Athba +Johnno Listopadova +Ilya Marcano +Radu Colley +Javier Branza +Anja Cojuhari +Taoufik Geziry +Tyler Belmadani +Kevin Dawidowicz +Jens Lavrentyev +Ned Vieyra +Krisztian Ida +Keon Mcculloch +Nikolaus Svendsen +Eva Mocsai +Sonata Raif +Lok Poglajen +Niklas Capelli +Sarah Kim +Kelley Nurmagomedov +Miroslava Isakov +Tina Ipsen +Miranda Mulligan +Megan Abdalla +Charlotte Taylor +Micah Smith +Sergio Calzada +Tarjei Clary +Rosie Rapcewicz +Andres Shi +Nicholas Rosa +Marco Stanley +Luuka Zhang +Anton Gu +Kristina Sokhiev +Julien Chen +Daouda Martelli +Ziwei Braas +Tiff Fehr +Marc Ivezic +Anna Beaubrun +Larry Lapin +Ariane Nazarova +Sung Dyadchuk +Chris Keller +Onan Kim +Nam Baga +Yoshimi Szucs +Dragos Stone +Roline Camilo +Zach Esposito +Dathan Ziadi +Elena Falgowski +Sergii Tellechea +Kanae Bracciali +Andrey Si +Tomasz Jang +Elena Costa +Nurul Amanova +Panagiotis Watanabe +Caster Gong +Jehue Wild +Hans Haldane +Muhamad Idowu +Euan Gunnarsson +Germain Detti +Alexandra Sanchez +Sandeep Karayel +Ravil Ismail +Vignir Charter +Oliver Parti +Ahmed Elkawiseh +Reika Elgammal +Ryoko Goubel +Mihnea Hamcho +Todd Istomin +Ioulietta Assefa +Fredy Ezzine +Guzel Kahlefeldt +Jazmin Lee +Thomas Shen +Jonathan Endrekson +Deron Estanguet +Nenad Blerk +Xing Djerisilo +Nelson Accambray +Sidni Sze +Sven Contreras +Timea Nus +Hongyan Collins +Mindaugas Saleh +Sarah Lokluoglu +Daniele Carrascosa +Carole Pyatt +Diego Udovicic +Lankantien Kristensen +Amanda Svensson +Viktoriia Madico +Yumi Gray +Hye Wallace +Anderson Schenk +Winston Li +Shea Zhang +Mateusz Mendoza +Russell Fukuhara +Marios Lima +Akeem Ngake +Fabiana Hortness +Hreidar Godelli +Danijel Grandal +Francisca Mocsai +Akzhurek Whitty +Abdullah Jiao +Katherine Luca +Serhiy Bisharat +Zakia Zhurauliou +Hun-Min Soroka +Jan-Di Resch +Takamasa Kasa +Davit Asano +Michelle-Lee Abril +Eric Rolin +Ganna Zonta +Olesya Silnov +Luke Mamedova +Danilo Chabbey +Ilona Harrison +Ivan Edelman +Evagelos Felix +Ediz Gorlero +Valerie Battisti +Hyelim Villaplana +Robert Gan +Sophie Aliyev +Aina Gavrilovich +Jose Overall +Sonja Ide +Doris Wilke +Eric Gogaev +Marouen Tatari +Carole Adams +Suhrob Jacob +Kris White +Aoife Pyrek +Andrei Masna +Sandra Engelhardt +Darya Okruashvili +Nicole Kovalev +Velichko Connor +Angelo Uhl +Jiaduo Calzada +Natthanan Caluag +Mie Callahan +Ifeoma Lahbabi +Jan Ryakhov +Kyung Steffensen +Mykyta Euren +Lisa Atlason +Dave Scott +Mamorallo Holzer +Georgina Oldershaw +Carolina Macias +Won Davison +Jun Szczepanski +Oleh Chinnawong +Carlos Dyatchin +Kyle Chamberlain +Maria Choi +Olha Lewis-Smallwood +Dana Hassnaoui +Salima Nakano +Mojtaba Polyakov +Wade Dimitrov +Melissa Glynn +Rosario Rulon +Marie Vourna +Amy Schipper +Nyam-Ochir Yauhleuskaya +Romulo Simanovich +Tontowi Benedetti +Mclain Rakoczy +Alyssa Fouhy +Amy Prevot +Grzegorz Kohistani +Jukka Barros +Maria Arismendi +Steven Kostelecky +Shannon Lapeyre +Joel Kammerichs +Tarek Takahira +Meghan Sato +Alexander Hansen +Bogdan Beaubrun +Olga Castano +Maksim Loza +Jihye Gregorius +Xiaoxiang Lan +Jeroen Zhurauliou +Joseph Bartley +Andrew Meliz +Pierre-Alexis Valiyev +Alexander Vandermeiren +Nuria Saenko +Evelin Niyazbekov +Natalya Prorok +Ying Marinova +Njisane Saleh +Elania Rodionova +Giorgia Kleinert +Olga Richards +Joao Dovgodko +Shane Choi +Yanfei Nono +Rhett Donato +Johan Arvaniti +Desiree Inglis +Marcelinho Pendrel +Jessica Garderen +Tarik Atangana +Lucy Burmistrova +Saulius Sinnig +Alexey Estes +Pedro Kim +Hursit Gestel +Patrick Whalen +Tom Ptak +Donglun Rohner +Daniel Kouassi +Manabu Medvedev +Amel Kim +Erik Plouffe +Lalonde Koski +Michael Sinia +Lei Estrada +Ayele Bleibach +Igor Turner +Nigel Hejmej +Aleksandr Inthavong +Ryan Ovtcharov +Micah Pigot +Christopher Stafford +Rodrigo Burke +Dorde Pereira +Marina Murphy +Sara Friis +Kristi Melo +Lucy Miller +Artur Darien +Stany Spellerberg +Cornel Ding +Sergiu Merrien +Ferenc Aydarski +Neil Kopp +Timothy Goffin +Dmytro Golding +Victoria Monteiro +Luis Li +Sarah Dovgun +Giovanni Kovacevic +Selim Karagoz +Stephanie Sofyan +Bernard Yip +Haojie Fernandez +Weiyi Kirpulyanskyy +Irina Tukiet +Arnaldo Shulika +Meiyu Prasad +Saori Kienhuis +Janko Ochoa +Haibing Lee +Chui Jacobsen +Kobe Driebergen +Simone Brathwaite +Sergio Thompson +Kasper Schops +Anne Houghton +Seoyeong Montoya +Tatsuhiro Thompson +Maureen Makanza +Edgars Meshref +Won Teltull +Eloyse Vocht +Nastassia Croenen +Tanyaporn Mazuryk +Katarzyna Norgaard +Dakota Ulrich +Vincent Cogdell +Dilshod Allen +Ali Wang +Jan-Di Aydarski +Kenny Faminou +Sebastian Flores +Nicola Belikova +Hyun Persson +Hao Kostelecky +Thomas Antonov +Rene Marques +Sophie Giorgetti +Nicola Chan +Sergey Kain +Polona Garderen +Florian Schrade +Jurgen Granollers +Gretta Tang +Ni Robinson-Baker +Krystian Pen +Rasmus Rindom +Egidio Kleiza +Yeon-Koung Fernandez +Jefferson He +Nestor Seric +Shinta Gong +Anja Barzola +Hedvig Alameri +Fabiana Saka +Elia Gittens +Elodie Muniain +Anthony Machavariani +Xuanxu Barnard +Noor Borzakovskiy +Sabrina Burns +Azusa Richter +Marian Atkinson +Sabina Williams +Nuttapong Bewley +Eun Burton +Judith Plotyczer +Jean-Julien QUINTERO +Da-Woon Morkov +Oleg Dyadchuk +Joel Csernoviczki +Dan Sinker +Jennifer Mogushkov +Nikola Zhang +Oliver Grumier +Ilona Chamley-Watson +Chien-Ying Fraser-Holmes +Sandra Kaukenas +Louise Fernandez +Mercy Nakamoto +Sviatlana Kable +David Svarc +Kirsten Wang +Aleksey Pahlevanyan +Therese Stewart +Frano Mendelblatt +Konstadinos Troicki +Carolina Wang +Adrian Lidberg +Lea Besbes +Hodei Phoenix +Ivano Tetyukhin +Onan Weale +Marina Kasa +Jongwoo Sin +Chia Jensen +Binyuan Kumagai +Stephanie Piasecki +Sergio Ivankovic +Tom Anderson +Dorothy Abdvali +Megumi Liu +Giacomo Koski +Gulcan Burling +Jessica Basalaj +Mel Morrison +Duane Skvortsov +Hamish Drabenia +Nevin Hurtis +Emanuel Taleb +Gretta Aramburu +Olga Weel +Pavlos Nicolas +Wenwen Samilidis +Mikhail Vlcek +Ndiatte Brown +Charline Chen +Nadezda Plouffe +Thomas Song +Yasmin Soliman +Louise Mrisho +Sergi Mohr +Mary Tomashova +Stsiapan Kaun +Sebastian Lelas +Matt Waite +Dana Potent +Younggwon Fabre +Rosie Aydemir +Dorian Taylor +Josefin Ifadidou +Nathan Barnhart +Ebrahim Maeyens +James McNeill +Jihane Rulon +Chu Willis +Cristian Ghasemi +Camille Giglmayr +Micheen Zhang +Peter Howieson +Ludwig Pishchalnikov +Frithjof Urtans +Guzel Mangold +Noureddine Filipe +Jong Borysik +Mohamed Koo +Helge Saladino +Kate Pink +William Girard +Julian Mehmedi +Lee-Ann Song +Denis Rezola +Lukasz Dudas +Elena Michan +Audrey Martin +Yasmin Brathwaite +Shana Halsall +Patrick Miles +Elmir Sorribes +Artur Munkhbaatar +Jessica Bolat +Mario Agahozo +Niki Grangeon +Pietro Warfe +Grete Skydan +Line Emanuel +Mhairi French +Miles Robertson +Iryna Radovic +Urszula Heffernan +Yutong Pena +Viktoriia Glavnyk +Veronique Caianiello +Reza Hoovels +Irakli Wang +Patrick Kiyotake +Benjamin Reinprecht +Valentino Ferguson-McKenzie +Aleksandar Fasungova +Mark Bennett +Mahe Ivashko +Krzysztof Vesovic +Joel Scanlan +Luol Mooren +Christin Brown +Lucy Maguire +Fatih Eisel +Sam Lahnsteiner +Wenling Aguiar +Joachim Jennings +Aleksandrs Castellani +Jo-Wilfried Schornberg +Artur Talbot +Ibrahima Csima +Byambatseren Resch +Andile Li +Florent Gu +Marianna Ford +Yadira Marghiev +Margaux Glanc +Szymon Silva +Victoria Salopek +Kasper Addy +Nadiezda Catlin +Christianne Kalmer +Michael Hammarstrom +Karin Myers +Annamaria Crothers +Jinyan Bernard-Thomas +Stevy Fernandez +Daria Shkurenev +Wing McMillan +Rafal Saedeleer +Morgan Akkar +Ahmed Harrison +Elodie Arcioni +Daria Palermo +Isabel Boccard +Todor Tong +Eric Birca +Rachel Kostelecky +Seongeun Magdanis +Marta Kiala +Grete Makaranka +Katie Park +Louise Jin +Eloy Rasmussen +Jessie Vlahos +Taimuraz Melis +Antonija Shelley +Bahar Deligiannis +Anouar Felix +Yoo Miller +Sau Jordan +Francois Achour +Ferdinand Clair +Mariya Gibson +Lisa Poistogova +Larissa Cortes +Wassim Matsumoto +Luisa Barros +Leire Saltanovic +Patrick Navarro +Hakim Svennerstal +Laura Khokhlova +Peter Ochoa +Carolina Rondelez +Jacob Harris +Nina Krause +Guillermo Kim +Taehee Moberg +Abdalaati Rodriguez +Roberta Callahan +Eslam Kaifuchi +Harry Brunstrom +Anastasiya Rupp +Javier Volosova +Marcin Mihamle +Alexander Valois-Fortier +Shehab Makhloufi +Claudia Kavanagh +Marcus Orban +Ines Wong +Alan Gaspic +Nahla Zhedik +Thiago Bruno +Vicky Florez +Jose Paldanius +Andre Takatani +Mohammad Li +Mechiel Schulz +Yibo Al-Jumaili +Melissa Guell +Luciano Ahmad +Jose Uhl +Becchara Pareja +Dana Zagame +Ahed Alilovic +Doyler Ledaki +Mikhail Weel +Emmanuel Mukasheva +Antoinette Silva +Samantha Lin +Larissa Zhu +Jin Pontifex +Janne Bouw +Giulia Schwanitz +Ion Hutarovich +Martyn Stasiulis +Branden Cavela +Jens Tuimalealiifano +Spyridon Zhou +Anita Wright +Adnane Kim +Johanna Khinchegashvili +Hellen Maher +Mario Daroueche +Raul Makanza +Kwan Scherer +Nelly Rumjancevs +Zac Ashwood +Ying Dancette +Vladimir Dehghanabnavi +Richard Warren +Andreas Stanning +Ivan Versluis +Angel Cash +Gloria Martinez +Lianne Schuring +Petra Sakai +Katerina Riccobelli +Elizabeth Smith +Lyubov Gunnewijk +Omar Canitez +Georgios Gigli +Laetitia Yamauchi +Ivan D'almeida +Helen Cheywa +Hichem Schwarz +Martin Strebel +Olga Asgari +Sergey Abalo +Njisane Arkhipova +Leonardo Ghebresilasie +Ramon Kirkham +Urs Kim +Simone Morin +Dorothy Reckermann +Dion Pavlov +Marc Gebremedhin +Anna Holzdeppe +Michael Caceres +Milan Ekberg +Tyson Knezevic +Mylene Haywood +Aneta Cardoso +Charlotte Kachalova +Krystian Kean +Cristiane Forciniti +Mulualem Rodriguez +Romana Wu +Joshua Capkova +Malin Manie +Luca Lee +Hannah Knioua +Benjamin Kuramagomedov +Ates Wenger +Ivan Penny +Glencora Ebbesen +Mehdi Li +Aries Coston +Moritz Muller +Diego Shing +Gaetane Desprat +Leah Driel +Robin Vesely +Lei Lee +Olivier Akwu +Ratanakmony Prutsch +Norman Chen +Enia Esterhuizen +Judith Zhu +Liangliang Miller +Juan Lovric +Alfonso Jneibi +Adam Jezierski +Elena Modenesi +Antoine Vidrio +Xiaodong Dulko +Rohan Braun +Pilar Wilson +Clara Mason +Jamila Rodhe +Olga Kasza +Phillipp Al-Mashhadani +Bojana Erakovic +Muhamad Sanders +David Dawidowicz +Lieuwe Schneider +Robert Kang +Gemma Wang +Julia Olsson +Ryo Smith +Kerron Saedeleer +George Terpstra +Amine Lin +Tomasz Gkountoulas +Wai Mazic +Lihua Ivanova +Ivana Monteiro +Andriy Hrachov +Lauren Subotic +Yevgeniy Gushchina +Thiago Malave +Luis Petkovic +Kylie Ignaczak +Aida Olesen +Richard Scarantino +Scott Klein +Saul Huddle +Lisa Edgar +Christina Maneephan +Zinaida Birarelli +Artem Daluzyan +Jan-Di Ilias +Adrian Melzer +Rhys Faber +Thi Kostadinov +Kaori Donahue +Desiree Khachatryan +Ricardo Barnaby +Natalia Benedetti +Gideon Kowal +Kelita Wood +Tomas Rodriguez +Silke Nam +Trevor Peno +Baorong Mir +Chi Kim +Tim Csonka +Karolina Wells +Agnieszka Skhirtladze +Natalia Akwu +Pamela Fuchs +Gediminas Whitehurst +Benjamin Schlosser +Yuderqui Mrak +Matylda Muncan +Lijiao Fumic +Arseniy Janik +Wenjun Taimsoo +Daniela Schleu +Janelle Ovchinnikovs +Michael Gigli +Xiang Pocius +Nathan Freixa +Oscar Poistogova +Xavier Kiprop +Sidarka Smelyk +Josefin Ma +Nicola Saranovic +Ville Grandal +Emmanuel Figere +Sergej Ayalew +le Toksoy +Ahreum Sum +Bruno Williams +Luca Kipyegon +Alexander Wei +Tim Phillips +Kay Coster +Matthew Chakhnashvili +Juan Crow +Haakan Okrame +Omar Jon +Glenn Defar +Sajjad Oriwol +Anfisa Whalan +Brendan Hanany +Matthieu Wang +Beth Guo +Fetra Shemarov +Ivan Kim +Gemma Gaiduchik +Abdelaziz Durant +Vladimir Rodriguez +Oleksiy Ferrer +Krisztina Petzold +Sonia Williams +Karen Okruashvili +Boglarka Vacenovska +Mike Bostock +Birhan Ryan +Carolina Borman +Byunghee Filipe +Katerine Podlesnyy +William Salminen +Elena Felix +Chui Aymerich +Yohan Miljanic +Pierre-Alexis Tom +Gergo Faulkner +Ranohon Montano +Suji Gallantree +Spiridon Elkhedr +Juliane Kim +Ciaran Susanu +Rena Jankovic +Tervel Rojas +Flor Magnini +Thomas Boggiatto +Panagiotis Mucheru +Methkal Grabich +Simone Moreau +Yavor Gonzalez +Bahar Febrianti +Hyun Strebel +Anderson Oh +Brian Boyer +Jana Rendon +Shuai Sudarava +Dzmitry Busienei +Macarena Jorge +Mara Deroin +Heiki Outteridge +Georgios Antal +Mathieu Pigot +Eva Hirata +Qiang Hradecka +Paula Pizzo +Behdad Trowbridge +Sofiane Satch +Roderick Nagai +Rajiv Fogarty +Marie Kim +Darae Elsayed +Eric Lemaitre +Marius-Vasile Biezen +Yusuke Kuziutina +Didier Munoz +Francis Thiele +Augustin Lozano +Un Avramova +Keigo Lekai +Monika Heidler +Blaza Frolov +Joao Shavdatuashvili +Ibrahim Oie +Caroline Denayer +Rikke Ayeko +Thomas Jurkowski +Tarek Luis +Pascal Deligiannis +Jamie Kinderis +Victor Kondo +Marlene Nicholson +Zhizhi Kehoe +Clemens Cordon +Carmen Akkaev +Denis McIntosh +Leith Clear +Lesley Bithell +Mikolaj Sawa +Benjamin Pietrus +Marcia Ser +Aaron Purevjargal +Nikolina Khuraskina +Vera Sene +Inmara Castro +Vicente Shemarov +Nicolene Jeong +David Junior +James Aniello +Christine Bonk +Glenn Filandra +Yana Elmslie +Nick Osagie +Teodor Wilson +Nicolas Dotto +Wanida Barjaktarovic +Sergey Almeida +Francesca Rowbotham +Elco Williams +Lidiia Ng +Tosin Mckendry +Aurelie Kirkham +Dorde Leboucher +Dalibor Vidal +Evgenia Kechrid +Mizuho Bennett +Lotta Tereshchuk +Christina Vesela +Giovani Krug +Naphaswan Brownlee +Pierre-Alexis Zhang +Naomi Lush +Olga Brize +Sarolta Coughlin +Bashir Krovyakov +Ava Rusakova +Ignisious Hijgenaar +Monika Hwang +Elena Coster +Johana Carman +Gael Mushkiyev +Kellie Leon +Jong Dunlop-Barrett +Alix Dziamidava +Kate Scheuber +Danielle Edlund +Kelly Kulish +Wenjun Juszczak +Belal Knowles +Susan Weidlinger +Adrienne Buntic +Toni Karpova +Bastian Beadsworth +Sergey Barachet +Lisbeth Alptekin +Robert Toumi +Angela Belmonte +Nicholas Nechita +Anton Langehanenberg +Citra Comba +Sergey Marco +Concepcion Vasilevskis +Marios Gelpi +Julian Hjelmer +Will Mehmedovic +Deniz Kowalska +Erica Velez +Julian Lie +Amber Mattsson +Lucie Yang +Sheng Romdhane +Roland Madaj +Ingrid Fogarty +Maksim Culley +Stefano Moniqui +Navab Povh +Jan-Di Kazlou +Claudia Butkevych +Ming-Huang Araujo +Mehdi Kovalenko +Automne Driel +Alberto Pedersen +Zengyu Driel +Sebastian Yonemoto +Kozue Martinez +Luis Gascon +Daniel Herman +Yadira Psarra +Mercy Pietrzak +Caitlin Carli +Ryan Adams +Donggeun Guion-Firmin +Gabrielle Raudaschl +Thomas Magi +Daigoro Johansson +Mareme Mihelic +Linus Tran +Emmanuel Hornsey +Andrew Ruciak +Alexandre Smedins +Denis Matsenjwa +Stephanie Adlington +Gonzalo Nunes +Braian Haydar +Zara Luvsanlundeg +Josefin QUINTERO +Chen Moulinet +Alexandre Sawers +Justin Mandir +Inna Yu +Kacper Phillips +Iuliana Costa +Endurance Emmanuel +Dmitrii Cureton +Colin Vila +Wei White +Daisuke Saranovic +Shaunae Hallgrimsson +Tetyana Kvyatkovskyy +Aziz Chaabane +Maynor Lemos +Vincent Jagar +Moritz Dibaba +Deron Tarasova +Nikolay Ahmed +Dorian Sauer +Marvin Rice +Samantha Grankin +Irakli Dinu +The Joker +Derek Kazanin +Pedro Oliveira +Chunlei Balazs +Aya Levina +Maria Sheikhau +Zhongrong Stacchiotti +Isiah Murabito +Andrew Monteiro +Ayako Coetzee +Jade Jallouz +Veronika Wruck +Katerina Saenz +Sara Knowles +Julen Fogarty +James Takase +Emilie Jaeger +Luca Melendez +Jonas Ukumanov +Norma Anderson +Ludwig Trias +Matthias Ekimov +Beth Mazuryk +Radoslaw Licona +Dariya Kalentieva +Petr Smith +Nelcy Korshunov +Omar Aguirregaray +Boon Cortes +Gonzalo Pacheco +Aya Thunebro +Konstantinos Milanovic-Litre +Yugo Sesum +Reine Arteaga +Jur Gebremeskel +Yahima Gojkovic +Alexander Jiang +Sonja Tinsley +Ricardo Jones +Abraham Benitez +Gia Mogawane +Suzanne Warburton +Niverka Junior +Mateusz Yi +Aron Pilhofer +Xin Cuddihy +Olga Jon +Hortance McGlinchey +Marcel Petersen +Daniel Basalaj +Darrel Yamane +Mercy Verlinden +Juan Kim +Collis Freimuth +Anis Boninfante +Gabrio Dowabobo +Wilson Sauvage +Yu Moradi +Aleksandr Pendrel +Ser-Od Szasz +Trey Kirkham +Juliane Yanit +Sycerika Rabetsara +Daria Schmid +Hovhannes Piccinini +Danylo Aguiar +Sebastian Sorribes +Mandy Hinestroza +Margaux Knox +Lisa Yamamoto +Nick Burrows +Levan Ingram +Sanya Dreesens +Yun Luo +Megan Angelov +Xiaoyu Yang +Yi Gretchichnikova +Peter Wagner +Nagisa Leroy +Hung Mutlu +Jinjie Meeuw +Ponloeu Inthavong +Rodrigo Surgeloose +Marvin Peltier +Mingjuan Birgmark +Rizlen Errigo +Duhaeng Agren +Ari-Pekka Wei +Saheed Durkovic +Sarah Male +Beatriz Smock +Arsen Monya +Drasko Choi +Marcel Sigurdsson +Ilaria Hu +Hamdan Zabelinskaya +Radmila Nibali +Janin Aramburu +Suzana Teutenberg +Natalia Child +Maria Ro +Anabel Kal +Adnan Brendel +Zachary Podryadova +Xiaojun Hachlaf +Elisabeth Worthington +Myungshin Forgesson +Katerina Wang +Marcin Pechanova +Andrea Wenger +Anabel Dominguez +Pauline Ayim +Igor Kasa +Artem Tops-Alexander +Satoko Tegenkamp +Miho Franco +Raissa Araya +Sholpan Draudvila +Hiram Blume +Line Naylor +Iryna Malcolm +Maiko Zhang +Silviya Cesarini +Amaka Mathlouthi +Magdalena Siladi +Roman Ledaki +Cian Purnell +Kurt Multerer +Tassia Cejas +Myung Kim +Alexandra Jokinen +Stefan Webster +Jemma Gabriele +Alberto Fiakaifonu +Mateusz Metu diff --git a/tests/sh/teacher/mystery2/memberships/Museum_of_Bash_History b/tests/sh/teacher/mystery2/memberships/Museum_of_Bash_History new file mode 100644 index 00000000..86948b22 --- /dev/null +++ b/tests/sh/teacher/mystery2/memberships/Museum_of_Bash_History @@ -0,0 +1,1290 @@ +Limei Ioannou +Mihaela Toskic +Mihyun Dahlberg +Joseph Nielsen +Glenn Ouedraogo +Fabian Knight +Kien Wade-Fray +Elena Modenesi +Honami Kozhenkova +Yakhouba Garcia +Norbert Prokopenko +Tugba Brecciaroli +Shota Rakonczai +Olga Schofield +Azad Honeybone +Dion Pavlov +Aleksandra Silva +Lynsey Bailey +Dmitriy Halsted +Pajtim Pospisil +Austra Xu +Diego Smith +Bridget Usovich +Kellie Leon +Jur Gebremeskel +Camille Gao +Andrei Masna +Simon Rigaudo +Jose Pedersen +Selim Tregaro +Maher Vos +Vera Scarantino +Paula Pamg +Stevy Fernandez +Stanislav Dorneanu +Goran Driouch +Sergi Soto +Yang Fraser +Miguel Cho +Abiodun Rogers +Katya Lehtinen +Jermaine Qin +Germain Detti +Kieran Mota +Andrea Lammers +Yu Sakaguchi +Sanja Silva +Suhrob Jacob +Eric Ally +Guilherme Latt +Mario Agahozo +Yuko Gennaro +Yana Al-Garni +Roderick Nagai +Grainne Ross +Kay Kouassi +Betkili Betts +Omar Osl +Erina Cabrera +Mercy Pietrzak +Aksana Melian +Tetyana Kolchanova +Mei Stettinius +Igor Turner +Beata Altes +Geir Brash +Lukasz Afroudakis +Jamy Malzahn +Yi Mansouri +Xiaojun Lee +Rayan Titenis +Denis Machado +Marc Clair +Sarah Dovgun +Isil Gonzalez +Xiaodong Dulko +Marina Tchuanyo +Chong Massialas +Carlos Hall +Faith Kim +Mohammad Li +Antonija Dilmukhamedov +Mathias Laukkanen +Goldie Marais +Mariaesthela O'connor +Keri-anne KORSIZ +Mikhail Laalou +Jingjing Gray +Shane Fischer +Luis Lundgren +Kynan Viljoen +Petra Sakai +Andrei Delattre-Demory +Carl Chapman +James Seferovic +Taizo Barry +Philip Hilario +Nick Rogers +Malin Archibald +Komeil Menchov +Mateusz Yi +Simone Fesikov +Nicholas Kudryashov +Scott Klein +Johana Carman +Brenda Hsu +Diletta Tindall +Nadeen Carrasco +Jefferson Nagy +Anna Munch +Lisbeth Savani +Anderson Oh +Elco Williams +Eduardo Collins +Elena Costa +James Brooks +Ates Wenger +Alina Ciobanu +Stephanie Sofyan +Clement Starovic +Connor Touzaint +Saori Dancette +Blaza Frolov +Toshiyuki Nyasango +Jung Jung +Anna Savinova +Georgi Dent +Albert Malki +Wan-Jung Gasol +Chia Bleasdale +Natalia Kim +Ka Ma +Tiago Lauric +Yuliya Sokolov +Fernanda Purchase +James Haghi +Jacheol Hyun +Michal Stahlberg +Courtney Yankey +Simas Takahashi +Job Cole +Dariya Kalentieva +Mechiel Maric +Suzaan Dawkins +Macarena Jorge +Julie Henriques +Kieran Bayaraa +Ibrahima Byrnes +Sara Siriteanu +Olga Puga +Petr Smith +Hichem Schwarz +Simona Mennigen +Wai Mazic +Jaele Sharp +Sylwia Yang +DeeDee Warfe +Ivan Abdusalomov +Danylo Bond-Williams +Ranohon Montano +David Moutton +Liliana Mullin +Abdelaziz Durant +Alberto Han +Leford Lapin +Svetlana Wang +Alexey Friedrich +Margaux Jung +Susan Weidlinger +Emmanuel Mukasheva +Jack Shafar +Peter Schuch +Vardan Romeu +Danyal Lefert +Milos Blazhevski +Andre Romeu +Ahmed Miyake +Mamorallo Holzer +Edwige Henderson +Alena Noa +Evgeny Schoneborn +Tetyana Kvyatkovskyy +Samantha Lin +Kateryna Mitrea +Viktor Steffens +Guido Kanerva +The Joker +Ludivine Chetcuti +Raphaelle Batum +Ainhoa Taylor +Corine Kashirina +Mario Husseiny +Husayn Reuse +Barbara Shakes-Drayton +Johana Yauhleuskaya +Michael Stamatoyiannis +Georgina Issanova +Ying Marinova +Mebrahtom Fields +Danijel Carriqueo +Marlene Nicholson +Ventsislav Niyazbekov +Evelin Niyazbekov +Andisiwe Graham +Sonata Raif +Spiridon Elkhedr +Silviya Cesarini +Shaunae Hallgrimsson +Jayme Suarez +Natalia Manaudou +Arianna Tansai +Aly Roberts +Sarra Larsen +Tsilavina Wozniacki +Jarred Selimau +Anas Ma +Tatiana Muncan +Kyung-Ok Monaco +Vera Sene +Gulnar Kowalska +Arben Mikhaylov +Joao Dovgodko +Riccardo Cheng +Laetitia Cornelissen +Tetsuya Cabrera +Torben Jaskolka +Kim Kable +Chelsea Thiele +Kayla Kim +Nilson Belmadani +Junggeu Firova +Maja Orban +Kate Bourihane +Nicole Kovalev +Casey Santos +Renee Duenas +Beatriz Nooijer +Matthew Toth +Ravil Azou +Gia Yoon +Liuyang Darnel +Irina Kaddouri +Adrian Lidberg +Carlos Yakimenko +Silvana Bianconi +Gonzalo Gough +Constantina Nagel +Franziska Huang +Charlotte Ranfagni +Keith Beresnyeva +Steven Schlanger +Bruno Ruban +Natalie Cheverton +Paulo Seric +Enzo Balciunas +Pascal Davaasukh +Roxana Srebotnik +Ludivine Williams +Wei White +Maria Banco +Wouter Brennauer +Olga Richards +Peter Jang +Xiaoxia Yamagata +Shane Gemmell +Rizlen Errigo +Iuliia Oatley +Todd Lewis-Smallwood +Hamdan Zabelinskaya +Sviatlana Zucchetti +Jose Morgan +Shane Dodig +Hun-Min Soroka +Emma Hausding +Mylene Murray +Ryosuke Ciglar +Marleen Rodrigues +Abiodun Horvath +Oleksandr Schwarzkopf +Alexa Patrick +Georgina Zuniga +Helge Saladino +Jan Ferreira +Bastian Horvat-Panda +Suzanne Warburton +Augustin Lozano +Shuai Muttai +Derek Kazanin +Rosie Aydemir +Artur Teltull +Phillipp Absalon +Kyle Chamberlain +Guor Rodhe +Kenny Chavanel +Levan Ingram +Brian Boyer +Bedan Soubeyrand +Maximilian Sedoykina +Darcy Zouari +Sebastian Drame +Gwang-Hyeon Mears +Andres Shi +Lisa Mendibaev +Ivan Contreras +Ivana Grubisic +Charlotte Kachalova +Eric Babos +Pablo Pereyra +Claudia Metu +Viktor Rangelova +Moana Xian +Ryan Pota +El Gonzalez +Ashleigh Bruno +Marquinhos Samara +Tim Cambage +Docus Muff +Yahima Menkov +Dalibor Vidal +Kyle Koala +Weiyi Kirpulyanskyy +Joel Csernoviczki +Aleksei Wang +Gojko Lee +Gulcan Burling +Adenizia Kim +Federico Pavoni +Daniel Lim +Kobe Driebergen +Aleksandr Rutherford +Paolo Sirikaew +Simone Moreau +Fortunato Deng +Kristina Sokhiev +Ayouba Carrington +Rafal Ri +Pavlos Nicolas +Juan Lacrabere +Ida Deak-Bardos +Jerome Amoros +Priscilla Chitu +Piotr Rabente +Daniel Green +Robert Skrzypulec +Pui Coronel +Marie-Louise Hosking +Niverka Junior +Mariko Shimamoto +Bilel Boonsawad +Deni Iovu +Ioannis Martinez +Chia Hilario +Nicholas Stowell +Rubie Sukhorukov +Gareth Culley +Bianca Coleman +Angelique Raden +Angela Belmonte +Andrew Ekame +Annabel Church +Victor Labyad +Marcel Goodison +Veronique Caianiello +Marcos Laukkanen +Maiko Zhang +Ionut Kalovics +Fineza Davis +Ryan Welte +Hursit Gestel +Diego Michan +Dallal Elgammal +Marie Unsworth +Giovani Alflaij +Sajjad Ulrich +Anton Aguilar +Lori Jacobsen +Jean-Christophe Fujio +Sarah Markussen +Ashlee Sakai +Tina Ortiz +Alice Riou +Adrien Kleibrink +Alfredo Polyanskiy +Ratanakmony Prutsch +Marcel Roelandts +Urs Kim +Artem Napoleon +Yoann Gentry +Charline Chen +Chia-Ying Djokovic +Lorena Ginn +Eunice Zairov +Luis Elhawary +Mary Tomashova +Benjamin Bilici +Seonkwan Cha +Kyoko Bennett +Vera Silva +Ricardo Jones +Darae Hidayat +Moon Caille +Horacio Klizan +Simona Sauveplane +Gauthier Bindrich +Tina Teutenberg +Jingbiao Cheon +Marcel Petersen +Thomas Boggiatto +Mansur Engleder +Marry Azizi +Miranda Mulligan +Maider Piccinini +Chris Keller +Didier Munoz +Jessica Mcgivern +Periklis Gemmell +Louisa Tomas +Francielle Ziolkowski +Karolina Brennauer +Niklas Donckers +Lisa Poistogova +Egor Ferreira +David Schuh +Adrienne Kreanga +Svetlana Janoyan +Shijia Conway +Tom Ptak +Nazario Barrondo +Deron Estanguet +Shiho Berkel +David Rahimi +Viktoriia Mathlouthi +Yuki Hayashi +Sarah Zaidi +Lee Farris +Rita Sanchez +Maroi Tatham +Reza Hoovels +Liubov Ruh +Bodin Prevolaraki +Yadira Marghiev +Shane Lauric +Stephanie Adlington +Xiang Diaz +Samira Ri +Naomi Presciutti +Martin Strebel +Shaune Hurskainen +Gwen Fredricson +Dieter Schooling +Nenad Moran +Iuliia Kim +Suji Labani +Christina Illarramendi +Yunwen Crous +Polen Borel +Niki Batkovic +Daniele Babaryka +Nathan Nishikori +Ash Buckland +Daniel Jackson +Kelly Olivier +Shao Watt +Vincent Brize +Marina Ma +Russell Verdasco +Haibing Lee +Stanislav Cherobon-Bawcom +Pedro Prieto +Andisiwe Ki +Pimsiri Panchia +Michal Krsmanovic +Kim Estrada +Pawel Jensen +Alison Potro +Zamandosi Chuang +Deni Yao +Mohamed Silva +Jukka Barros +Shara Gomez +Donald Aleksic +Jeroen Torstensson +Eslam Kaifuchi +Yevgeniy Ghiban +Carolina Macias +Philipine Hansen +Tim Han +Marian Atkinson +Pawel Coetzee +Westley Tatalashvili +Yihua Grunsven +Barna Vican +Hamish Drabenia +Mulualem Rodriguez +Lidija Usovich +Sergey Dahlberg +Gonzalo Nunes +Maro Jiang +Kira Richards-Ross +Francois Achour +Maria Smid +Wenwen Pitchford +Dakota Ulrich +Olga Castano +Olga Brize +Tino Henze +Grigor Suuto +Patricia Edward +Iuliia Barseghyan +Paul Tsakmakis +Marcia Ser +Remy Barac +Nicholas Hornsey +Kim Klaas +Nils Guzzetti +Carmelita Zahmi +Benjamin Jeong +Mclain Rakoczy +Anja Jang +Marc Atici +Anastasia England +Albert Barthel +Chu Willis +Karina Jelaca +Vitaliy Robson +Dzhamal Barry +Harry Brunstrom +Joel Tverdohlib +Shunsuke Erakovic +Alexandre Smedins +Hyunsung Ivancsik +Ewelina Hwang +Maximiliano Matsumoto +Charles Cadee +Gemma Wang +Yue Zargari +Natthanan Caluag +Hoi Martina +Mohamed Soares +Hajung Cardona +Josefin Crawshay +Kyung Granstrom +Jemma Modenesi +Viktor Michshuk +Kate Pink +Derek Dancette +Po Otsuka +Hannah Gherman +Alistair McGeorge +Ashley Johansson +Bjoern Markt +Karen Okruashvili +Mizuho Suetsuna +Aselefech Gkountoulas +Danielys Butler +Lenise Liu +Rima Sommer +Richard Ruiz +Hyok Maciulis +Alan Mestres +George Terpstra +Zhiwen Wu +Lisbeth Alptekin +Jean-Christophe Kirkham +Emanuele Siegelaar +Donglun Nhlapo +Onan Kim +Christian Machavariani +Nahla Zhedik +Helen Beaubien +Alexandre Sawers +Hanna-Maria Bluman +Dunia Paton +Endene Samsonov +Rosario Rulon +Chen Moulinet +Manuela Syllabova +Christopher Erichsen +Haris Sinclair +Dylan Espinosa +Mikhail Napoleao +Katarzyna Calabrese +Artur Talbot +Stefan Noonan +James Meszaros +Jennifer Johnson +Viktoriia Madico +Aline Peters +Lleyton Houghton +Rasmus Rindom +Yang Yin +Mattias Kovtunovskaia +Damian Woods +Marina Murphy +Jiao Fasungova +Mohamed Kazakevic +Juan Osl +Sonia Gillis +Takamasa Kasa +Sara Birarelli +Velichko Connor +Camilla Terpstra +Khairul Morningstar +Eve Pessoa +Katya Baddeley +Lucy Burmistrova +Nicolas Gyurov +Joao Shavdatuashvili +Lina Al-Jumaili +Elia Mota +Reza Hoff +Vera Rickard +Klaas Wykes +Abdalaati Rodriguez +Josefin Ma +Victoria Homklin +Kerron Saedeleer +Jamie Kinderis +Derrick Jackson +Viorica Schwarzkopf +Yin Toma +Melanie Disney-May +Elena Quinonez +Marina Kim +Pavlo Stewart +Lucia O'malley +Gabrielle Lidberg +Matthieu Wang +Joachim Mironcic +Alejandro Collins +Silvia Nakamoto +Emmeline Vasilionak +Shuang Cabrera +Keon Mcculloch +Justin Mandir +Wanida Barjaktarovic +Ilya Saito +Hiroyuki Meye +Amine Lin +Nikola Zevina +Margarita Donckers +Emanuel Hanany +Hannah Knioua +Victoria Davis +Kara Vougiouka +Daniela Schaer +Laura Sanca +Adnane Kim +Louisa Hazer +Sangjin Hindes +Risa Synoradzka +Anthony Machavariani +Milena Wojnarowicz +Bernard Tamayo +Yue Birmingham +Timothy Goffin +Andre Qin +Rachel Gonzalez +Desiree Kavcic +Pedro Egelstaff +Serghei Alhasan +Hideki Liivamagi +Jorge Lambert +Mary Wallace +Brittany Askarov +Marian Jager +Bostjan Kasold +Kerron Bracciali +Miyu Murray +Katherine Luca +Jade Jallouz +Sinead McHale +Saskia Pliev +Byron Lezak +Thiago Rosso +Sandra Kaukenas +Stephanie Rodrigues +Traian Chen +Milka Spiegelburg +Ifeoma Lahbabi +Neil Kopp +Louise Karimov +Vittoria Lima +Sara Walker +Jinling Golovkina +Vesna Rutter +Chien-Ying Bompastor +Mylene Haywood +Damian Baki +Dmytro Song +Dmytro Golding +Cy Malzahn +Darae Charlos +On Schops +Rene Chen +James McNeill +Vincent Krasnov +Tsvetana Jennings +Yomara Setiadi +Jongwoo Sin +Erik Plouffe +Petar Dominguez +Ali Watanabe +Lisa Edgar +Patrick Miles +Antonina Raif +Yimeng Amaris +Mireia Lindh +Ivana Fajdek +Won Teltull +Kateryna Matei +Ahmed Elkawiseh +Anna Holzdeppe +Yunlei Xu +Rafael Yero +Virgil Neny +Marcel Cainero +Kimberly Yu +Ahmed Gordon +Nicola Hosking +Francisco Feldwehr +Carolina Rondelez +Lucas Ahmed +Tomasz Jang +Alvaro Viljoen +Allison Musinschi +Vladimir Benedetti +Lizzie Sheiko +DeeDee Dumitrescu-Lazar +Jordan Panizzon +Cian Purnell +Julia Dovgodko +Jamol Perez +William Salminen +Gavin Bauza +Shaune Milevicius +Sophie Giorgetti +Jonas Ciglar +Fergus Sykorova +Attila Vicaut +Julie Ovchinnikovs +Hagos Hassler +Xing Varga +Nina Krause +Lena Miyama +Jamaladdin Dalby +Andreas Stanning +Besik Unsworth +Lei Wojtkowiak +Roderick Atari +Tamara Cafaro +Pierre-Alexis Zhang +Anna Hosking +Irina Song +Juan Lovric +Mattia Saramotins +Norman Chen +Tina Boidin +Roger Kaeufer +Gulsah Makarova +Luigi Schwaiger +Yulan Mohaupt +Matthew Lessard +Qingfeng Li +Caster Gong +Louisa Horasan +Eric Silva +Dilshod Thiney +Paola Tai +Ehsan Yamazaki +Nevin Ikeda +Sebastian Gadabadze +Ponloeu Inthavong +Ai Portela +Ciaran Susanu +Xiaoxu Cardoso +Olena Kromowidjojo +Krista Dai +Hakim Nyantai +Eric Birca +Johan Arvaniti +Maksim Loza +Luke Ruh +Matt Waite +Martyna Kirkbride +Amanda Tateno +Deokhyeon Khinchegashvili +Marcelo Filippov +Luka Begu +Aleksandar Sandell +Aleksandra Gordon +Jitka Tranter +Thais Pereira +Silvio Steryiou +Seoyeong Montoya +Ilya Marcano +Aya Rakoczy +Whaseung Maresova +Emma Wei +Rebecca Ruta +Jitka Mottram +Gaetane Partridge +Yuliya Shiratori +Konstantin Papachristos +Teklit Zheng +Amer Reyes +Iaroslav Jakabos +Konstadinos Troicki +Alexander Frederiksen +Asumi Colo +Mohamed Steele +Patricia Zhang +Aniko Blume +Ensar Taylor +Konstadinos Voronov +Danijel Paderina +Jose Paldanius +Yerzhan Poulios +Marton Coetzee +Marius-Vasile Sidi +Martin Voulgarakis +Adnan Brendel +Lynne Om +Mateusz Mendoza +Simon Zordo +Moussa Fernandez +Aron Pilhofer +Michael Orjuela +Neisha Liang +Oliver Mokoka +Nurul Han +Eduarda Bartonova +Beth Mazuryk +Karolina Wells +Jenny Flognman +Serhiy Kang +Gundegmaa El-Sheryf +Alexandr Liu +Bubmin Saenz +Kevin Dawidowicz +Eusebio Wallace +Mario Vanasch +Todd Kuzmenok +Amine Kiss +Jing Sprunger +Ola Almeida +Carl Roux +Yumeka Guo +Mikaela Iwao +Daniel Loyden +Zouhair Ri +Marcus Khalid +Marcelien Hosnyanszky +Julian Antosova +Dzmitry Busienei +Rutger Mareghni +Antonin Morais +Shiho Brens +Suyoung Rodrigues +El-Sayed Prodius +Thi Kostadinov +Marcelinho Pendrel +Anita Goubel +Jacques Ide +Pieter-Jan Huang +Andreas Paonessa +Ever Levins +Anton Dlamini +Mark Turner +Natalia Lippok +Austra Bauza +Sophie Ahmadov +Yuhan Ryang +Uladzimir Bertrand +Jean-Christophe Pompey +Mike Bostock +Edgars Meshref +Amy Zaiser +Sarah Lokluoglu +Lorena Marenic +Andrea Kimani +Hye Wallace +Aina Gavrilovich +Stina Perova +James Chetcuti +Yik Akkaoui +Sadio Chouiref +Vincent Robinson +Chia Jensen +Yibo Al-Jumaili +Borja Rodriguez +Juan Oiwa +Caba Mandic +Vanesa Hitchon +Zamandosi Flood +Shehab Makhloufi +Xi Somogyi +James Takase +Jean-Christophe Davenport +Matias Hosnyanszky +Ava Silva +Myung McCafferty +Ali Milthaler +Junjing Kang +Stepan Gallantree +Bebey Rodaki +Andrew Liu +Marcin Mihamle +Liangliang Miller +Diego Udovicic +Yoo Miller +Yoon Kelsey +Walton Souleymane +Wirimai Enders +Louis Maneza +Sanne Kuo +Mie Callahan +Younghui Karasek +Ahmed Chammartin +Arlene Douka +Katharina Bartonickova +Karen Rew +Constanze Sanchez +Abraham Benitez +Mikhail Polaczyk +Jie Tarasova +Nadezda Lee +Oscar Mitic +Vincent Hartig +Silke Nam +Ziwei Braas +Agnieszka Iersel +Nenad Blerk +Mikhail Vlcek +Jangy Scott-Arruda +Suyeon Woo +Ivana Monteiro +Chun Yamaleu +Richard Kim +Khadzhimurat Wilkinson +Lidiia Ng +Nazmi Patrikeev +Julia Jeon +Kelly Gemmell +Olexiy Cheon +Emily Chow +Slobodan Elaisa +Zachary Podryadova +Sonja Ide +Klara Gubarev +Jeannette Prokopiev +Jaime Bruno +Michela Brown +Camille Andersen +Christofer Sokolova +Erwan Putra +Zsuzsanna Hodge +Xavier Cox +Chie Aigner +Shinichi Grasu +Chloe Santos +Lukasz Draudvila +Lee-Ann Song +Ana Williams +Ahmed Saladuha +Dina Hwang +Naydene Cabral +Krystian Pen +Lijie Fowles +Carlos Cebrian +Roba Suvorau +Ayako Coetzee +Lucas Neal +James Aniello +Bruno Tomas +Ju Isner +Tanyaporn Mazuryk +Javier Branza +Jinhyeok Yamaguchi +Robert Dent +Peng Perez +Valerie Battisti +Iuliana Costa +Stijn Choi +Yasemin Cavela +Alexander Obermoser +Irene Soloniaina +Yu Chinnawong +Anton Gu +Gia Mogawane +Jayde Madarasz +Boniface Kanis +Esref Moiseev +Yadira Psarra +Glenn Filandra +Marouen Tatari +Alex Nichols +Ibrahima Csima +Tinne Campriani +Cesar Chen +Ken Roland +Ivan Nakai +Olha Lewis-Smallwood +Alfonso Jneibi +Bashir Krovyakov +Yanfei Nono +Julien Chen +Kayono Nikitina +Spyridon Zhou +Elisabeth Amertil +Benjamin Noumonvi +Aldo Cerkovskis +Sandrine Lapeyre +Jehue Zolnerovics +Silvia Ioneticu +Aries Coston +Carli Kajuga +Denys Hasannen +Jo-Wilfried Schornberg +Daniel Kouassi +Jonas Vlcek +Aaron Purevjargal +Adrianti Tsirekidze +Anthony Dahlgren +Kaliese Sudol +Hellen Maher +Irene Russell +Lucy Vitting +Jamale Fu +Tatsuhiro Thompson +Cameron Allepuz +Crisanto Saikawa +Samantha Ahamada +Nguyen Mueller +Marcia Khubbieva +Kris White +Samantha Hantuchova +Andy Maier +Joshua Azcarraga +Tamas Fredericks +Mareme Mihelic +Natalya Mrabet +Christopher Follmann +Arturs Swann +Jianlian Burgers +Dongwon Rodriguez +Krystian Kean +Seen Flores +Maxime Tatishvili +Damien Hejmej +Sally Fuamatu +Lok Al-Athba +Diego Saedeleer +Lina Bujdoso +Barbara Hutten +Ioulietta Assefa +Martyn Stasiulis +Sergej Yli-Kiikka +Lionel Shabanov +Shara Burgrova +Alvaro Tanatarov +Bin Iersel +Dominic Al-Azzawi +Larisa Nagy +Ashley Saramotins +Lukas Jang +Peter Zyabkina +Sofiane Satch +Sandeep Karayel +Robbert Kanerva +Kanae Bracciali +Tim Mankoc +Aleksandr Inthavong +Alix Dziamidava +Pietro Boukhima +Murilo Rohart +Radu Colley +Lieuwe Lim +Henk Mrvaljevic +Ka Ilyes +Keith Pavoni +Seongeun Magdanis +Kate Scheuber +Kevin Giovannoni +Fionnuala Horst +Dmitriy Liang +Beth Andrade +Nicholas Nechita +El Rooney +Juliane Yanit +Wesley Meftah +Komeil Matheson +Nadiya BAER +Athanasia Ayling +Feiyi Zavadsky +Reza Egelstaff +Rasul Tichelt +Valentina Teschke +Nastassia Zalsky +Tamas Guo +Irina Tigau +Kianoush Tan +Alana Thiam +Moses Sihame +Elena Zhang +Naomi Gattsiev +Victor Ganeev +Valerie Penezic +Rachelle Cherniavska +Sardar Vuckovic +Sarah Guzzetti +Daniel Huckle +Mohamed Koo +Donglun Rohner +Ahreum Sum +Theodora Conway +Agnes Vasina +Magalie Allen +Xuanxu Barnard +Vladimir Dehghanabnavi +Darryl Strebel +Sholpan Draudvila +Cornel Ding +Katarina Rogina +Amy Prevot +Leah Aleksic +Eva Markussen +Melissa Brguljan +Timothy Li +Cindy Narcisse +Aleksei Rouwendaal +Njisane Arkhipova +Anaso Booth +Alexandros Grumier +Annalie Ekame +Alex Kim +Joshua Fenclova +Megan Raymond +Wen Ghayaza +Ryan Prasad +Monika Hwang +Anna Hirano +Johannes Berna +Timm Augustyn +Melanie Gibson-Byrne +Ravil Ismail +Gediminas Whitehurst +Rashed Head +Siham Moura +Molly Shtokalov +Darlenis Helal +Gabrielle Tikhomirova +Hanna Wraae +Emilio Williams +Leryn Henao +Eun Burton +Iain Kossayev +Laura Ng +Nicholas Ihle +Donglun Borlee +Patrick Navarro +David Jeong +Anastasia Biannic +Jana Yudin +Mohamed Nystrand +Toea Liptak +Jessica Sprenger +Peter Garcia +Ling Kromowidjojo +Hamid David +Jessica Garderen +Emmanuel Hornsey +Sven Nascimento +Vasilij Wang +Sanya Dreesens +Nacissela Makarau +Mikalai Bassaw +Kelly Kulish +Facinet Ratna +Michael Mirnyi +Szabolcs Culley +Kozue Martinez +Ahmet Polishchuk +Kay Coster +Casey Mccabe +Aldo Nicolas +Yasmin Brathwaite +DeeDee Montoya +Tyler Belmadani +Sascha Bentley +Dongho Jensen +Annari Simmonds +Delwayne Boon +Thomas Antonov +Mizuho Bennett +Elena Clark +Wissem Davies +Birhan Evans +Viktoriya Aguirregaray +Jussi Nesti +Jordan Ndoumbe +Kianoush Skrimov +Janin Aramburu +Marie-Pier Schultze +Nikolaus Milatz +Ling Langridge +Yury Mensah-Bonsu +Mate Montano +Mariusz Yang +Maurine Peters +Kay Rosa +Daniel Marburg +Jamila Rodhe +Almensh Zbogar +Evgeny May-Treanor +Yutong Pena +Ivana Lee +Oluwasegun Annabel +Marta Pyatachenko +Tatyana Mitrovic +Kelsey Bludova +Fanny Castillo +Georgia Tipsarevic +Rimantas Luca +Johana Pistorius +Matteo Nieminen +Alexis Diaz +Tarek Takahira +Hae-Ran Garcia +Alice Irabaruta +Mariya Gibson +Ravil Mokoena +Galen Kirpulyanskyy +Danielle Edlund +Henk Schorn +Jerome Pikkarainen +Norbert Feldwehr +Carlos Sekaric +Kyle Baddeley +Sviatlana Kable +Alexander Jiang +Sergey Zurrer +Jan-Di Kazlou +Jeneba Lee +Dathan Ziadi +Nourhan Benfeito +Arantxa Kalnins +Dagmara Balla +Yauheni Sokolowska +Brittany Crain +Fredy Melis +Casey Basic +Teun Tancock +Matteo Goncharova +Lene Zargari +Lauryn Powrie +Cristian Bennett +Tyson Tong +Shalane Shiratori +Francena Savchenko +Larissa Zhu +Diego Stojic +Margaux Glanc +Mostafa Kleen +Arnie Flaque +Benjamin Parker +Fabio Simonet +Nicola Socko +Iveta Blagojevic +Momotaro Khmyrova +Alexander Kurbanov +Daria Shkurenev +Mihai Correa +Azad Lavanchy +Marielis Findlay +Jonathan Niit +Bogdan Zavadova +Marry Gille +Francine Beaudry +Sergey Kain +Riza Bleasdale +Soufiane Odumosu +Bill Turner +Raphael Hardee +le Toksoy +Emanuele Oulmou +Peter Sloma +Angela Palomo +Peter Neethling +Michelle Kirilenko diff --git a/tests/sh/teacher/mystery2/memberships/Terminal_City_Library b/tests/sh/teacher/mystery2/memberships/Terminal_City_Library new file mode 100644 index 00000000..1ad62822 --- /dev/null +++ b/tests/sh/teacher/mystery2/memberships/Terminal_City_Library @@ -0,0 +1,1296 @@ +Julen Fogarty +Fabian Knight +Katarzyna Talay +Antonina Raif +Viktor Lamdassem +Yuko Gennaro +Hui Ahmed +Bianca Athanasiadis +Nils Guzzetti +Natasha Haywood +Sheng Romdhane +Hannah Barker +Marcos Laukkanen +Konstantin Papachristos +Andres Bouramdane +Mohamed Soares +Ivan Araujo +Kacper Coster +Woroud Baroukh +Benjamin Pietrus +Amer Lao +Tania Silva +Mario Boninfante +Rafal Hartley +Norayr Burton +Alicia Samoilau +Nicholas Kudryashov +Javier Branza +Eric Rouba +Elena Clark +Ioannis Tkach +Maximiliano Han +Marius Davies +Antonina Bernier +Irene Morath +Mikalai Bassaw +Zivko Manafov +Russell Miao +Yuliya Shiratori +Lucy Perez +Adam Sasaki +Mattias Kovtunovskaia +Sanja Silva +Meiliana Berglund +Nahla Tyler +Sarra Bainbridge +Donggeun Guion-Firmin +Keehee Rivers +Habibollah Smith +Melissa Brguljan +Kelis Wurzel +Maria Arismendi +Irawan Souza +Ahmed Weir +Kirani Kalargaris +Ioannis Burgaard +Sara Campbell +Becky Wozniak +Yuhan Ryang +Anita Goubel +Asgeir Goffin +Ganna Zonta +Anaso Booth +Alexander Kosok +Attila Vicaut +Donatien Lotfi +Masashi Angilella +Destinee Kucana +Milan Emmolo +Pavlos Nicolas +Daouda Martelli +Elisabeth Worthington +Braian Haydar +James Chetcuti +Darryl Soeda +Arseniy Janik +Alexandra Solja +Adrienne Buntic +Mujinga Peterson +Stsiapan Balmy +Jonathan Perez-Dortona +Celeste Leroy +Lucy Burmistrova +Zargo Dehesa +Marilyn Dominguez +Mhairi French +William Girard +Yu Moradi +Andriy Lukashyk +Monika Herman +Lukas Gong +Yuichi Burgh +Omar Dumerc +Clara Ahye +Yige Lamoen +Ai Lovtcova +Julie Ovchinnikovs +Janet Ganeev +Sven Nascimento +Sara Friis +Paul Demare +Yauhen Rafferty +Russell Aidietyte +Jan-Di Ilias +Norma Tomic +Julie Henriques +Andrew Monteiro +Brahim Wang +Omar Hurst +Ainhoa Taylor +Chun Yamaleu +Camille Andersen +Massimo Groot +Maksim Acuff +Rebecca Reid-Ross +Ruta Trowbridge +Kame Vesely +Bilel Karth +Ryan Fogg +James McNeill +Stefan Webster +Sarra Larsen +Jose Morgan +Par Awad +Yuhei Hybois +Kiril Larsson +Dalibor Gibson +Nenad Moran +Susana Barcelo +Elea Li +Mattia Sanchez +Emmanuel Barbieri +Sonata Raif +Maurine Peters +Todd Lewis-Smallwood +Anis Boninfante +Martin Houvenaghel +Afgan Mrvaljevic +Lisa Edgar +Silas Voronkov +Kilakone D'elia +Teresa Andrewartha +Kristina Liess +Minxia Yu +Peter Neethling +Yayoi Buckman +Nuno Rajabi +Ying Dancette +Jeff Larson +Tina Hristova +Lucia Berens +Michela Ayed +Martino Mayer +Norbert Feldwehr +Jade Kopac +Israel Osman +Mikhail Napoleao +Liam Edelman +Anderson Guo +Stanislav Dorneanu +Ahmed Annani +David Schuh +Aziz Chaabane +Hannah Knioua +Andrea Lammers +Pavel Lee +Eric Babos +Automne Driel +Maureen Silva +Charles He +Tosin Mckendry +Prince Zyl +Joel Tverdohlib +Jieun Sukhorukov +Juan Jeon +Rafael Vezzali +Phuttharaksa Signate +Edinson Rodrigues +Jehue Wild +Marina Murphy +Sara Hore +Marco Dries +Emiliia Gebhardt +Konstadinos Voronov +Aleksey Garcia +Hellen Maher +Maximilian Sedoykina +Samantha Zavadova +Martin Kergyte +Rokas Karasev +Daniel Shipilova +James Rosic +Dae-Nam Dunkley-Smith +Kari Boulleau +Teklemariam Fabre +Joshua Grechishnikova +Samson Burgaard +Azad Lavanchy +Milos Pavoni +Ashleigh Aissou +Sungdong Willis +Melissa Jovanovic +Kelsey Bludova +Cristiane Forciniti +Alexander Kurbanov +Radoslav Susanu +Dariya Bratoev +Alexander Hansen +Yennifer Haydar +Yonas Farrell +David Ferreira +William Salminen +Ying Marinova +Betsey Cunha +Faith Kim +Kyuwoong Pacheco +Bahar Febrianti +Evgeniya Maneva +Jessica Steger +Jose Banks +Katerin Pliev +Mario Vanasch +Marcin Mihamle +Karlo Romagnolo +Fabrizio Lanigan-O'keeffe +Francisco Lahbabi +Khalil Shi +Stephanie Hansen +Jake Claver +Juan Ananenka +Lieuwe Lim +Birhan Ryan +Kateryna Henzell +Vera Silva +Job Kretschmer +Ramon Kirkham +Boniface Kanis +Dagmara Balla +Liangliang Miller +Victoria Monteiro +Joe Germuska +Shana Halsall +Maris Izmaylova +Zohar Iwashimizu +Nelson Meilutyte +Claudia Butkevych +Diego Shing +Wen Ghayaza +Roel Garcia +Hedvig Alameri +George Rupp +Eva Hirata +Matiss Rosa +Nicola Belikova +Robert Ryan +Xiaoxiang Lan +Jie Tarasova +Benjamin Parker +David Dawidowicz +Gabrielle Lidberg +Zafeirios Ryu +Yaroslava Mehmedi +David Perez +Tomas Kaki +Monika Heidler +Elena Michan +William Bindrich +Salma Cely +Jonas Ciglar +Karen Brandl +Flor Magnini +Dragos Stone +Bartlomiej Marroquin +Ediz Raja +Steven Schlanger +Xavier Hayashi +Joel Giordano +Ashleigh Bruno +Jemma Wang +Glenn Gonzalez +Artiom Engin +Anett Kamaruddin +Fernanda Armstrong +Heather Billings +Slobodan White +Attila Sullivan +Elisa Ouedraogo +Claudia Eshuis +Pavel Lepron +Muhamad Lascar +Dmitriy Liang +Sabine Moffatt +Debbie Mohamed +Colin Vila +Elena Mekic +Vladimir King +Erik Plouffe +Ibrahima Csima +Lena Bithell +Bohdan Kostelecky +Dorian Sankuru +Vladimir Frayer +Ana Pavia +Tanyaporn Mohamed +Yifang Jang +Ka Ma +Zsofia Wang +John Keefe +Jirina Hojka +Daria Schmid +Jurgen Arndt +Jermaine Qin +Thomas Peralta +Iveta Blagojevic +Carlos Liu +Marcel Sigurdsson +Henk Schorn +David Jr +Megan Raymond +Katerina Saenz +Pascal Leroy +Eric Lemaitre +Marion Reynolds +Gauthier Bindrich +Vignir Charter +Shaune Milevicius +Jennifer Marco +Spas Traore +Asumi Colo +Sena Pietrus +Guzel Kahlefeldt +Mostafa Kleen +Sam Tian +Eva Mocsai +Igor Turner +Marta Pyatachenko +Andrew Wang +Ole Suhr +Monika Hwang +Jaime Ramadan +Sinta Denisov +Etenesh Liptak +Jamaladdin Dalby +Adrian Melzer +Akzhurek Whitty +Ivan Hollstein +Dominique Hall +Marcello Mendoza +Jens Lavrentyev +Kerron Bracciali +Olga Jankovic +Konstadinos Sauer +Simon Matsuda +Brittany Brzozowicz +Matteo Verschuren +Anthony Gerrand +Roline Rolin +Giovanni Kovacevic +Jorge Apithy +Suzana Teutenberg +Francielle Ziolkowski +Shinichi Hahn +Soulmaz Zolnerovics +Christos Jo +Layne Halsall +Gabor Palies +Janis Hansen +Grace Williams +Toshiyuki Nyasango +Marc Clair +Mohamed Kazakevic +Jonathan Glanc +Ahmed Sorokina +Zamandosi Chuang +Tiago Gillow +Sandra Kaukenas +Natalya Prorok +Matt Waite +Stanislav Krug +Jimmy Akizu +Jason Hostetler +Sam Scott-Arruda +Mark Arrighetti +Kristine Lynsha +Murray Nurudinov +Jessica Manker +Renata Rasic +Sergey Abalo +Aleksandr Kim +Xiaodong Dulko +Thais Pereira +Elena Costa +Peter Jang +Haibing Salvatori +Maria Kirkham +Jiaxing Bespalova +Ivo Bagdonas +Emmanuel Montoya +Artem Sanchez +Donatien Otoshi +Chia Bleasdale +Josefin Lamdassem +Wenwen Samilidis +Yunwen Crous +Lance Maksimovic +Aleksandar Abian +Nanthana Chen +Maryna Le +Iosif Wang +Dalibor Vidal +Josefin Crawshay +Linus Cha +Nyam-Ochir Yauhleuskaya +Hassan Nichols +Almensh Tuara +Mona Taibi +Hristo Avan +Branden Cavela +Imke Bosetti +Anastasia Gal +Tugba Brecciaroli +Oiana Mirnyi +Simon Zordo +Roderick Huang +Kerron Saedeleer +Kevin Dawidowicz +Laurence Intanon +Xiaojun Lee +Iurii Parker +Paolo Sirikaew +Kunzang Kim +Boglarka Vacenovska +Todd Istomin +Arlene Ketin +Hope Cseh +Szabolcs Culley +Sebastian Iwabuchi +Alexander Mccabe +El-Sayed Prodius +Andreas Soares +Norma Aanholt +Kenenisa Tomasevic +Shara Burgrova +Tsvetana Rogers +Zac Ashwood +Ruggero Dong +Martin Vanegas +Nguyen Barshim +Oleh Chinnawong +Melanie Disney-May +Urska Anacharsis +Rene Antosova +Bruno Tomas +Matthew Chakhnashvili +Feiyi Zavadsky +Sergej Ayalew +Jordan Ndoumbe +Bruno Oliver +Amina Pesce +Keith Pavoni +Xin Cuddihy +Mirco Pavoni +Athina Kula +Georgii Scheibl +Laurence Zyabkina +Laura Assefa +Glenn Liivamagi +Shalane Shiratori +Evi Junkrajang +Roberto Tsakonas +Lihua Ivanova +Mannad Khitraya +Carl Nielsen +Julia Kaniskina +Aksana Melian +Ligia Tancock +Yang Yin +Samira Grubisic +Jennifer Johnson +Stacey Frolov +Natalia Sombroek +Hayley Fischer +Ubaldina Ziegler +Aleksei Rouwendaal +Kenny Faminou +Ida Deak-Bardos +Martin Murray +Allan Liu +Bertrand Nakamoto +Narumi Hoketsu +Seen Flores +Joshua Capkova +Silvia Chaika +Marit Mickle +Jessica Basalaj +Ning Chen +Marta Marjanac +Hannah Jumah +Andrey Kim +Neymar Kaczor +Troy Garrigues +Bebey Rodaki +Fredy Ezzine +Mary Tomashova +Charles Zwarycz +Niklas Capelli +Luigi Marshall +Ibrahima Louw +Alessio Ariza +Kate Bourihane +Tiffany Zeid +Rodrigo Santos +Nedzad Braithwaite +Btissam Brunstrom +Olivia Gascon +Matthew Dalby +Clara Jeong +Thiago Gu +Abdelaziz Durant +Ebrahim Maeyens +Ekaterina Perera +Esref Moiseev +Kristi Melo +Aron Pilhofer +Nicole Shumak +Gemma Gaiduchik +Sibusiso Yudin +Darryl Strebel +Yang Fraser +Nguyen Calderon +The Joker +Iain Hartig +Johannes Willis +Jessica Fukumoto +Annari Simmonds +Maryna Desprat +Huajun Kerber +Barry Utanga +Pui Na +Vitali Oliver +Rosie Golas +Gilles Jang +Jun Podlesnyy +Christa Kvitova +Jonathan Gudmundsson +Pietro Walker +Xin Reis +Pops Terlecki +Xia Lansink +Goldie Marais +Savva Ford +Yahima Menkov +El Toth +Marlene Nicholson +Oleksiy Ferrer +Craig Csima +Ning Knowles +Jur Gebremeskel +Amy Zaiser +Maria Emmons +Nicola Socko +Dongho Jensen +Piotr Rabente +Victor Kondo +Jerome Amoros +Martin Amb +Dilshod Duong +Aleksandr Calder +Iryna Radovic +Marina Neuenschwander +Karolina Brennauer +Prisilla Nakamura +Alyssa Geikie +Geraint Traore +George Gogoladze +Pavlos Castro +Magdalena Kondratyeva +Gemma Milburn +Amanda Kalnins +Raul Baumrtova +Lijie Fowles +Benjamin Bussaglia +Daria Fouhy +Jeremiah Dean +Sofya Mortelette +Eric Sawa +Herve Kasa +Shane Wu +Vladimir Benedetti +Richard Hybois +Kristina Sireau +Adrian Lidberg +Alexis Mallet +Kurt Tran-Swensen +Leyla Szabo +Joao Dovgodko +Antoinette Silva +Risto Bertrand +Jens Seierskilde +Suwaibou Klemencic +Susana Neymour +Tinne Campriani +Rasul Tichelt +George Terpstra +Petra Sakai +Mi-Gyong Chen +George Liu +Andile Li +Vera Frangilli +Anfisa Whalan +Andrea Reilly +Patrik Brown +Kien Mottram +Stephanie Adlington +Eve Pessoa +Mandy Hinestroza +Silke Gallopin +Shugen Elkhedr +Joel Kammerichs +Riki Solomon +Hanna-Maria Bluman +Lisa Kamaruddin +Ahmed Gordon +Wing McMillan +Janelle Ovchinnikovs +Lene Zargari +Peter Wagner +Jan Sandig +Sergey Dahlberg +Kathleen Schmidt +Paulo Seric +Bryan Razarenova +Illse Mylonakis +Simona Skornyakov +Muller Nikcevic +Tino Henze +Mona Colupaev +Yi Daba +Michael Sjostrand +Anna Hosking +Alexey Gille +Henk Mrvaljevic +Sa-Nee Saldarriaga +Jakub Gondos +Kelly Drexler +Steven Stevens +Lina Hassine +Dorothy Abdvali +Carlos Hall +Ryan Welte +Christophe Tanii +Jens Tuimalealiifano +Hamza Tomecek +Maria Figlioli +Apostolos Sharp +Ondrej Houssaye +Diletta Sukochev +Sonia Williams +Lars Sobirov +Emma Chadid +Nanne Maree +Gil Warfe +Mike Bostock +Sinead McHale +Lindsay Savard +Vardan Romeu +Attila Tafatatha +Marina Kim +Daigoro Johansson +Kyung Steffensen +Lena Gasimov +Jinhui Brens +Danyal Achara +Esteban Storck +Igor Kasa +Jolanta Vives +Juliane Kim +Emma Wei +Hilder Zairov +Fateh Kovalev +Reinaldo Mutlu +Georgios Antal +Suhrob Jacob +Miho Franco +Sarah Ogimi +Vladimir Desravine +Alexander Lohvynenko +Tapio Gorman +Juan Lacrabere +Reika Moretti +Hossam Franek +Gerald Afroudakis +Anna Martinez +Wenling Aguiar +Ashley Kukors +Kellie Leon +Ivana Lee +Grega Horton +Nedzad Crisp +Paul Casey +Jamila Rodhe +Rebecca Orlova +Fabiana Kasyanov +Niclas Tymoshchenko +Jere Guidea +Sajjad Ulrich +Bebey Adamski +Lee Farris +Tamara Cafaro +Ravil Ismail +Nataliya Gherman +Olga Kasza +Yoshimi Szucs +Gabrio Dowabobo +Shane Gemmell +Olga Varnish +Teerawat Gueye +Yusuf Riner +Diguan Muff +Bianca Sekyrova +Elena Modenesi +Jan Garcia +Pedro Egelstaff +Valentino Ferguson-McKenzie +Gonzalo Gough +Matyas Lopez +Traian Chen +Cesar Chen +Fanny Castillo +Heiki Outteridge +Katarzyna Calabrese +Christopher Wilson +Anderson Schenk +Justine Ferrari +Takayuki Dundar +Ade Oconnor +Norbert Prokopenko +Tyler Payet +Margarita Ariza +Adam Yumira +Abdalaati Rodriguez +Asgeir Lamble +Nathalie Ionescu +Chantae Matuhin +Francesca Rowbotham +Gareth Culley +Andrei Masna +Michael Yamamoto +Tetsuya Cabrera +Alan Cerches +Roland Scott +Inaki Milanovic-Litre +Didier Munoz +Agnieszka Knittel +Maureen Makanza +Laura Wu +Daniel Silva +Lauren Subotic +James Seferovic +Tanoh Mehari +Daniela Gavnholt +Sviatlana Kable +Kumi Lewis-Francis +Deokhyeon Khinchegashvili +Mohammad Goderie +Francisco Lips +Johnno Listopadova +Patricia Bauer +Matthew Toth +Carmelita Zahmi +Yana Takatani +Kylie Ignaczak +Peter Malloy +Wesley Meftah +Chui Jacobsen +Luigi Luca +Chris Keller +Josefa Zambrano +Jiawei Crisp +Manuel Silva +Nikolaus Milatz +Gesa Su +Daniela Rajabi +Ju Isner +Malek Tomicevic +Ligia Jefferies +Romain Haig +Thomas Aly +Ed Papamihail +Younghui Karasek +Jordis Botia +Christen Gonzalez +Benjamin Kempas +Krystian Pen +Mikaela Iwao +Tsilavina Wozniacki +Kim Milczarek +Tatyana Flognman +Mervyn Mcmahon +Vanesa Hitchon +Zane Cane +Caroline Warlow +Byungchul Bouqantar +Toea Robert-Michon +Aksana Zhang +Paula Botia +Tina Boidin +Keith Beresnyeva +Teerawat Iersel +Andres Deng +Kenneth Howden +Martino Wallace +Yura Motsalin +Tim Han +Jaqueline Shcherbatsevich +Lee-Ann Song +Rebecca Teply +Shuai Huang +Thomas Frolov +Vlado Gu +Amy Kim +Mehdi Li +Maksim Muttai +Carolina Macias +Ferdinand Clair +Kelita Webster +Patrick Navarro +Sebastian Berdych +Atthaphon Starovic +Roberto Miller +Shinta Gong +Isabelle Grigorjeva +Carlos Yakimenko +Pavlo Stewart +Elyes Viteckova +Olga Schofield +Mie Hall +Nenad Blerk +Linyin Manojlovic +Annette Ouechtati +Yu Chinnawong +Candace Nagga +Lina Al-Jumaili +Adam Costa +Casey Mccabe +Mechiel Schulz +Yunlei Xu +Pajtim Nesterenko +Alberto Vidal +Euan Gunnarsson +Matthias Mendes +Marius-Vasile Biezen +Deron Estanguet +Simone Fesikov +Tarek Luis +Maynor Lemos +Borja Rodriguez +Ons Buljubasic +Caroline Ghislain +Kimberley Colhado +Maksim Culley +Khadzhimurat Wilkinson +Shane Dodig +Joseph Nolan +Jitka Mottram +Vanessa Figes +Esthera Koschischek +Jessica O'Connor +Tsimafei Helebrandt +Angel Souza +Sehryne Akrout +Kazuki Leroy +Courtney Bischof +Phillipp Absalon +Dakota Ulrich +Adelinde Mangold +Maria Smith +Tomasz Lanzone +Jana Rendon +Rodrigo Surgeloose +Yura Straume +Aretha Hatton +Ellie Danilyuk-Nevmerzhytskaya +Alistair Baccaille +Timm Augustyn +Davit Nibali +Gulnara Deeva +James Meszaros +Luigi Sofyan +Julia Dovgodko +Nikolina Otoshi +Viktor Santos +Nourhan Benfeito +Crisanto Saikawa +Taehee Bondaruk +Murat Huertas +Emmanuel Hornsey +Khairul Steffen +Eric Silva +Anna Savinova +Liubov Johansson +Andrew Guilheiro +Dipna Hammon +Augustin Lozano +Ilka Macias +Michal Bazlen +Niclas Calzada +Jongwoo Bognar +Dora Veljkovic +Ilona Harrison +Shara Gomez +Jessica Schwizer +Alex Kim +Nikolina Khuraskina +Yakhouba Garcia +Viktoriya Aguirregaray +Job Maestri +Natalie Barbosa +Mohanad Raudaschl +Akvile Saedeleer +Esref Pikkarainen +Judith Williams +Moritz Muller +Pal Amorim +Richard Kaniskina +Austra Bauza +Jane Hornsey +Gia Mogawane +Malek Greeff +Judith Zhu +Mario Husseiny +Carrie Spellerberg +Seen Dehesa +Sverre Dawkins +Raphaelle Batum +Jefferson He +Joseph Bartley +Ryosuke Ciglar +Carles Solesbury +Fabio Morkov +Mourad Nimke +Norayr Toth +Schillonie Benaissa +Vita Eckhardt +Stanislau Dmytrenko +Teresa Kim +Gloria Dean +Rosie Tempier +Denis McIntosh +Roline Camilo +Dion Pavlov +Viktor Rangelova +Andre Shimamoto +Jose Pedersen +Cy Malzahn +Sergiy Markt +Song-Chol Kim +Cesar Qin +Niki Grangeon +Hannah Gherman +Claudia Kavanagh +Carl Roux +Konstadinos Troicki +Tontowi Benedetti +Yutong Olaru +Dragan Murphy +Simone Morin +Docus Muff +Damian Baki +Geoffrey Plotyczer +le Toksoy +Iuliia Oatley +Yauheni Sokolowska +Alison Hayytbaeva +Sven Vandenbergh +Jillian Lalova +Elizabeth Batki +Nicholas Bithell +Oscar Bultheel +Kasper You +Aman Schulte +Robin Padilla +Alexander Filipovic +Spyridon Zhou +Al Shaw +Yasunari Jokovic +Paula Zhudina +Aida Ganiel +Max Lee +Georgina Manojlovic +Rayan Titenis +Allan Melgaard +Aldo Nicolas +Madias Jeffery +Jenny Flognman +Jin Pontifex +Dirk Steuer +Julian Hjelmer +Gyujin Nikolaev +Olga Mekic +Ieuan Zbogar +Dane Montelli +Markiyan Monteiro +Pablo Pereyra +Angelo Uhl +Natalia Kitamoto +Pierre-Alexis Steinegger +Luke Mamedova +Jan Ryakhov +Luca Kipyegon +Gretta Tang +Risa Synoradzka +Mariko Hidalgo +Emmanuel Willis +Giorgia Kleinert +Maneepong Lin +Fabiana Boussoughou +Rubie Sukhorukov +Mitch Trafton +Lucy Nakaya +Sergey Lee +Kum Musil +Manuel Davis +Klaas Wykes +Maoxing Bedik +Blazenko Ostling +Shao Watt +Esther Robinson +Jinzhe Trinquier +Simon Franco +Wendie Spearmon +Matteo Goncharova +Tatiana Naby +William Vicaut +Peter Sloma +Pietro Warfe +Elisabeth Santos +Shane Lima +Agnes Vasina +Michal Rochus +Guido Kanerva +Zachary Schelin +Ekaterina Thibus +Hugues Kim +Sarah Kozlov +Alexander Jiang +Adam Moreno +Valentyna Townsend +Huajun Oates +Hedvig Crain +Kara Vougiouka +Arnaldo Abella +Maroi Tatham +Anastasiya Jebbour +Julien Buchanan +Irina Camara +Igor Martin +Jens Biadulin +Thiago Rosso +Jemma Mayr +Raghd Ikehata +Georgina Issanova +Errol Benes +Eun Honrubia +Ardo Mastyanina +Edwige Henderson +Virginie Zhang +Vincenzo Moolman +Jos Oliva +Maksym Castillo +Shijia Conway +Sanja Kusuro +Vasilij Blouin +Chia England +Joel Scanlan +Peng Masai +Magalie Allen +Astrid Kusznierewicz +Lulu Maguire +Yoann Gentry +Nataliya Lippok +Kathleen Jo +Lara Siegelaar +Silvia Wambach +Yana Elmslie +Alise Bellaarouss +Tim Csonka +Antonija Dilmukhamedov +Lyudmyla Dilmukhamedov +Desiree Khachatryan +Stijn Choi +Hagos Hassler +Gal Pascual +Hector Moutoussamy +Connor Touzaint +Alejandro Velasquez +Ekaterina Hernandez +Craig Galvez +Aleksejs Collins +Konstadinos Houghton +Vladislav Sivkova +Srdjan Stein +Tina Teutenberg +Kirsten Wang +Marcin Desta +Madeleine Mitchell +Mirna Seck +Alexey Guloien +Azad Honeybone +Clarissa Skydan +Erina Cabrera +Vincent Lawrence +Nadezda Plouffe +Ji Stewart +Denis Rezola +Jun Szczepanski +Taufik Toksoy +Daniel Worthington +Gia Yoon +Asgeir Dzerkal +Zengyu Driel +Charles Wang +Abby Cooper +Louisa Tomas +Mariusz Yang +Ediz Gorlero +Woojin Nazaryan +Christina Vesela +Alan Mestres +Danilo Chabbey +Sultana Angelov +Ancuta Emmons +Fetra Shemarov +Jean Andrunache +Jack Garcia +Niki Batkovic +Sin Cambage +Vincent Girke +Rebecca Simon +Westley Tatalashvili +Francine Beaudry +Sofiane Satch +Jessie Vlahos +Saheed Durkovic +Lankantien Kristensen +Aya Rakoczy +James Aniello +Yawei Fourie +Damian Kim +Pawel Jensen +Citra Comba +Vasyl Geijer +Mihail Flanigan +Dino Aicardi +Petr Smith +Dmitriy Bartman +Zara Jung +Sara Jeong +Rudi Noga +Rauli Schlanger +Tyler Belmadani +Dorothy Rossi +Evi Fang +Kim Estrada +Nathan Nishikori +Daniel Verdasco +Dorian Taylor +Alice Liu +Katerine Podlesnyy +Vincenzo Kermani +Blair Wei +Patricia Guo +Torben Jaskolka +Michal Chatzitheodorou +Andrew Negrean +Zhiwen Wu +Emily Chow +Viktor Steffens +Enzo Balciunas +Katharina Mizuochi +Jiawei Koedooder +Amy Mizzau +Marcin Guderzo +Fortunato Asgari +Louisa Bassaw +Silviya Saholinirina +Shota Michta +Haley Deetlefs +Bill Turner +Brian Boyer +Timea Nus +Radoslaw Sze +Elodie Arcioni +Jonathan Cornelius +Yun Milevicius +Nicolas Dotto +Matthew Helgesson +Edith Sofyan +Riccardo Cheng +Soslan Fernandez +Amanda Ndlovu +Leryn Henao +Elisabeth Wukie +Sabrina Burns +Rachelle Roleder +Laura Neben +Eric Rolin +Kelly Kulish +Huizi Accambray +Milena Hall +Jong de +Michael Houvenaghel +Samir Panguana +Christina Maneephan +Alberto Gryn +Roland Deak-Bardos +Louise Mrisho +Njisane Arkhipova +Line Emanuel +Yohan Miljanic +Won Davison +Alexa Loch +Milos Blazhevski +Jana Yudin +Jackelina Gadisov +Trixi Niwa +Pedro Harper +Zi Stanning +Matti Othman +Xavier Cox +Jinzhe Aubameyang +Jonelle Ayim +Lankantien Parker +Rasmus Honeybone +Adnane Srebotnik +Adam Hatsko +Josephine Caleyron +Lizzie Sheiko +Aleksandrs Castellani +Luis Gascon +Byron Lezak +Dragana Yonemoto +Mark Skudina +Kasper Addy +Aniko Ahmed +Nilson Belmadani +Sergey Leiva +Jianfei Erokhin +Simon Stepanyuk +Tomasz Gkountoulas +Aleksandar Sandell +Hotaru Terceira +Joshua Fenclova +Yang Conti +Stsiapan Kaun +Karim Kuczynski +Kurt Sano +Beatriz Smock +Sabina Williams +Hyo Ponsot +Sergey Britton +Mateusz Yi +Diego Connor +Ruslan Filho +Aleksandar Fasungova +Claudine Baltacha +Andja Gabriele +Marcus O'leary +Wael Li +Tatyana Bernado +Xiaojun Hachlaf +Ranohon Montano +Simone Brathwaite +Svetlana Janoyan +Tina Ortiz +Ivana Grubisic +Christina Illarramendi +Gabriel Langridge +Mclain Rakoczy +Ferenc Aydarski +Gauthier Alimzhanov +Reza Hoff +Artur Darien +Reid Demanov +Sergio Modos +Mizuho Suetsuna +Marcin Cash +Nicola Saranovic +Maria Yim +Salima Nakano +Annika Wang +Sviatlana Zucchetti +Christopher Stafford +Xiang Wukie +Mohammad Li +Bernardo Thompson diff --git a/tests/sh/teacher/mystery2/streets/Buckingham_Place b/tests/sh/teacher/mystery2/streets/Buckingham_Place new file mode 100644 index 00000000..4b56e966 --- /dev/null +++ b/tests/sh/teacher/mystery2/streets/Buckingham_Place @@ -0,0 +1,300 @@ +one earthlings startles invitingly pall +headwaiter mate impregnability +unmake drainpipe utilities pointillist +apropos impressively forborne finite exempt +griming vised thankfully burlap hypertension +landsliding landfill furlong mittens heartland +bully tortoise enlargers roamed undressing +yuks troubleshooting seaboards +springtime deaves reinitialize puttying +densities warranties penultimates dehumanizes perorations +untangles stays smashing spinets breadfruits +granulating toreadors finishes knob headhunter +longhairs pennyweights womanizers +depressive overused disturbs glandular pillowed +fallibly proportioning settling jumpier +vagueness lethal alienating potted +immortalizing parfaits ignited malnutrition +feisty senseless manly fifths tailspin supposed downstairs +ringer drainers agiler pinholes reedier +meekest revolvers gobblers panelists unassigned yew butterfly +nuts singsonged writs arm dimness +bearing shags kleptomania sprinted barkers +augury bullied letups shimming filmy golds +thunders forbid snowflake unstabler moralist +torrential attributable poniards newsletter stealthier +breastplates bundled nationalization +invaliding fitfully figured keystones +misdoing unplugged newspapermen grandstand +shrouding pushed botanists pivots domed +mealier formerly trivet avenues flukey humorously +twofold sniffling misdoes intros bookmarked +subordinated amateur ambition tarpons fluttery +gassier soldiering irritant wavelengths wriggling +tarots gruesomely pair minks enrapture +stupefy dukedoms emanating manikin enshrines +freaky meditated paginating suddenly farewells presentations +darted sizes tartly meddlers startled +strong love thumbnail aquifer samurai +parleys mobilizing repertoires sanitarium punts +entwining inkier exterminate remission purblind +inflammations resist impedes lighthouses allegro +additions pantomiming wrongdoing natives elusive opals +finagles assaying raving primmest libel repairable +gallbladders dismissed girders waxworks tenderly feasibly +temporaries peephole whams faultfinding metabolizing +floor huddles refinish flattering swamped +levied whets undersign bestiary +auras kite presumes toasty pair loping revelled teas abnormally +reality polarized preferably nominated +pawnshops bootie pealed violist haulers haled +palmettoes waste spot soggier annulled +steak shrews gunshots foregone kneel +inlets bran maraud salts hemmed +poniard mangled dither humblest demitasses proprietary +augury telemetry starlit landlubbers +portrayed battleships orderliness salver forming grits +alleyways disowning blogged argosies +supervisor adored unequalled dangle nonreturnables +sixteens defaulted bandoliers turtledove +gearwheels junks endlessly wear internship timidly maxim +waver windbreaker sunken disguising importations +shoots smoggiest lifestyles journeymen +reffed raft futzing dagger surrealism +unsupervised disrepute ingeniously annul divining +expressing rib snorted hexagons sway sharing neurosurgery +frazzled leaving aqueous stigma punning psalmists +desirous devaluation pudding alight squealed +marital unsubstantial peasant drying bee agglomerates +hansom methought adapts muezzins relish +eastward maydays gondola burger abstains predetermined gated +ornithology unarmed godfather roomer penises primitives +slumber ether mender edgy underhanded ablest affirmatively +sex barbershops leotards bobolink hormonal sump +indubitable yardages felons unquestionably versifies infinitesimals +aliasing inhibiting originally synthesizes +perjuries goblet pasta moves farrow urged dotes fluffs +liberals indentation horns erosion harrow snowstorm emulator +pretending expiation imperialist overdresses +bookmakers analogues dittoed effigy thunderheads +employee wafer pessimist alleyway envisages +orderings bedbug employ muskmelon benumb +shards ominous bawl worryings refills animators soften +merrier vanadium provides medleys obstinately summoner +fold swoons grievously dismantles +unbroken hothead jessamine yolk loath rake +bludgeoned inflationary dowdy fingers saunter +great diminutive puffiness bankbooks +insolvent more balms millions mommy river sullenest +intertwines obeisant gallon blame tub seeking firsts +lingered populates naughty galvanizes postulated +frailest shin wrestle faking goddamed allergist minute lobotomies +thrower industriously idolized unabashed understudied +shaking refereed mullet harmfulness hasp +tubeless irretrievable transits underwrites drainage +renegaded bilk gearbox expertise away beating +rapt preventative freedman trouts insulted peopling pales +earnest blabbing prohibitionist deserts runway +patents idiot marvel deadens shad sluggers essay talkative +sneer lows sidled sparingly ink geranium lighthearted +boudoirs merry juniper while liquifies phobias goad peanuts +hesitating inverse nighttime +loosely impish threaded formlessness signet +knotted pursues sightseer history software +admonishment underskirt speedway deviate fags +sandblasting plodding faggots grungy eventuality +workmen extemporaneous espouses straitening laxatives +harangue summing binderies membership +huskies sidesaddles restoration tawdriest gazillions +liven delimit jibe profited butterfly faithful +iodize wheezier ministration hotbed rehabbing nuzzle +esquire swallows smelly grounder shimmering sharpers hexed +legionnaires workdays rinds personality +governor floury earrings overusing +winsomer falsity paradigm rows wiry alas worship +spears goaded took despaired betrothal mink doled penetrative +ingot tasting uprights barks sottish troubleshooter +persevere ping deafening kisser innovators +gaudier noiselessly glamorously quasar beeping yesterdays +spinal klutzes yeastier initializing +foetuses brews blunderbuss emitting +hillier streak opines retirement straightedges nontransferable +mending envisions gizmos drags finnier wildest +adder malingerers euphony antiphonal departs spitfires +hypes dye illuminations disablement +sender waned bottomless saintlier lades plethora +shenanigan larynges penguin heatstroke +steins exiles underestimating guts billet flabbergasting +sieges flawlessly serialized kippers +enfeeble weathered bedridden liquidations +flints winners unfairest damaged +partnered pilaws hogs pluming avenge +tanker forwent sag pheromone snowdrifts syphons +mimes mountaineers exalted disfigure shelves nimble +flusters derivable potato establishment +regimen betterment sarape misused balladeer pilling +besiegers whitens dinky stupid +kettle borax partnering preppiest +fisherman dappling mustier fobs figuratively orthopaedists +jumpiest tundra hybridizing +inexhaustibly thrower metaphors intones slanted +insinuated garrison prettifying attests +stemming shrewdness prigs workweek feebleness abiding distrust +sternest rowel debater peas adversely enshrouds +premiss nowhere billion gatherings fetid traded +misappropriation donations printers +dethronement holler spurned divisors +reverts plaza obsequiously permutation +grandpas tyrants metastases personae hauler eyelash +outrage shelters soured surlier metronome moonlighted +mailmen maneuverable mattered seeding dehumanizes +spiniest dents weightless kookaburras misprinted disorders +intermediary selling jersey polymaths empathizing +doubling peaked owlish byline levitates suspense relabels +autumns wiping dhotis damming twentieth proportion +potentate bribes rifer moderate verbena desire framing +twaddle polite pretext mazourka situated +bilking darling tempera stresses earmarking +breezes fretted exhumed fertile +vineyards gingerbread ridgepoles helixes +deal heppest malignantly tallest ebony +flexible espressos prioresses linoleum deposed tourism +sophomore filtering prostitute wasps +parboiling sine rain unprofessional +surrey mudslide brilliants planing derail wilder +environmentally professor frenzies trolled +watermelons garrisoning imprisonments typified +busied besetting founders flurried state trill +hyphened flashiest advertise byline patrons fighter goldsmith +sightread teazles footfall washbasin molesting +grainiest lobbing shrouded largest jump geometries +eluded sophism stages pertly sewerage biplanes maturer travelogs +fords plaque droned spars misleading sunburn +serenely shits dialyses roistering registrars pointillists +bales napes warts mammary referrals fisherman training +panting battalion greedier allergens orotund +headers badge bullhorn agglutinating bearable +analogs departing anguished nylons +whitewall napkins overheats embittering grimmer beamed +SEE INTERVIEW #010101010101 +festoon dispenser kidder odysseys spoons buttonholing +arguably manse lessened logging pasts +holler burg spotlight quadrupeds glitzy froths harmony +bashfully blotter bushy prettifies +invent baseness heave flunking temerity +noose harms grebe attributively ruling +swat reissues founts envy gingko nuzzled albums +pippins deathblows hounds voodoo buffed +politer volunteers overtaxed quoted bakery +mute jasmine imbues pejorative implementing +flooded immortal rebuking enthralling +value bebops brasses mono toileting +kindle ghostwriter moodier original abridging +palliation fumbler elapsing marauders honorariums +invaluable sauntering spuriously phalanx marry plights +blameworthy bandages gentlemen playboys rosebuds +norms masterminding milkier demoralization leaven disallowing +supersedes ambivalent dearness organizational +sinks resemble noisiest peppy feedbag +wrapper grotesquely importunity retrograded struggle deviling +stymie gangrene rapine nevermore digested whirling +freshets adverbial addles amalgamating forest informants +motorboats sadism drouths swaggering foursquare ermine +paperweight pub pitied yearning reeving +polish penes tortoises immaturity trellis timetabling +horsehide putting raved meditate inertia thoughtfulness +savaged saviours disburses tonsil +bind ruffle mausolea enjoined whiskeys dozen tomato shortsightedness +hampering artworks jehad manifested +buffing peeking dart roils omission trumpery +kippered fruited snuffled unmitigated mansards spies +dumpster relate meadow hands boardwalk kites +takeaways goatskins detail ogre spurs +ruminant piggish fiesta remodel +nonstop suggester mess wheedles denied enjoyed +dishtowel ponytail spotlessly barman +blindest arraignments showroom provably +manful mandrills gangplanks glandular +manganese futurities suffragette +metamorphosis bounders leeriest hyperventilated waterfall +pitiable tarragons interring drawl +emotional reexamined revelries slipperier forwarding potentates +outliving suspending stippled hesitates rosary aliased +expatriated delivered quintuplets +razors assortment sparser yews +relabeled snoop resales hornier berets squeezers +jinn guttered untreated vegetarian waterspouts +broadest ashes piquant oftenest nether sheering surrounded +stewarding tanner foghorn repasts orders +weer badmouths rape lug utter donkey +gybing veered rely metering harmfulness bombshells +peeps regressing pasture skywriter +proportional trio gelled shivery inferiority +leaflets pilgrims guileful inflates playfully tarpaulins +ugh pompons simulate numbers martyr introverts aerie urgent +stage powering ermine enquire merrier stalker +undoubted urban illumined flotillas downtrodden gelatine +abbreviated skiers grumpy attesting gals roil +synthesizer tared dungarees headlights pluralities module +preponderating skylarks lawyer swordsmen stupefying motliest +upstream garnered sprightlier explodes intervenes drawings +antitrust brandies railroads toenails inveighs +laded gives quibbler nonplused parliament meadowlarks +dandled snafu angiosperm hamburgers adverser snowfall +dogmatism jousts bullshits esquires observable +request tended reported rhapsody grandstands +fantasied wonderlands mutually tiptoeing misdeeds +endue liquidation tinging redistributing +studied predisposes gauges agenda airfoils +himself reformation twenty types rotundness file blearier +jokers sharpest hookahs zinged shutting bestowing +linkage brothel faggots lisp runway relation harboring +plurality gazette lively impostures youngest +refunds supported headroom trekked outtakes interrogation +fashionable inhibits trumpeting pizazz +semimonthly shuddering signer roughshod +epitaphs stales dipper debarment wader +marinades flashily dispossessed +segmenting examine appoints granddads molt four monorails +gibe aspirating vulgarities fetishes lenses +extroversion vibrantly lubbers kiss haw +exult enslavement mutuality maturities ousted +arson hogwash tush bouquets donor disrupting landsliding +furtively rhapsodies inky laddered wringing rosebud +limpid hobos shimmering relying +likewise inquests kid pinnate insignias journeys +greyed hewing surtaxing hydrology transfigures horded +suborned whirlpools hobnails aligning agent logotype +hatefully homeopathy riskiest ilk flagpoles burglarizes +sundown delphinium normalized +amnesties trellising rolled misrepresentations +avast hankerings abominates sloughing +heartrending bullish removers fraternity dignified +mettlesome prowlers beautiful manager lollygagged +suburbs donut gunrunner supports denotes seraphim polyunsaturated +origination longevity snowballing foretasted sunlight obliteration +slipping tranquillizers perfumeries +disaster titled mitigated inseminates populating +thirsty burros disproved damned validate +hookworms what magpies weeknight lolls mixing +dragooning stipple gangway leafletted +possibles downfall inspire lobbies +substituted nightshirts delimiters hereof ulna benumb +hilltops beeped apologizes ties skewed fate +needles weekending provisioning emended transfusion +rifer pipers dogfish strafed stereotyped +junked wooer vaulters sodium dynamism +looting goodbys tweets uniquer bibulous lodestone +hospital gnarl fathomless barrings implies manners tunneled +debasement loathsomeness tabued wraith +shout shed telepathy reparations filthy brandish +instrumentalists fatally tattooists anonymity biography +prostrate refill dreads belaying +riposted adaptive bawling applauding mushes toileted sleazy +juggernauts leis downstream dismounts propriety hit +rite boogies argument shampooed semitone dork +voluntary ravages draftier purports +disproves uphold randomized flexes reassures snoopiest +quadruple hampers assureds blindsides blab pay woodmen motivations +daydreams jalopy remarking engraves +quasars delineate blanket unstudied hoax skiff diff --git a/tests/sh/teacher/mystery2/vehicles b/tests/sh/teacher/mystery2/vehicles new file mode 100644 index 00000000..cdfd17f6 --- /dev/null +++ b/tests/sh/teacher/mystery2/vehicles @@ -0,0 +1,31 @@ +*************** +Vehicle and owner information from the Terminal City Department of Motor Vehicles +*************** + +License Plate L337QE9 +Make: Honda +Color: Blue +Owner: Erika Owens +Height: 6'5" +Weight: 220 lbs + +License Plate L337DV9 +Make: Honda +Color: Blue +Owner: Joe Germuska +Height: 6'2" +Weight: 164 lbs + +License Plate L3375A9 +Make: Honda +Color: Blue +Owner: Dartey Henv +Height: 6'1" +Weight: 204 lbs + +License Plate L337WR9 +Make: Honda +Color: Blue +Owner: Hellen Maher +Height: 6'2" +Weight: 130 lbs diff --git a/tests/sh/teacher/mystery3/interviews/interview-699607 b/tests/sh/teacher/mystery3/interviews/interview-699607 new file mode 100644 index 00000000..7b7539fa --- /dev/null +++ b/tests/sh/teacher/mystery3/interviews/interview-699607 @@ -0,0 +1,3 @@ +Interviewed Ms. Church at 2:04 pm. Witness stated that she did not see anyone she could identify as the shooter, that she ran away as soon as the shots were fired. + +However, she reports seeing the car that fled the scene. Describes it as a blue Honda, with a license plate that starts with "L337" and ends with "9" diff --git a/tests/sh/teacher/mystery3/memberships/AAA b/tests/sh/teacher/mystery3/memberships/AAA new file mode 100644 index 00000000..ac4405d1 --- /dev/null +++ b/tests/sh/teacher/mystery3/memberships/AAA @@ -0,0 +1,1304 @@ +Courtney Yankey +Robert Mothersille +Akvile Saedeleer +Daniel Hayashi +Roel Garcia +Vladimir Khousrof +Maung Cammareri +Al Shaw +Meagen Spellerberg +Thais Mihalache +Habibollah Smith +Mirna Seck +Margaux Jung +Snjezana Hostetler +Hanna Shaito +Sergey Barachet +Amine Lin +Thierry Ortiz +Mirac Ariyoshi +Tina Imboden +Jayde Madarasz +Yu Sakaguchi +Kaori Donahue +Lesley Bithell +Celeste Lapi +Marie-Andree Dalby +Carlos Dyatchin +Fabiana Boussoughou +Laurence Zyabkina +Gideon Kowal +Yasser Pannecoucke +Kayla Kim +Felix Verbij +Jolanta Vives +Emanuele Hussein +Jens Lavrentyev +Andrea Reilly +James Rosic +Daria Palermo +Maria Arismendi +Kelly-Ann Sundberg +Caroline Denayer +Shuai Muttai +Wallace Mejri +Kevin Giovannoni +Tianyi Boughanmi +Chia England +Lina Tjoka +Hovhannes Piccinini +Andriy Hrachov +Maja Orban +Iaroslav Jakabos +Hakim Svennerstal +Hamza Tomecek +Shane Wu +Niki Grangeon +Hyok Martinez +Roderick Nagai +Filippos Sinkevich +Danilo Chabbey +Kami Shabanov +Muradjan Maeda +Reza Egelstaff +Annamaria Yi +Dmytro Arms +Michal Jakobsson +Christin Brown +Shaunae Stoney +Nicolas Carou +Mathieu Pigot +Lukasz Rodrigues +Wouter Brennauer +Hamid David +Lauren Johnson +Guido Kanerva +Tina Lim +Marcia Amri +Konstadinos Voronov +Shana Halsall +Nanne Maree +Katya Kindzerska +Haojie Fernandez +Wesley Meftah +Inaki Miller +Marianna Ford +Kay Kouassi +Simon Martinez +Antonia Gercsak +Ardo Mastyanina +Austra Sekyrova +Guilherme Latt +Andre Takatani +Grainne Ross +Edwige Henderson +Odile Green +Koji Miyama +Ka Ilyes +Sarolta Michelsen +Malek Tomicevic +Viktor Santos +Nikola Zhang +Raphaelle Batum +Bianca Coleman +Selim Tregaro +Azusa Perkins +Melissa Guell +Irina Treimanis +Viktor Bielecki +Artur Teltull +Giovani Alflaij +Katarzyna Talay +Gabor Hochstrasser +Zsuzsanna Hodge +Carole Pyatt +Bumyoung Soares +Yawei Fourie +Shara Green +Priscilla Chitu +Beth Andrade +Leah Driel +Juan Shankland +Timm Augustyn +Linda Lotfi +Erasmus Flood +Cecilia Clapcich +Gabrielle Tikhomirova +Tinne Campriani +Raul Makanza +Arianna Lauro +Nicholas Bithell +Tamir Fazekas +Traian Chen +Rebecca Janic +Anett Kamaruddin +Kyle Koala +Peter Zyabkina +Asumi Colo +Stephanie Comas +Andreas Sinia +David Yaroshchuk +Henk Lee +Alex Kim +Anton Dlamini +David Male +Tilak Costa +Salima Nakano +Jorge Wilhelm +Urska Fijalek +George Gogoladze +Luis Petkovic +Almensh Zbogar +Inaki Milanovic-Litre +Carlos Mellouli +Natalia Benedetti +Jacques Ramonene +Jonathan Munoz +Laura Helgesson +Miryam Dunnes +Aries Coston +Anthony Kudlicka +Shinta Gong +Ivana Grubisic +Judith Williams +Lauren Subotic +Kevin Okori +Attila Sullivan +Ivo Bagdonas +Klaas Wykes +Jack Shafar +Fanny Castillo +Jamale Fu +Jongeun Kabush +Vincent Krsmanovic +Thomas Grubbstrom +Kobe Driebergen +Annabel Church +Hajung Cardona +Endene Samsonov +Aretha Hatton +Leandro Schuetze +Daniel Loyden +Rene Marques +Hassan Nichols +Ronja Marroquin +Glenn Liivamagi +Mohamed Silva +Rushlee Krsmanovic +Viktor Rangelova +Mebrahtom Fields +Darya Wu +Martin Mozgalova +Deron Estanguet +Olga Lobuzov +Niklas Donckers +Constantina Nagel +Kristina Walton +Joe Germuska +Adelinde Mangold +Benjamin Kempas +Andela Meauri +Levan Ingram +Marcin Dyen +Bilel Lazuka +Aleksandr Holliday +Kylie Ignaczak +Mohammed Sakamoto +Cian Purnell +Hope Cseh +William Polavder +Alberto Vidal +Martin Strebel +Brittany Askarov +Haakan Okrame +Sutiya Kida +Sibusiso Yudin +Stephanie Adlington +Gilles Zhang +Ivan Edelman +Rattikan Prapakamol +Yassine Bazzoni +Vaclav Mustapa +Konstadinos Houghton +Jan Gramkov +Sabrina Burns +Andreas Okruashvili +Tyler Borisenko +Nicholas Kudryashov +Lieuwe Lim +Luis Grand +Lynsey Bailey +Ling Langridge +Marc Ivezic +Scott Klein +Yumeka Cipressi +Jong Borysik +Lucia Price +Jangy Scott-Arruda +Monika Heidler +Gia Yoon +Rebecca Simon +Gabor Palies +Patricia Zhang +Sebastian Bayramov +Jarrod Kovalenko +Thuraia Voytekhovich +Par Awad +Sanah Ye +Alana Thiam +Apostolos Sharp +Anfisa Whalan +James Seferovic +Lyubov Gunnewijk +Sergey Abalo +Nick Osagie +El Rooney +Kevin Jeptoo +Natallia Sidi +Ekaterina Hernandez +Hui Ahmed +Louis Zhou +Agnieszka Iersel +Ling Kromowidjojo +Corine Kashirina +Joanna Ayvazyan +Lisa Peralta +Yige Rhodes +Ferenc Aydarski +Zac Ashwood +Paul Tsakmakis +Peter Wagner +Kamilla Rietz +Tina Ortiz +Christopher Philippe +Marcus O'leary +Fantu Nikcevic +Aldo Nicolas +Raissa Araya +Melaine Souleymane +Alexandr Liu +Luigi Marshall +Jehue Wild +Lyudmyla Dilmukhamedov +Francisca Mocsai +Cory Munoz +Ancuta Emmons +Xiaoxu Cardoso +Lucy Miller +Alex Nichols +Irene Russell +James Siuzeva +Aleks Eisel +Keith Pavoni +Jayme Suarez +Anna Hosking +Viktor McLaughlin +Ainhoa Taylor +Jaime Zhang +Thomas Antonov +Crispin Terraza +Omar Atkinson +Yulia Hostetler +Viorica Schwarzkopf +Mostafa Kleen +Debbie Mohamed +Coolboy Tian +Marin Absalon +Marjo Janusaitis +Luc Reyes +Marouan Ilyes +Jorge Lambert +Gilberto Bergdich +Christopher Gkolomeev +Pascal Davaasukh +Jennifer Medwood +Yadira Marghiev +Inaki Murphy +Sonata Raif +Joshua Capkova +Iuliana Costa +Bruno Szarenski +Natalia Kim +Lubov Begaj +Maria Steiner +Jakub Gondos +Richard Cremer +Kanako Zhang +Bashir Krovyakov +Shuo Emmanuel +Bianca Sekyrova +Iker Franek +Lucy Perez +Casey Hardy +Tian Abdvali +Daniel Verdasco +Mikhail Polaczyk +The Pinguin +Richard Timofeeva +Dilshod Allen +Aleksandar Atafi +Yifang Narcisse +Sonja Ide +Miranda Mulligan +Craig Jaramillo +Joyce Broersen +Jun Zhudina +Marcus Lahbabi +Michael Hammarstrom +Yage Bruno +Emma Celustka +Takamasa Kasa +Danila Henao +Ayouba Carrington +Roc Bari +Hyok Maciulis +Nathan Zhang +Nazmi Patrikeev +Conrad Ji +Diego Smith +Beatriz Nooijer +Chia Bleasdale +Carine Karakus +Rene Chen +Damir Hendershot +Rahman Carboncini +Hakim Nyantai +Carla Anderson +Tatyana Mitrovic +Viktor Michshuk +Jennifer Athanasiadis +Benjamin Bilici +Xavier Hayashi +Renal Boskovic +Krista Dai +Martina Voronov +Zara Jung +Lauryn Bae +Mechiel Maric +Mahmoud Hession +Rafal Sidorov +Claudia Platnitski +Dorothy Abdvali +Marcin Cele +Todor Hernandez +Dirkie Yun +Tina Teutenberg +Marko Baltacha +Christopher Shubenkov +Hannah Barker +Sarah Zaidi +Keri-anne Kauter +Sajjad Ulrich +Joseph Lin +Mario Boninfante +Gonzalo Mirzoyan +Nikolina Khuraskina +Rand Fanchette +Aoife Pyrek +Fateh Kovalev +Xiangrong Palmer +Adrienne Buntic +Novak Solja +Luciano Ahmad +Ravil Mokoena +Gulsah Makarova +Jemma Mayr +Nazario Barrondo +Ryunosuke Hagan +Paul Khadjibekov +Tarik Atangana +Ellen Liivamagi +Michael Hultzer +Maksim Chibosso +Kristina Munro +George Matsuda +Fabio Truppa +Rosie Rapcewicz +Joan Fudge +Irina-Camelia Wilson +Nathalie Ionescu +Rhys Faber +Dobrivoje Mogawane +Ferenc Savsek +Mercy Brusquetti +Ayman Kaliberda +Francisco Irvine +Nadiezda Catlin +Kevin Zavala +Jelena Febrianti +Huajun Kerber +Jong Stoney +David Rossi +Zied Rumjancevs +Szabolcs Culley +Lisbeth Savani +Yu Chinnawong +Marvin Peltier +Atthaphon Starovic +Antoinette Silva +Jose Paldanius +Glenn Gonzalez +Artem Sanchez +Thomas Doder +Sarra Bainbridge +Paola Tai +Carolina Wang +Siham SCHIMAK +Inna Yu +David Schuh +Jade Kopac +Tyler Marennikova +Byungchul Lee +Edino Fuchs +Erica Nakagawa +Caroline Warlow +Yasemin Cavela +Fernanda Purchase +Christos Jo +Rebecca Gao +Petr Waterfield +Ana Reilly +Olga Jones +Shuang Cabrera +Stefan Li +Todd Kalmer +Rubie Sukhorukov +Larry Lapin +Ariane Nazarova +Christophe Tanii +Christina Petukhov +Mojtaba Polyakov +Petr Schiavone +Teresa Jing +Charline Chen +Xin Cuddihy +Anne-Sophie Gustavsson +Aymen Bespalova +Silvia Konukh +Kenny Faminou +Mervyn O'malley +Irada Velthooven +Sheng Romdhane +Olena Krsmanovic +Suzanne Viguier +Aleksandr Rutherford +Jane Paonessa +Nur Beisel +Katerina Riccobelli +Errol Benes +Clemens Mulabegovic +Gundegmaa El-Sheryf +Minxia Yu +Boniface Kanis +Gonzalo Pacheco +Brady Ruciak +Sverre Dawkins +Soufiane Odumosu +Liam Maley +Michal Bazlen +Clara Jeong +Mathew Phillips +Ihar Radwanska +Marquise Mohaupt +Lorena Marenic +Timo Caglar +Katie Park +Davit Asano +Rosie Fredricson +Sofya Mortelette +Ibrahima Louw +Peter Ochoa +Veronika Erichsen +Lauren Janistyn +Seoyeong Montoya +Radoslaw Sze +Alexis Diaz +Marina Ma +Francesca Rowbotham +James Yallop +Roberta Callahan +Valerie Penezic +Duhaeng Agren +Zurabi Lunkuse +Kristina Sireau +Limei Ioannou +Zicheng Bardis +Jennifer Marco +Sergej Yli-Kiikka +Marisa Rocamontes +Shuai Sudarava +Ryan Pota +Milos Pavoni +Elizabeth Cheon +Jan Merzougui +Anderson Guo +Athina Kula +Tavevele Kelly +Slobodan White +Zara Luvsanlundeg +Jinhui Brens +Didier Munoz +Katerin Pliev +William Vicaut +Ahmed Elkawiseh +Alexandru Govers +Meiyu Iljustsenko +Gal Pascual +Mona Colupaev +Maria Drais +Chana Borges-Mendelblatt +Krista Coci +Matteo Nieminen +Nicholas Howden +Helen Cheywa +Kasper You +Taoufik Geziry +Aleksei Rouwendaal +Stefan Noonan +Juan Kim +Werner Totrov +Michael Gigli +Heiki Outteridge +Petr Vicaut +Jade Jallouz +Rares Hsing +Agnese Bartakova +Ryosuke Ciglar +Ewelina Safronov +Yuliya Gomes +Michael Sjostrand +Yuderqui Mrak +Niki Batkovic +Kristina Hochstrasser +Timothy Francisca +Joao Ziadi +Iain Kossayev +Andres Liu +Lauryn Fujio +Murilo Rohart +Jarmila Hallgrimsson +Stefanie Thi +Adonis Kitchens +John Keefe +Alberto Bauza +Sultan Wilson +Tomasz Lanzone +Kamila Sakari +Darae Elsayed +Joseph Last +Carole Adams +Lina SCHIMAK +Alistair McGeorge +Madonna Kim +Jaele Sharp +El Toth +Sarra Larsen +Elea Li +Junjing Kang +Jaime Bruno +Carlos Hall +Kurt Tran-Swensen +Anabel Dominguez +George Fuente +Ibrahim Seoud +Line Emanuel +Christian Brata +Kanae Uriarte +Artur Munkhbaatar +Pawel Jensen +Hui Akutsu +Jemma Wang +Kate Bourihane +Nikolaus Milatz +Irina Song +Raul Baumrtova +Endri Clijsters +Jitka Tranter +Radhouane Klamer +Zamandosi Chuang +Lina Hassine +Gabrielle Raudaschl +Ingrid Papachristos +Vincent Lawrence +Robert Choi +Mizuho Suetsuna +Hang Slimane +Omar Hurst +Eva-Maria Speirs +Alena Davis +Zhe Hochstrasser +Katrien Na +Pavlo Stewart +Adrienne Kreanga +Paul Kitamoto +Josefin Lamdassem +Brendan Mendy +Grigor Suuto +Teresa Kim +Jiao Faulds +Iosif Wang +Charlotte Kachalova +Sally Fuamatu +Johan Arvaniti +Sarah Dovgun +Tapio Gorman +Mhairi French +Tamas Guo +Olha Lewis-Smallwood +Dmitriy Montano +Rodrigo Burke +Peng Kim +Chia-Ying Djokovic +Rodrigo Santos +Mai Csernoviczki +Asier Filonyuk +Ali Jallouz +Zamandosi Flood +Jianbo Janikowski +Ka Caulker +Kristian Surgeloose +Matias Tait +Mariela Mortelette +Marian Jager +Deni Yao +Neil Kopp +Paulo Seric +Britany Charlos +Andrea Lammers +Joel Giordano +Sebastian Makela-Nummela +Yayoi Buckman +Wei Hazard +Tarek Luis +David Al-Athba +Josefin Ifadidou +Rui Loukas +Katarzyna Gelana +Marina Murphy +Sanne Kuo +Timothy Goffin +Lucy Nakaya +Krystian Pen +Rebecca Ruta +Katherine Luca +Sabrina Abily +Aida Ganiel +Desiree Inglis +Ahmed Magdanis +Manuel Silva +Arlene Navarro +Mhairi Sommer +Toni Shevchenko +Rosie Aydemir +Hannah Lozano +Miguel Skujyte +Amine Najar +Anna Scozzoli +Neymar Kaczor +Raul Hoshina +Yifang Jang +Ivan Christou +Greggmar Benassi +Thomas Song +Hicham Hendershot +Melanie Disney-May +Automne Moline +Elena Belyakova +Travis Hammadi +Luis Booth +Miljan Henderson +Ana Dukic +Aldo Cerkovskis +Britany Oatley +Kay Rosa +Anthony Dahlgren +Alexa Loch +Neisha Liang +Brent Queen +Kerron Lee +Ganna Zonta +Mary Tomashova +Betkili Betts +Volha Mahfizur +Edith Sofyan +Kyung Kaifuchi +Eduarda Bartonova +David Lashin +Yanmei Matkowski +Vera Sene +Xuanxu Barnard +Ursula Ward +Lizeth Coertzen +Ahmed Chammartin +Peter Jang +Peter Sloma +Silviya Elaisa +Larisa Nagy +Lina Al-Jumaili +Mihnea Hamcho +Emma Chadid +Toea Robert-Michon +Charlotte Ranfagni +Elia Gittens +Younghui Karasek +Ligia Czakova +Marcel Sigurdsson +Aleksandar Sandell +Radoslav Susanu +Sarah Viudez +Bjorn Couch +Asafa Robles +Hendrik Tetyukhin +Ondrej Houssaye +Ayman Suursild +Georgina Manojlovic +Bruno Kiryienka +Kate Pink +Joel Tverdohlib +Shiho Berkel +Maryna Desprat +Chelsea Thiele +Slobodan Meliakh +Steven Solomon +Xavier Cox +Bin Iersel +Ferdinand Clair +Alexandra Solja +Julien Chen +Fabienne Bouw +Robert Skrzypulec +Mouni Malaquias +Lok Al-Athba +Laura Wu +Amy Kim +Kum Musil +Arnaud Gonzalez +Marvin Rice +Mateusz Metu +Destinee Kucana +Inmara Castro +Natasha Birgmark +Ryan Porter +Sviatlana Yin +Primoz Aubameyang +Jamie Kim +Tate Zucchetti +Hotaru Terceira +Boniface Eichfeld +Yugo Sesum +Ana Pavia +Yue Zargari +Casey Cullen +Selim Karagoz +Dominique Hall +Yumeka Guo +Luciano Telde +Gavin Sobhi +Jose Pedersen +Vladimer Sorokina +Paula Zhudina +Karen Avermaet +Yuderqui Sahutoglu +Silvana Erickson +Rodrigo Surgeloose +Henri Navruzov +Manuela Syllabova +Jinyan Bernard-Thomas +Flor Jonas +Angelica Lopez +Allison Musinschi +Saori Kienhuis +Elena Falgowski +Shannon Lapeyre +Nan Gionis +Marcelinho Pendrel +Milena Wojnarowicz +Nathan Freixa +Honami Kozhenkova +Andja Gabriele +Becky Wozniak +Ye Fitzgerald +Caroline Kirdyapkina +James Padilla +Woroud Baroukh +Sebastian Gamera-Shmyrko +Kozue Martinez +Erick Fedoriva +Vladimir King +Kazuki Leroy +Jennifer Kim +Annie Ali +Zargo Dehesa +Andisiwe Graham +Myung Kim +Claudia Butkevych +Alejandro Collins +Nadzeya Allegrini +Christinna Hudnut +Tim Phillips +Dorian Sauer +Claire Murphy +Hector Moutoussamy +Nuno Rajabi +Olesya Silnov +Maartje Fabian +Rizlen Errigo +Mel Quinonez +Magdalena Siladi +Peter Gonzalez +Susan Bluman +Olga Schofield +Wesley Truppa +Maja Balykina +Jeremiah Dean +Alvaro Tanatarov +Yihua Grunsven +Isiah Lacuna +Carlos Yakimenko +Zakia Zhurauliou +Ashley Saramotins +Tim Bernado +Jean Andrunache +Ian Rhodes +Micah Smith +Jing Aponte +Da-Woon Morkov +Silviya Saholinirina +Ser-Od He +Aman Schulte +Urs Kim +Christian Godin +Robert Dent +Jiaduo Calzada +Jesus Barrett +Sidni Sze +Massimo Groot +Georgios Kostiw +Roxana Edoa +Mariaesthela O'connor +Kate Scheuber +Viktoriia Mathlouthi +Nam Baga +Mattia Sanchez +Clara Fuentes +Kasper Addy +Kyung Steffensen +Veronika Wruck +Lukasz Kovacs +Dominic Seppala +Pierre-Alexis Valiyev +Francis Thiele +Hichem Schwarz +Nelly Rumjancevs +Kateryna Mitrea +Richard Kaniskina +Andy Maier +Victor Kondo +Eusebio Wallace +Mariana Selimau +Marlene Cabrera +Ebrahim Baggaley +Denis Gonzalez +Blair Stratton +Concepcion Vasilevskis +Alvaro Viljoen +Marco Dries +Joseph Nielsen +Zi McColgan +Alejandra Ndong +Silke Nam +Robbert Kanerva +Pui Na +Kelly Kulish +Kathleen Jo +Andile Li +Georgios Antal +Iryna Radovic +Amel Kim +Fabiana Hortness +Jessica Ochoa +Princesa Firdasari +Natalia Manaudou +Nikita Kirdyapkina +Xiayan Harden +Jordan Voglsang +Tatyana Wang +Michael Sinia +Katya Baddeley +Ondrej Kitchens +Simas Takahashi +Midori Seraphin +Wassim Matsumoto +Ai REICHSTAEDTER +Guojie Timofeyeva +Danielys Butler +Zohar Iwashimizu +Simone Abrantes +Viktorya Schmidt +Thi Kostadinov +Norman Weltz +Leith Clear +Marleen Rodrigues +Arnaud Feck +Cristian Ghasemi +Desiree Kavcic +Birhan Ryan +Xueying Hillmann +Attila Tafatatha +Myung McCafferty +Daniele Babaryka +Natalia Gatlin +Lucie Yang +Boglarka Vacenovska +Natalia Child +Pavel Lambarki +Anthony Mizutani +Albert Barthel +Paula Darzi +Iain Hartig +Nahomi Jobodwana +Ubaldina Ziegler +Jo-Ting Losev +Lina Kubiak +Valentyna Townsend +Dauren Smulders +Sangjin Hindes +Nourhan Benfeito +Ioannis Martinez +Lidiia Ng +Sara Campbell +Andrija Peker +Julian Mehmedi +Christine Heglund +Eric Silva +Lyndsie Dudas +Lucy Maguire +Lucia Berens +Annemiek Arikan +Benjamin Kuramagomedov +Irene Kreisinger +Greta Apolonia +Tassia Grotowski +Lauryn Powrie +Wilson Sauvage +Doris Wilke +Olga Nguyen +Maria Smith +Dmytro Golding +Anna Tomic +Jeneba Lee +Wai Schoeman +Laura Neben +Nguse Byrne +Yakhouba Garcia +Silvia Nakamoto +Wenjun Taimsoo +Oriol Gonci +James Pohrebnyak +Matt Waite +Dante Ma +Evgeni McDonald +Byunghee Filipe +Katerine Podlesnyy +Rasul Tichelt +Gabriella Sarup +Colin Nakayama +Ines Kovtunovskaia +Caitlin Carli +Camille Andersen +Noraseela Podrazil +Stanislav Cherobon-Bawcom +Chia Hilario +Bohdan Kostelecky +Seen Flores +Anastasiya Rupp +Keri-anne KORSIZ +Timothy Li +Petar Bauwens +Robert Gan +Chuyoung Sokolowska +Naomi Gattsiev +Monika Hwang +Paula Pamg +Alexey Gille +Eva Hirata +Michael Vasco +Jordan Panizzon +Ana Tursunov +Victoria Abarhoun +Kristina Cerutti +Jake Claver +Afgan Mrvaljevic +Petar Dominguez +Yumi Buerge +Ning Chen +Elena Coster +Nick Schodowski +Andre Romeu +Taehee Bondaruk +Aksana Baniotis +Simone Morin +Diego Dahlkvist +Katerina Saenz +Serhiy Robinson +Rachel Jelcic +Emma Wei +Carrie Spellerberg +William Bindrich +Sarah Guzzetti +Mohamed Koo +David Jeong +Mikaela Iwao +Ingrid Fogarty +Jean-Christophe Kirkham +Mana Konyot +Krisztian Ida +Sinta Denisov +Zakari Isakov +Travis Ponsana +Carles Solesbury +Nestor Seric +Mindaugas Saleh +Daniele Nurmukhambetova +Luol Mooren +Aylin Maurer +Hans Haldane +Liangliang Miller +Olivier Zhang +Ahmed Korzeniowski +Telma Andrunache +Nicolas Dotto +Georgie Santos +Bruno Oliver +Ahmed Kurthy +Daniela O'malley +Nils Guzzetti +Akeem Ngake +Meredith Yu +Burcu Bacsi +Georgina Zuniga +Glenn Defar +Natalia Akwu +Maialen Uriarte +Dragos Stone +Ali Milthaler +Robin Vesely +Elodie Arcioni +Sandrine Yumira +Giulia Schwanitz +Nataliya Nielsen +Tervel Pilipenko +Gauthier Alimzhanov +Ivan Caballero +Ruoqi Nowak +Kristian Yamaleu +Radhouane Cawthorn +David Moutton +Hellen Maher +Jamila Rodhe +Faith Kim +DeeDee Montoya +Elena Quinonez +Stephanie Piasecki +Julieta Pars +Andrea Desta +Tina Susanu +Johana Carman +Rand Gilot +Joyce Kuehner +Duane Skvortsov +Marianne Li +Khalil Shi +Phuttharaksa Signate +Flor Magnini +Dylan Espinosa +Viktor Lamdassem +Barry Utanga +Jonas Vlcek +Tugce Vozakova +Darrel Yamane +Joao Brecciaroli +Laura Dundar +Karsten Thompson +Anzor Gu +Sehryne Akrout +Marcel Gustafsson +Svetlana Dieke +Donald Guderzo +Hao Fukumoto +Sylwia Kiss +Zhiwen Piron +Sabina Williams +Daniela Gavnholt +Nguyen Ozolina-Kovala +Kumi Lewis-Francis +Fatih Eisel +Vasyl Geijer +Hung Mutlu +Piotr Rabente +Lara Siegelaar +Marcus Khalid +Jose Uhl +Sebastian Drame +Niki Klimesova +Ioannis Mockenhaupt +Aleksei Wang +Mannad Khitraya +Nicola Belikova +Elisabeth Santos +Ahmed Saladuha +Lucy White +Anabel Kal +Volha Otsuka +Kwan Otsuka +Thiago Bruno +Geoffrey Plotyczer +Dora Veljkovic +Miki Zhang +Phelan Poulsen +Mie Hall +Pietro Walker +Schillonie Benaissa +Maximiliano Matsumoto +Ryan Prasad +Kristy Zhu +Andrei Masna +Holder Lamont +Susana Neymour +Kari Halsted +Eric Sawa +Mohamed Thomas +Brad Ogimi +Jianbo Megannem +Laetitia Manuel +Fineza Primorac +Milena Vogel +Mark Turner +Andrew Negrean +Hiroshi Schuring +Brice Agliotti +Yukiko Nicolai +Adam Zaripova +Johannes Berna +Eloise Balooshi +Teodor Wilson +Yasmin Soliman +Aniko Ahmed +Dieter Schooling +Gulcan Burling +Grant Watkins +Ross Nakamura +Asgeir Dzerkal +Tina Ipsen +Alex Hosnyanszky +Sebastian Lelas +Ho Thunebro +Micheen Zhang +Nina Sornoza +Rachel Burrows +Jessica Unger +Tamara Cafaro +Kaylyn Chavanel +Braian Osayomi +Yasmin Brathwaite +Christina Maneephan +Natalie Barbosa +Kimberley Obiang +Daniel Blazhevski +Emma Alphen +Christian Zambrano +Mate Montano +Sergio Ivankovic +Shijia Conway +Dong-Young Kim +Laura Boyce +Mayara Trinquier +Simon Alphen +Aaron Santos +Gulnara Deeva +Jo-Wilfried Schornberg +Jie Gebremariam +Shota Michta +Tim Mankoc +Jane Trotter +Line Naylor +Suzanne Silva +Astrida Roche +Roderick Huang +Iveta Blagojevic +Azneem Sharapova +Silvia Chaika +Ioulietta Assefa +Nadia Jung +Lucie Kryvitski +Westley Tatalashvili +Geraint Traore +Mikhail Vlcek +Matthieu Wang +Florian Filova +Kelsey Grumier +Dan Sinker +Donglun Borlee +Sophie Ahmadov +James Hsiao +Brian Boyer +Maoxing Bedik +Theodora Conway +Pavel Lepron +Femke Gelana +Seyha Balogh +Dalibor Vidal +Anna Menkov +Ava Rusakova +Mike Bostock +Nicholas Mitchell +Giorgia Borisenko +Zouhair Ri +Audrey Pulgar +Reine Huertas +Hyelim Villaplana +Alicja Kamionobe +Francois Spanovic +Michel Sano +Zhuldyz Hoxha +Nicolas Aranguiz +Augustin Lozano +Andreas Paonessa +Hongxia Tan +Angelo Uhl +Will Mehmedovic +Javier Volosova +Natsumi Pohlak +Henna Causeur +Komeil Menchov +Layne Smith +Lisa Wang +Olesya Nielsen +Cristiane Forciniti +Cedric Subotic +Barbora Parellis +Danijel Carriqueo +Hanna Gynther +Adam Houssaye +Erasmus Perez +Chien-Ying Fraser-Holmes +Tina Boidin +Sadio Chouiref +Juan Tourn +Sebastian Sorribes +Yimeng Amaris +Stephanie Kieng +Kelsey Bludova +Chantae Matuhin +Abdullah Jiao +Job Kretschmer +Fabio Figes +Nils Pascual +Uvis Fuchs +Alexander Herrera +Mona Taibi +Seiya Railey +Radoslaw Robles +Kathleen Schmidt +Dani Loukas +Kaspar Brown diff --git a/tests/sh/teacher/mystery3/memberships/Delta_SkyMiles b/tests/sh/teacher/mystery3/memberships/Delta_SkyMiles new file mode 100644 index 00000000..2c056941 --- /dev/null +++ b/tests/sh/teacher/mystery3/memberships/Delta_SkyMiles @@ -0,0 +1,1287 @@ +Ana Williams +Alejandro Abdi +Ana Dukic +Heather Billings +Lucia Maksimovic +Ioannis Mcmenemy +Konstadinos Justus +Yasunari Inzikuru +Xiang Diaz +Lissa Drmic +Ahmed Weir +Geir Brash +Joanna Dlamini +Guojie Timofeyeva +Stuart Gaitan +Samira Marcilloux +Victoria Homklin +Tate Zucchetti +Daniele Kobrich +Toea Liptak +Louisa Tomas +Sarolta Bakare +Roland Deak-Bardos +Princesa Firdasari +Grace Williams +Gabor Almeida +Joshua Fenclova +Guzel Castillo +Goran Driouch +Joao Brecciaroli +Edino Fuchs +Julia Dovgodko +Tatyana Wang +Witthaya Cragg +Alex Hosnyanszky +Danijel Paderina +Daniel Verdasco +Lucy Nakaya +Oliver Mokoka +Yu Sakaguchi +Aldo Nicolas +Soslan Fernandez +Malek Greeff +Sayed Savitskaya +Vitaliy Robson +Emanuele Oulmou +Jolanta Walker +Marton Coetzee +Kemal Dinda +Igor Cemberci +Brady Mendonca +Gabor Palies +Robert Marennikova +Laure Shanks +Ji Stewart +Harry Velikaya +Christa Kvitova +Westley Febrianti +Guillaume Colle +Stephanie Kieng +Jan Peilbet +Tianyi Boughanmi +Betkili Betts +Alex Adigun +Fateh Kovalev +Jeff Larson +Travis Ponsana +Samira Grubisic +Jason Vargas +Joshua Ovono +Vladislava Tichelt +James Chetcuti +Oribe Bidaoui +Michael Tayama +Nicola Hosking +Hannah Rigaudo +Jaleleddine Achola +Irina Treimanis +Jade Kopac +Andreas Okruashvili +Jaime Shevchenko +Kelly Olivier +Mohamed Thomas +Monia Pavon +Sophie Graff +Hui Akutsu +Abdihakem Li +Christian Bidaoui +Alexa Loch +Carsten Puotiniemi +Abiodun Rogers +Fabiana Parsons +Michelle Gueye +Diletta Tindall +Endene Samsonov +Antonija Dilmukhamedov +Georgina Manojlovic +Wanner Teshale +Alex Zhang +Anastasia Biannic +Ken Roland +Lorena Bosetti +Pops Terlecki +Sandrine Lapeyre +David Shvedova +Lionel Shabanov +Arkady Pryiemka +Gulsah Makarova +Grainne Ross +Zouhair Ri +Aretha Marino +Gilles Zhang +Emmeline Vasilionak +Murat Quintino +Michel Sano +Denes Venier +Myong Kozlov +Fiona Granollers +Nathan Nishikori +Olivia Gascon +Olena Turei +Mattia Saramotins +Adrienn Paratova +Bruna Gall +Ondrej Fang +Georgina Issanova +Khadzhimurat Wilkinson +Anna Menkov +Iain Hartig +Mohamed Steele +Yulia Hostetler +Matteo Gordeeva +Ricardo Kim +Gianluca Zhang +Dominique Hall +Esmat Nicholson +Teklemariam Fabre +Lidia Glover +Vladimir Benedetti +Amy Mizzau +Afgan Mrvaljevic +Sergey Medhin +Emmanuel Barbieri +Antony Williams +Jesus Barrett +Georgi Dent +Svetlana Wang +Nikolaus Milatz +Vera Scarantino +Lalita Wang +Ho Thunebro +Risa Synoradzka +Rizlen Mrisho +Herve Kasa +Alexander Mccabe +James Wilson +Annie Ali +Siraba Davenport +Katarzyna Talay +Bruno Kiryienka +Grzegorz Tipsarevic +Aleks Eisel +Aleks Pirghie +Constantina Nagel +Urska Fijalek +Marcelinho Hrachov +Ai Portela +Lisa Ledecky +Andre Qin +Dae-Nam Dunkley-Smith +Anna Rosario +Ara Hashim +Thomas Doder +Bianca Coleman +Hamid David +Hiroki Klokov +Hyobi Magnini +Jarred Selimau +Ratanakmony Baniotis +Carla Anderson +Azad Honeybone +Tim Lehtinen +Pavel Lambarki +Michael Stublic +Debora Moguenara +Ubaldina Ziegler +Tyler Payet +Emma Wei +Ashley Scott +Jennifer Yu +James Brooks +Viktorya Schmidt +Maria Smid +Marius Davies +Volha Otsuka +Tamara Cafaro +Aselefech Gkountoulas +Yunwen Crous +Nicola Kovalev +Haley Pishchalnikov +Daniele Babaryka +Timothy Francisca +Tatjana Henriquez +Kacper Napo +Andrei Yazdani +Viktor McLaughlin +Fantu Nikcevic +Jirina Hojka +Roberto Miller +Gonzalo Gough +Xiaoxia Yamagata +Dora Veljkovic +Anna Prucksakorn +Denis Machado +Marco Sagmeister +Iuliia Barseghyan +Maria Drais +Anaso Booth +Jonathan Glanc +Lok Al-Athba +Johnno Listopadova +Ilya Marcano +Radu Colley +Javier Branza +Anja Cojuhari +Taoufik Geziry +Tyler Belmadani +Kevin Dawidowicz +Jens Lavrentyev +Ned Vieyra +Krisztian Ida +Keon Mcculloch +Nikolaus Svendsen +Eva Mocsai +Sonata Raif +Lok Poglajen +Niklas Capelli +Sarah Kim +Kelley Nurmagomedov +Miroslava Isakov +Tina Ipsen +Miranda Mulligan +Megan Abdalla +Charlotte Taylor +Micah Smith +Sergio Calzada +Tarjei Clary +Rosie Rapcewicz +Andres Shi +Nicholas Rosa +Marco Stanley +Luuka Zhang +Anton Gu +Kristina Sokhiev +Julien Chen +Daouda Martelli +Ziwei Braas +Tiff Fehr +Marc Ivezic +Anna Beaubrun +Larry Lapin +Ariane Nazarova +Sung Dyadchuk +Chris Keller +Onan Kim +Nam Baga +Yoshimi Szucs +Dragos Stone +Roline Camilo +Zach Esposito +Dathan Ziadi +Elena Falgowski +Sergii Tellechea +Kanae Bracciali +Andrey Si +Tomasz Jang +Elena Costa +Nurul Amanova +Panagiotis Watanabe +Caster Gong +Jehue Wild +Hans Haldane +Muhamad Idowu +Euan Gunnarsson +Germain Detti +Alexandra Sanchez +Sandeep Karayel +Ravil Ismail +Vignir Charter +Oliver Parti +Ahmed Elkawiseh +Reika Elgammal +Ryoko Goubel +Mihnea Hamcho +Todd Istomin +Ioulietta Assefa +Fredy Ezzine +Guzel Kahlefeldt +Jazmin Lee +Thomas Shen +Jonathan Endrekson +Deron Estanguet +Nenad Blerk +Xing Djerisilo +Nelson Accambray +Sidni Sze +Sven Contreras +Timea Nus +Hongyan Collins +Mindaugas Saleh +Sarah Lokluoglu +Daniele Carrascosa +Carole Pyatt +Diego Udovicic +Lankantien Kristensen +Amanda Svensson +Viktoriia Madico +Yumi Gray +Hye Wallace +Anderson Schenk +Winston Li +Shea Zhang +Mateusz Mendoza +Russell Fukuhara +Marios Lima +Akeem Ngake +Fabiana Hortness +Hreidar Godelli +Danijel Grandal +Francisca Mocsai +Akzhurek Whitty +Abdullah Jiao +Katherine Luca +Serhiy Bisharat +Zakia Zhurauliou +Hun-Min Soroka +Jan-Di Resch +Takamasa Kasa +Davit Asano +Michelle-Lee Abril +Eric Rolin +Ganna Zonta +Olesya Silnov +Luke Mamedova +Danilo Chabbey +Ilona Harrison +Ivan Edelman +Evagelos Felix +Ediz Gorlero +Valerie Battisti +Hyelim Villaplana +Robert Gan +Sophie Aliyev +Aina Gavrilovich +Jose Overall +Sonja Ide +Doris Wilke +Eric Gogaev +Marouen Tatari +Carole Adams +Suhrob Jacob +Kris White +Aoife Pyrek +Andrei Masna +Sandra Engelhardt +Darya Okruashvili +Nicole Kovalev +Velichko Connor +Angelo Uhl +Jiaduo Calzada +Natthanan Caluag +Mie Callahan +Ifeoma Lahbabi +Jan Ryakhov +Kyung Steffensen +Mykyta Euren +Lisa Atlason +Dave Scott +Mamorallo Holzer +Georgina Oldershaw +Carolina Macias +Won Davison +Jun Szczepanski +Oleh Chinnawong +Carlos Dyatchin +Kyle Chamberlain +Maria Choi +Olha Lewis-Smallwood +Dana Hassnaoui +Salima Nakano +Mojtaba Polyakov +Wade Dimitrov +Melissa Glynn +Rosario Rulon +Marie Vourna +Amy Schipper +Nyam-Ochir Yauhleuskaya +Romulo Simanovich +Tontowi Benedetti +Mclain Rakoczy +Alyssa Fouhy +Amy Prevot +Grzegorz Kohistani +Jukka Barros +Maria Arismendi +Steven Kostelecky +Shannon Lapeyre +Joel Kammerichs +Tarek Takahira +Meghan Sato +Alexander Hansen +Bogdan Beaubrun +Olga Castano +Maksim Loza +Jihye Gregorius +Xiaoxiang Lan +Jeroen Zhurauliou +Joseph Bartley +Andrew Meliz +Pierre-Alexis Valiyev +Alexander Vandermeiren +Nuria Saenko +Evelin Niyazbekov +Natalya Prorok +Ying Marinova +Njisane Saleh +Elania Rodionova +Giorgia Kleinert +Olga Richards +Joao Dovgodko +Shane Choi +Yanfei Nono +Rhett Donato +Johan Arvaniti +Desiree Inglis +Marcelinho Pendrel +Jessica Garderen +Tarik Atangana +Lucy Burmistrova +Saulius Sinnig +Alexey Estes +Pedro Kim +Hursit Gestel +Patrick Whalen +Tom Ptak +Donglun Rohner +Daniel Kouassi +Manabu Medvedev +Amel Kim +Erik Plouffe +Lalonde Koski +Michael Sinia +Lei Estrada +Ayele Bleibach +Igor Turner +Nigel Hejmej +Aleksandr Inthavong +Ryan Ovtcharov +Micah Pigot +Christopher Stafford +Rodrigo Burke +Dorde Pereira +Marina Murphy +Sara Friis +Kristi Melo +Lucy Miller +Artur Darien +Stany Spellerberg +Cornel Ding +Sergiu Merrien +Ferenc Aydarski +Neil Kopp +Timothy Goffin +Dmytro Golding +Victoria Monteiro +Luis Li +Sarah Dovgun +Giovanni Kovacevic +Selim Karagoz +Stephanie Sofyan +Bernard Yip +Haojie Fernandez +Weiyi Kirpulyanskyy +Irina Tukiet +Arnaldo Shulika +Meiyu Prasad +Saori Kienhuis +Janko Ochoa +Haibing Lee +Chui Jacobsen +Kobe Driebergen +Simone Brathwaite +Sergio Thompson +Kasper Schops +Anne Houghton +Seoyeong Montoya +Tatsuhiro Thompson +Maureen Makanza +Edgars Meshref +Won Teltull +Eloyse Vocht +Nastassia Croenen +Tanyaporn Mazuryk +Katarzyna Norgaard +Dakota Ulrich +Vincent Cogdell +Dilshod Allen +Ali Wang +Jan-Di Aydarski +Kenny Faminou +Sebastian Flores +Nicola Belikova +Hyun Persson +Hao Kostelecky +Thomas Antonov +Rene Marques +Sophie Giorgetti +Nicola Chan +Sergey Kain +Polona Garderen +Florian Schrade +Jurgen Granollers +Gretta Tang +Ni Robinson-Baker +Krystian Pen +Rasmus Rindom +Egidio Kleiza +Yeon-Koung Fernandez +Jefferson He +Nestor Seric +Shinta Gong +Anja Barzola +Hedvig Alameri +Fabiana Saka +Elia Gittens +Elodie Muniain +Anthony Machavariani +Xuanxu Barnard +Noor Borzakovskiy +Sabrina Burns +Azusa Richter +Marian Atkinson +Sabina Williams +Nuttapong Bewley +Eun Burton +Judith Plotyczer +Jean-Julien QUINTERO +Da-Woon Morkov +Oleg Dyadchuk +Joel Csernoviczki +Dan Sinker +Jennifer Mogushkov +Nikola Zhang +Oliver Grumier +Ilona Chamley-Watson +Chien-Ying Fraser-Holmes +Sandra Kaukenas +Louise Fernandez +Mercy Nakamoto +Sviatlana Kable +David Svarc +Kirsten Wang +Aleksey Pahlevanyan +Therese Stewart +Frano Mendelblatt +Konstadinos Troicki +Carolina Wang +Adrian Lidberg +Lea Besbes +Hodei Phoenix +Ivano Tetyukhin +Onan Weale +Marina Kasa +Jongwoo Sin +Chia Jensen +Binyuan Kumagai +Stephanie Piasecki +Sergio Ivankovic +Tom Anderson +Dorothy Abdvali +Megumi Liu +Giacomo Koski +Gulcan Burling +Jessica Basalaj +Mel Morrison +Duane Skvortsov +Hamish Drabenia +Nevin Hurtis +Emanuel Taleb +Gretta Aramburu +Olga Weel +Pavlos Nicolas +Wenwen Samilidis +Mikhail Vlcek +Ndiatte Brown +Charline Chen +Nadezda Plouffe +Thomas Song +Yasmin Soliman +Louise Mrisho +Sergi Mohr +Mary Tomashova +Stsiapan Kaun +Sebastian Lelas +Matt Waite +Dana Potent +Younggwon Fabre +Rosie Aydemir +Dorian Taylor +Josefin Ifadidou +Nathan Barnhart +Ebrahim Maeyens +James McNeill +Jihane Rulon +Chu Willis +Cristian Ghasemi +Camille Giglmayr +Micheen Zhang +Peter Howieson +Ludwig Pishchalnikov +Frithjof Urtans +Guzel Mangold +Noureddine Filipe +Jong Borysik +Mohamed Koo +Helge Saladino +Kate Pink +William Girard +Julian Mehmedi +Lee-Ann Song +Denis Rezola +Lukasz Dudas +Elena Michan +Audrey Martin +Yasmin Brathwaite +Shana Halsall +Patrick Miles +Elmir Sorribes +Artur Munkhbaatar +Jessica Bolat +Mario Agahozo +Niki Grangeon +Pietro Warfe +Grete Skydan +Line Emanuel +Mhairi French +Miles Robertson +Iryna Radovic +Urszula Heffernan +Yutong Pena +Viktoriia Glavnyk +Veronique Caianiello +Reza Hoovels +Irakli Wang +Patrick Kiyotake +Benjamin Reinprecht +Valentino Ferguson-McKenzie +Aleksandar Fasungova +Mark Bennett +Mahe Ivashko +Krzysztof Vesovic +Joel Scanlan +Luol Mooren +Christin Brown +Lucy Maguire +Fatih Eisel +Sam Lahnsteiner +Wenling Aguiar +Joachim Jennings +Aleksandrs Castellani +Jo-Wilfried Schornberg +Artur Talbot +Ibrahima Csima +Byambatseren Resch +Andile Li +Florent Gu +Marianna Ford +Yadira Marghiev +Margaux Glanc +Szymon Silva +Victoria Salopek +Kasper Addy +Nadiezda Catlin +Christianne Kalmer +Michael Hammarstrom +Karin Myers +Annamaria Crothers +Jinyan Bernard-Thomas +Stevy Fernandez +Daria Shkurenev +Wing McMillan +Rafal Saedeleer +Morgan Akkar +Ahmed Harrison +Elodie Arcioni +Daria Palermo +Isabel Boccard +Todor Tong +Eric Birca +Rachel Kostelecky +Seongeun Magdanis +Marta Kiala +Grete Makaranka +Katie Park +Louise Jin +Eloy Rasmussen +Jessie Vlahos +Taimuraz Melis +Antonija Shelley +Bahar Deligiannis +Anouar Felix +Yoo Miller +Sau Jordan +Francois Achour +Ferdinand Clair +Mariya Gibson +Lisa Poistogova +Larissa Cortes +Wassim Matsumoto +Luisa Barros +Leire Saltanovic +Patrick Navarro +Hakim Svennerstal +Laura Khokhlova +Peter Ochoa +Carolina Rondelez +Jacob Harris +Nina Krause +Guillermo Kim +Taehee Moberg +Abdalaati Rodriguez +Roberta Callahan +Eslam Kaifuchi +Harry Brunstrom +Anastasiya Rupp +Javier Volosova +Marcin Mihamle +Alexander Valois-Fortier +Shehab Makhloufi +Claudia Kavanagh +Marcus Orban +Ines Wong +Alan Gaspic +Nahla Zhedik +Thiago Bruno +Vicky Florez +Jose Paldanius +Andre Takatani +Mohammad Li +Mechiel Schulz +Yibo Al-Jumaili +Melissa Guell +Luciano Ahmad +Jose Uhl +Becchara Pareja +Dana Zagame +Ahed Alilovic +Doyler Ledaki +Mikhail Weel +Emmanuel Mukasheva +Antoinette Silva +Samantha Lin +Larissa Zhu +Jin Pontifex +Janne Bouw +Giulia Schwanitz +Ion Hutarovich +Martyn Stasiulis +Branden Cavela +Jens Tuimalealiifano +Spyridon Zhou +Anita Wright +Adnane Kim +Johanna Khinchegashvili +Hellen Maher +Mario Daroueche +Raul Makanza +Kwan Scherer +Nelly Rumjancevs +Zac Ashwood +Ying Dancette +Vladimir Dehghanabnavi +Richard Warren +Andreas Stanning +Ivan Versluis +Angel Cash +Gloria Martinez +Lianne Schuring +Petra Sakai +Katerina Riccobelli +Elizabeth Smith +Lyubov Gunnewijk +Omar Canitez +Georgios Gigli +Laetitia Yamauchi +Ivan D'almeida +Helen Cheywa +Hichem Schwarz +Martin Strebel +Olga Asgari +Sergey Abalo +Njisane Arkhipova +Leonardo Ghebresilasie +Ramon Kirkham +Urs Kim +Simone Morin +Dorothy Reckermann +Dion Pavlov +Marc Gebremedhin +Anna Holzdeppe +Michael Caceres +Milan Ekberg +Tyson Knezevic +Mylene Haywood +Aneta Cardoso +Charlotte Kachalova +Krystian Kean +Cristiane Forciniti +Mulualem Rodriguez +Romana Wu +Joshua Capkova +Malin Manie +Luca Lee +Hannah Knioua +Benjamin Kuramagomedov +Ates Wenger +Ivan Penny +Glencora Ebbesen +Mehdi Li +Aries Coston +Moritz Muller +Diego Shing +Gaetane Desprat +Leah Driel +Robin Vesely +Lei Lee +Olivier Akwu +Ratanakmony Prutsch +Norman Chen +Enia Esterhuizen +Judith Zhu +Liangliang Miller +Juan Lovric +Alfonso Jneibi +Adam Jezierski +Elena Modenesi +Antoine Vidrio +Xiaodong Dulko +Rohan Braun +Pilar Wilson +Clara Mason +Jamila Rodhe +Olga Kasza +Phillipp Al-Mashhadani +Bojana Erakovic +Muhamad Sanders +David Dawidowicz +Lieuwe Schneider +Robert Kang +Gemma Wang +Julia Olsson +Ryo Smith +Kerron Saedeleer +George Terpstra +Amine Lin +Tomasz Gkountoulas +Wai Mazic +Lihua Ivanova +Ivana Monteiro +Andriy Hrachov +Lauren Subotic +Yevgeniy Gushchina +Thiago Malave +Luis Petkovic +Kylie Ignaczak +Aida Olesen +Richard Scarantino +Scott Klein +Saul Huddle +Lisa Edgar +Christina Maneephan +Zinaida Birarelli +Artem Daluzyan +Jan-Di Ilias +Adrian Melzer +Rhys Faber +Thi Kostadinov +Kaori Donahue +Desiree Khachatryan +Ricardo Barnaby +Natalia Benedetti +Gideon Kowal +Kelita Wood +Tomas Rodriguez +Silke Nam +Trevor Peno +Baorong Mir +Chi Kim +Tim Csonka +Karolina Wells +Agnieszka Skhirtladze +Natalia Akwu +Pamela Fuchs +Gediminas Whitehurst +Benjamin Schlosser +Yuderqui Mrak +Matylda Muncan +Lijiao Fumic +Arseniy Janik +Wenjun Taimsoo +Daniela Schleu +Janelle Ovchinnikovs +Michael Gigli +Xiang Pocius +Nathan Freixa +Oscar Poistogova +Xavier Kiprop +Sidarka Smelyk +Josefin Ma +Nicola Saranovic +Ville Grandal +Emmanuel Figere +Sergej Ayalew +le Toksoy +Ahreum Sum +Bruno Williams +Luca Kipyegon +Alexander Wei +Tim Phillips +Kay Coster +Matthew Chakhnashvili +Juan Crow +Haakan Okrame +Omar Jon +Glenn Defar +Sajjad Oriwol +Anfisa Whalan +Brendan Hanany +Matthieu Wang +Beth Guo +Fetra Shemarov +Ivan Kim +Gemma Gaiduchik +Abdelaziz Durant +Vladimir Rodriguez +Oleksiy Ferrer +Krisztina Petzold +Sonia Williams +Karen Okruashvili +Boglarka Vacenovska +Mike Bostock +Birhan Ryan +Carolina Borman +Byunghee Filipe +Katerine Podlesnyy +William Salminen +Elena Felix +Chui Aymerich +Yohan Miljanic +Pierre-Alexis Tom +Gergo Faulkner +Ranohon Montano +Suji Gallantree +Spiridon Elkhedr +Juliane Kim +Ciaran Susanu +Rena Jankovic +Tervel Rojas +Flor Magnini +Thomas Boggiatto +Panagiotis Mucheru +Methkal Grabich +Simone Moreau +Yavor Gonzalez +Bahar Febrianti +Hyun Strebel +Anderson Oh +Brian Boyer +Jana Rendon +Shuai Sudarava +Dzmitry Busienei +Macarena Jorge +Mara Deroin +Heiki Outteridge +Georgios Antal +Mathieu Pigot +Eva Hirata +Qiang Hradecka +Paula Pizzo +Behdad Trowbridge +Sofiane Satch +Roderick Nagai +Rajiv Fogarty +Marie Kim +Darae Elsayed +Eric Lemaitre +Marius-Vasile Biezen +Yusuke Kuziutina +Didier Munoz +Francis Thiele +Augustin Lozano +Un Avramova +Keigo Lekai +Monika Heidler +Blaza Frolov +Joao Shavdatuashvili +Ibrahim Oie +Caroline Denayer +Rikke Ayeko +Thomas Jurkowski +Tarek Luis +Pascal Deligiannis +Jamie Kinderis +Victor Kondo +Marlene Nicholson +Zhizhi Kehoe +Clemens Cordon +Carmen Akkaev +Denis McIntosh +Leith Clear +Lesley Bithell +Mikolaj Sawa +Benjamin Pietrus +Marcia Ser +Aaron Purevjargal +Nikolina Khuraskina +Vera Sene +Inmara Castro +Vicente Shemarov +Nicolene Jeong +David Junior +James Aniello +Christine Bonk +Glenn Filandra +Yana Elmslie +Nick Osagie +Teodor Wilson +Nicolas Dotto +Wanida Barjaktarovic +Sergey Almeida +Francesca Rowbotham +Elco Williams +Lidiia Ng +Tosin Mckendry +Aurelie Kirkham +Dorde Leboucher +Dalibor Vidal +Evgenia Kechrid +Mizuho Bennett +Lotta Tereshchuk +Christina Vesela +Giovani Krug +Naphaswan Brownlee +Pierre-Alexis Zhang +Naomi Lush +Olga Brize +Sarolta Coughlin +Bashir Krovyakov +Ava Rusakova +Ignisious Hijgenaar +Monika Hwang +Elena Coster +Johana Carman +Gael Mushkiyev +Kellie Leon +Jong Dunlop-Barrett +Alix Dziamidava +Kate Scheuber +Danielle Edlund +Kelly Kulish +Wenjun Juszczak +Belal Knowles +Susan Weidlinger +Adrienne Buntic +Toni Karpova +Bastian Beadsworth +Sergey Barachet +Lisbeth Alptekin +Robert Toumi +Angela Belmonte +Nicholas Nechita +Anton Langehanenberg +Citra Comba +Sergey Marco +Concepcion Vasilevskis +Marios Gelpi +Julian Hjelmer +Will Mehmedovic +Deniz Kowalska +Erica Velez +Julian Lie +Amber Mattsson +Lucie Yang +Sheng Romdhane +Roland Madaj +Ingrid Fogarty +Maksim Culley +Stefano Moniqui +Navab Povh +Jan-Di Kazlou +Claudia Butkevych +Ming-Huang Araujo +Mehdi Kovalenko +Automne Driel +Alberto Pedersen +Zengyu Driel +Sebastian Yonemoto +Kozue Martinez +Luis Gascon +Daniel Herman +Yadira Psarra +Mercy Pietrzak +Caitlin Carli +Ryan Adams +Donggeun Guion-Firmin +Gabrielle Raudaschl +Thomas Magi +Daigoro Johansson +Mareme Mihelic +Linus Tran +Emmanuel Hornsey +Andrew Ruciak +Alexandre Smedins +Denis Matsenjwa +Stephanie Adlington +Gonzalo Nunes +Braian Haydar +Zara Luvsanlundeg +Josefin QUINTERO +Chen Moulinet +Alexandre Sawers +Justin Mandir +Inna Yu +Kacper Phillips +Iuliana Costa +Endurance Emmanuel +Dmitrii Cureton +Colin Vila +Wei White +Daisuke Saranovic +Shaunae Hallgrimsson +Tetyana Kvyatkovskyy +Aziz Chaabane +Maynor Lemos +Vincent Jagar +Moritz Dibaba +Deron Tarasova +Nikolay Ahmed +Dorian Sauer +Marvin Rice +Samantha Grankin +Irakli Dinu +The Pinguin +Derek Kazanin +Pedro Oliveira +Chunlei Balazs +Aya Levina +Maria Sheikhau +Zhongrong Stacchiotti +Isiah Murabito +Andrew Monteiro +Ayako Coetzee +Jade Jallouz +Veronika Wruck +Katerina Saenz +Sara Knowles +Julen Fogarty +James Takase +Emilie Jaeger +Luca Melendez +Jonas Ukumanov +Norma Anderson +Ludwig Trias +Matthias Ekimov +Beth Mazuryk +Radoslaw Licona +Dariya Kalentieva +Petr Smith +Nelcy Korshunov +Omar Aguirregaray +Boon Cortes +Gonzalo Pacheco +Aya Thunebro +Konstantinos Milanovic-Litre +Yugo Sesum +Reine Arteaga +Jur Gebremeskel +Yahima Gojkovic +Alexander Jiang +Sonja Tinsley +Ricardo Jones +Abraham Benitez +Gia Mogawane +Suzanne Warburton +Niverka Junior +Mateusz Yi +Aron Pilhofer +Xin Cuddihy +Olga Jon +Hortance McGlinchey +Marcel Petersen +Daniel Basalaj +Darrel Yamane +Mercy Verlinden +Juan Kim +Collis Freimuth +Anis Boninfante +Gabrio Dowabobo +Wilson Sauvage +Yu Moradi +Aleksandr Pendrel +Ser-Od Szasz +Trey Kirkham +Juliane Yanit +Sycerika Rabetsara +Daria Schmid +Hovhannes Piccinini +Danylo Aguiar +Sebastian Sorribes +Mandy Hinestroza +Margaux Knox +Lisa Yamamoto +Nick Burrows +Levan Ingram +Sanya Dreesens +Yun Luo +Megan Angelov +Xiaoyu Yang +Yi Gretchichnikova +Peter Wagner +Nagisa Leroy +Hung Mutlu +Jinjie Meeuw +Ponloeu Inthavong +Rodrigo Surgeloose +Marvin Peltier +Mingjuan Birgmark +Rizlen Errigo +Duhaeng Agren +Ari-Pekka Wei +Saheed Durkovic +Sarah Male +Beatriz Smock +Arsen Monya +Drasko Choi +Marcel Sigurdsson +Ilaria Hu +Hamdan Zabelinskaya +Radmila Nibali +Janin Aramburu +Suzana Teutenberg +Natalia Child +Maria Ro +Anabel Kal +Adnan Brendel +Zachary Podryadova +Xiaojun Hachlaf +Elisabeth Worthington +Myungshin Forgesson +Katerina Wang +Marcin Pechanova +Andrea Wenger +Anabel Dominguez +Pauline Ayim +Igor Kasa +Artem Tops-Alexander +Satoko Tegenkamp +Miho Franco +Raissa Araya +Sholpan Draudvila +Hiram Blume +Line Naylor +Iryna Malcolm +Maiko Zhang +Silviya Cesarini +Amaka Mathlouthi +Magdalena Siladi +Roman Ledaki +Cian Purnell +Kurt Multerer +Tassia Cejas +Myung Kim +Alexandra Jokinen +Stefan Webster +Jemma Gabriele +Alberto Fiakaifonu +Mateusz Metu diff --git a/tests/sh/teacher/mystery3/memberships/Museum_of_Bash_History b/tests/sh/teacher/mystery3/memberships/Museum_of_Bash_History new file mode 100644 index 00000000..92eb4a0f --- /dev/null +++ b/tests/sh/teacher/mystery3/memberships/Museum_of_Bash_History @@ -0,0 +1,1290 @@ +Limei Ioannou +Mihaela Toskic +Mihyun Dahlberg +Joseph Nielsen +Glenn Ouedraogo +Fabian Knight +Kien Wade-Fray +Elena Modenesi +Honami Kozhenkova +Yakhouba Garcia +Norbert Prokopenko +Tugba Brecciaroli +Shota Rakonczai +Olga Schofield +Azad Honeybone +Dion Pavlov +Aleksandra Silva +Lynsey Bailey +Dmitriy Halsted +Pajtim Pospisil +Austra Xu +Diego Smith +Bridget Usovich +Kellie Leon +Jur Gebremeskel +Camille Gao +Andrei Masna +Simon Rigaudo +Jose Pedersen +Selim Tregaro +Maher Vos +Vera Scarantino +Paula Pamg +Stevy Fernandez +Stanislav Dorneanu +Goran Driouch +Sergi Soto +Yang Fraser +Miguel Cho +Abiodun Rogers +Katya Lehtinen +Jermaine Qin +Germain Detti +Kieran Mota +Andrea Lammers +Yu Sakaguchi +Sanja Silva +Suhrob Jacob +Eric Ally +Guilherme Latt +Mario Agahozo +Yuko Gennaro +Yana Al-Garni +Roderick Nagai +Grainne Ross +Kay Kouassi +Betkili Betts +Omar Osl +Erina Cabrera +Mercy Pietrzak +Aksana Melian +Tetyana Kolchanova +Mei Stettinius +Igor Turner +Beata Altes +Geir Brash +Lukasz Afroudakis +Jamy Malzahn +Yi Mansouri +Xiaojun Lee +Rayan Titenis +Denis Machado +Marc Clair +Sarah Dovgun +Isil Gonzalez +Xiaodong Dulko +Marina Tchuanyo +Chong Massialas +Carlos Hall +Faith Kim +Mohammad Li +Antonija Dilmukhamedov +Mathias Laukkanen +Goldie Marais +Mariaesthela O'connor +Keri-anne KORSIZ +Mikhail Laalou +Jingjing Gray +Shane Fischer +Luis Lundgren +Kynan Viljoen +Petra Sakai +Andrei Delattre-Demory +Carl Chapman +James Seferovic +Taizo Barry +Philip Hilario +Nick Rogers +Malin Archibald +Komeil Menchov +Mateusz Yi +Simone Fesikov +Nicholas Kudryashov +Scott Klein +Johana Carman +Brenda Hsu +Diletta Tindall +Nadeen Carrasco +Jefferson Nagy +Anna Munch +Lisbeth Savani +Anderson Oh +Elco Williams +Eduardo Collins +Elena Costa +James Brooks +Ates Wenger +Alina Ciobanu +Stephanie Sofyan +Clement Starovic +Connor Touzaint +Saori Dancette +Blaza Frolov +Toshiyuki Nyasango +Jung Jung +Anna Savinova +Georgi Dent +Albert Malki +Wan-Jung Gasol +Chia Bleasdale +Natalia Kim +Ka Ma +Tiago Lauric +Yuliya Sokolov +Fernanda Purchase +James Haghi +Jacheol Hyun +Michal Stahlberg +Courtney Yankey +Simas Takahashi +Job Cole +Dariya Kalentieva +Mechiel Maric +Suzaan Dawkins +Macarena Jorge +Julie Henriques +Kieran Bayaraa +Ibrahima Byrnes +Sara Siriteanu +Olga Puga +Petr Smith +Hichem Schwarz +Simona Mennigen +Wai Mazic +Jaele Sharp +Sylwia Yang +DeeDee Warfe +Ivan Abdusalomov +Danylo Bond-Williams +Ranohon Montano +David Moutton +Liliana Mullin +Abdelaziz Durant +Alberto Han +Leford Lapin +Svetlana Wang +Alexey Friedrich +Margaux Jung +Susan Weidlinger +Emmanuel Mukasheva +Jack Shafar +Peter Schuch +Vardan Romeu +Danyal Lefert +Milos Blazhevski +Andre Romeu +Ahmed Miyake +Mamorallo Holzer +Edwige Henderson +Alena Noa +Evgeny Schoneborn +Tetyana Kvyatkovskyy +Samantha Lin +Kateryna Mitrea +Viktor Steffens +Guido Kanerva +The Pinguin +Ludivine Chetcuti +Raphaelle Batum +Ainhoa Taylor +Corine Kashirina +Mario Husseiny +Husayn Reuse +Barbara Shakes-Drayton +Johana Yauhleuskaya +Michael Stamatoyiannis +Georgina Issanova +Ying Marinova +Mebrahtom Fields +Danijel Carriqueo +Marlene Nicholson +Ventsislav Niyazbekov +Evelin Niyazbekov +Andisiwe Graham +Sonata Raif +Spiridon Elkhedr +Silviya Cesarini +Shaunae Hallgrimsson +Jayme Suarez +Natalia Manaudou +Arianna Tansai +Aly Roberts +Sarra Larsen +Tsilavina Wozniacki +Jarred Selimau +Anas Ma +Tatiana Muncan +Kyung-Ok Monaco +Vera Sene +Gulnar Kowalska +Arben Mikhaylov +Joao Dovgodko +Riccardo Cheng +Laetitia Cornelissen +Tetsuya Cabrera +Torben Jaskolka +Kim Kable +Chelsea Thiele +Kayla Kim +Nilson Belmadani +Junggeu Firova +Maja Orban +Kate Bourihane +Nicole Kovalev +Casey Santos +Renee Duenas +Beatriz Nooijer +Matthew Toth +Ravil Azou +Gia Yoon +Liuyang Darnel +Irina Kaddouri +Adrian Lidberg +Carlos Yakimenko +Silvana Bianconi +Gonzalo Gough +Constantina Nagel +Franziska Huang +Charlotte Ranfagni +Keith Beresnyeva +Steven Schlanger +Bruno Ruban +Natalie Cheverton +Paulo Seric +Enzo Balciunas +Pascal Davaasukh +Roxana Srebotnik +Ludivine Williams +Wei White +Maria Banco +Wouter Brennauer +Olga Richards +Peter Jang +Xiaoxia Yamagata +Shane Gemmell +Rizlen Errigo +Iuliia Oatley +Todd Lewis-Smallwood +Hamdan Zabelinskaya +Sviatlana Zucchetti +Jose Morgan +Shane Dodig +Hun-Min Soroka +Emma Hausding +Mylene Murray +Ryosuke Ciglar +Marleen Rodrigues +Abiodun Horvath +Oleksandr Schwarzkopf +Alexa Patrick +Georgina Zuniga +Helge Saladino +Jan Ferreira +Bastian Horvat-Panda +Suzanne Warburton +Augustin Lozano +Shuai Muttai +Derek Kazanin +Rosie Aydemir +Artur Teltull +Phillipp Absalon +Kyle Chamberlain +Guor Rodhe +Kenny Chavanel +Levan Ingram +Brian Boyer +Bedan Soubeyrand +Maximilian Sedoykina +Darcy Zouari +Sebastian Drame +Gwang-Hyeon Mears +Andres Shi +Lisa Mendibaev +Ivan Contreras +Ivana Grubisic +Charlotte Kachalova +Eric Babos +Pablo Pereyra +Claudia Metu +Viktor Rangelova +Moana Xian +Ryan Pota +El Gonzalez +Ashleigh Bruno +Marquinhos Samara +Tim Cambage +Docus Muff +Yahima Menkov +Dalibor Vidal +Kyle Koala +Weiyi Kirpulyanskyy +Joel Csernoviczki +Aleksei Wang +Gojko Lee +Gulcan Burling +Adenizia Kim +Federico Pavoni +Daniel Lim +Kobe Driebergen +Aleksandr Rutherford +Paolo Sirikaew +Simone Moreau +Fortunato Deng +Kristina Sokhiev +Ayouba Carrington +Rafal Ri +Pavlos Nicolas +Juan Lacrabere +Ida Deak-Bardos +Jerome Amoros +Priscilla Chitu +Piotr Rabente +Daniel Green +Robert Skrzypulec +Pui Coronel +Marie-Louise Hosking +Niverka Junior +Mariko Shimamoto +Bilel Boonsawad +Deni Iovu +Ioannis Martinez +Chia Hilario +Nicholas Stowell +Rubie Sukhorukov +Gareth Culley +Bianca Coleman +Angelique Raden +Angela Belmonte +Andrew Ekame +Annabel Church +Victor Labyad +Marcel Goodison +Veronique Caianiello +Marcos Laukkanen +Maiko Zhang +Ionut Kalovics +Fineza Davis +Ryan Welte +Hursit Gestel +Diego Michan +Dallal Elgammal +Marie Unsworth +Giovani Alflaij +Sajjad Ulrich +Anton Aguilar +Lori Jacobsen +Jean-Christophe Fujio +Sarah Markussen +Ashlee Sakai +Tina Ortiz +Alice Riou +Adrien Kleibrink +Alfredo Polyanskiy +Ratanakmony Prutsch +Marcel Roelandts +Urs Kim +Artem Napoleon +Yoann Gentry +Charline Chen +Chia-Ying Djokovic +Lorena Ginn +Eunice Zairov +Luis Elhawary +Mary Tomashova +Benjamin Bilici +Seonkwan Cha +Kyoko Bennett +Vera Silva +Ricardo Jones +Darae Hidayat +Moon Caille +Horacio Klizan +Simona Sauveplane +Gauthier Bindrich +Tina Teutenberg +Jingbiao Cheon +Marcel Petersen +Thomas Boggiatto +Mansur Engleder +Marry Azizi +Miranda Mulligan +Maider Piccinini +Chris Keller +Didier Munoz +Jessica Mcgivern +Periklis Gemmell +Louisa Tomas +Francielle Ziolkowski +Karolina Brennauer +Niklas Donckers +Lisa Poistogova +Egor Ferreira +David Schuh +Adrienne Kreanga +Svetlana Janoyan +Shijia Conway +Tom Ptak +Nazario Barrondo +Deron Estanguet +Shiho Berkel +David Rahimi +Viktoriia Mathlouthi +Yuki Hayashi +Sarah Zaidi +Lee Farris +Rita Sanchez +Maroi Tatham +Reza Hoovels +Liubov Ruh +Bodin Prevolaraki +Yadira Marghiev +Shane Lauric +Stephanie Adlington +Xiang Diaz +Samira Ri +Naomi Presciutti +Martin Strebel +Shaune Hurskainen +Gwen Fredricson +Dieter Schooling +Nenad Moran +Iuliia Kim +Suji Labani +Christina Illarramendi +Yunwen Crous +Polen Borel +Niki Batkovic +Daniele Babaryka +Nathan Nishikori +Ash Buckland +Daniel Jackson +Kelly Olivier +Shao Watt +Vincent Brize +Marina Ma +Russell Verdasco +Haibing Lee +Stanislav Cherobon-Bawcom +Pedro Prieto +Andisiwe Ki +Pimsiri Panchia +Michal Krsmanovic +Kim Estrada +Pawel Jensen +Alison Potro +Zamandosi Chuang +Deni Yao +Mohamed Silva +Jukka Barros +Shara Gomez +Donald Aleksic +Jeroen Torstensson +Eslam Kaifuchi +Yevgeniy Ghiban +Carolina Macias +Philipine Hansen +Tim Han +Marian Atkinson +Pawel Coetzee +Westley Tatalashvili +Yihua Grunsven +Barna Vican +Hamish Drabenia +Mulualem Rodriguez +Lidija Usovich +Sergey Dahlberg +Gonzalo Nunes +Maro Jiang +Kira Richards-Ross +Francois Achour +Maria Smid +Wenwen Pitchford +Dakota Ulrich +Olga Castano +Olga Brize +Tino Henze +Grigor Suuto +Patricia Edward +Iuliia Barseghyan +Paul Tsakmakis +Marcia Ser +Remy Barac +Nicholas Hornsey +Kim Klaas +Nils Guzzetti +Carmelita Zahmi +Benjamin Jeong +Mclain Rakoczy +Anja Jang +Marc Atici +Anastasia England +Albert Barthel +Chu Willis +Karina Jelaca +Vitaliy Robson +Dzhamal Barry +Harry Brunstrom +Joel Tverdohlib +Shunsuke Erakovic +Alexandre Smedins +Hyunsung Ivancsik +Ewelina Hwang +Maximiliano Matsumoto +Charles Cadee +Gemma Wang +Yue Zargari +Natthanan Caluag +Hoi Martina +Mohamed Soares +Hajung Cardona +Josefin Crawshay +Kyung Granstrom +Jemma Modenesi +Viktor Michshuk +Kate Pink +Derek Dancette +Po Otsuka +Hannah Gherman +Alistair McGeorge +Ashley Johansson +Bjoern Markt +Karen Okruashvili +Mizuho Suetsuna +Aselefech Gkountoulas +Danielys Butler +Lenise Liu +Rima Sommer +Richard Ruiz +Hyok Maciulis +Alan Mestres +George Terpstra +Zhiwen Wu +Lisbeth Alptekin +Jean-Christophe Kirkham +Emanuele Siegelaar +Donglun Nhlapo +Onan Kim +Christian Machavariani +Nahla Zhedik +Helen Beaubien +Alexandre Sawers +Hanna-Maria Bluman +Dunia Paton +Endene Samsonov +Rosario Rulon +Chen Moulinet +Manuela Syllabova +Christopher Erichsen +Haris Sinclair +Dylan Espinosa +Mikhail Napoleao +Katarzyna Calabrese +Artur Talbot +Stefan Noonan +James Meszaros +Jennifer Johnson +Viktoriia Madico +Aline Peters +Lleyton Houghton +Rasmus Rindom +Yang Yin +Mattias Kovtunovskaia +Damian Woods +Marina Murphy +Jiao Fasungova +Mohamed Kazakevic +Juan Osl +Sonia Gillis +Takamasa Kasa +Sara Birarelli +Velichko Connor +Camilla Terpstra +Khairul Morningstar +Eve Pessoa +Katya Baddeley +Lucy Burmistrova +Nicolas Gyurov +Joao Shavdatuashvili +Lina Al-Jumaili +Elia Mota +Reza Hoff +Vera Rickard +Klaas Wykes +Abdalaati Rodriguez +Josefin Ma +Victoria Homklin +Kerron Saedeleer +Jamie Kinderis +Derrick Jackson +Viorica Schwarzkopf +Yin Toma +Melanie Disney-May +Elena Quinonez +Marina Kim +Pavlo Stewart +Lucia O'malley +Gabrielle Lidberg +Matthieu Wang +Joachim Mironcic +Alejandro Collins +Silvia Nakamoto +Emmeline Vasilionak +Shuang Cabrera +Keon Mcculloch +Justin Mandir +Wanida Barjaktarovic +Ilya Saito +Hiroyuki Meye +Amine Lin +Nikola Zevina +Margarita Donckers +Emanuel Hanany +Hannah Knioua +Victoria Davis +Kara Vougiouka +Daniela Schaer +Laura Sanca +Adnane Kim +Louisa Hazer +Sangjin Hindes +Risa Synoradzka +Anthony Machavariani +Milena Wojnarowicz +Bernard Tamayo +Yue Birmingham +Timothy Goffin +Andre Qin +Rachel Gonzalez +Desiree Kavcic +Pedro Egelstaff +Serghei Alhasan +Hideki Liivamagi +Jorge Lambert +Mary Wallace +Brittany Askarov +Marian Jager +Bostjan Kasold +Kerron Bracciali +Miyu Murray +Katherine Luca +Jade Jallouz +Sinead McHale +Saskia Pliev +Byron Lezak +Thiago Rosso +Sandra Kaukenas +Stephanie Rodrigues +Traian Chen +Milka Spiegelburg +Ifeoma Lahbabi +Neil Kopp +Louise Karimov +Vittoria Lima +Sara Walker +Jinling Golovkina +Vesna Rutter +Chien-Ying Bompastor +Mylene Haywood +Damian Baki +Dmytro Song +Dmytro Golding +Cy Malzahn +Darae Charlos +On Schops +Rene Chen +James McNeill +Vincent Krasnov +Tsvetana Jennings +Yomara Setiadi +Jongwoo Sin +Erik Plouffe +Petar Dominguez +Ali Watanabe +Lisa Edgar +Patrick Miles +Antonina Raif +Yimeng Amaris +Mireia Lindh +Ivana Fajdek +Won Teltull +Kateryna Matei +Ahmed Elkawiseh +Anna Holzdeppe +Yunlei Xu +Rafael Yero +Virgil Neny +Marcel Cainero +Kimberly Yu +Ahmed Gordon +Nicola Hosking +Francisco Feldwehr +Carolina Rondelez +Lucas Ahmed +Tomasz Jang +Alvaro Viljoen +Allison Musinschi +Vladimir Benedetti +Lizzie Sheiko +DeeDee Dumitrescu-Lazar +Jordan Panizzon +Cian Purnell +Julia Dovgodko +Jamol Perez +William Salminen +Gavin Bauza +Shaune Milevicius +Sophie Giorgetti +Jonas Ciglar +Fergus Sykorova +Attila Vicaut +Julie Ovchinnikovs +Hagos Hassler +Xing Varga +Nina Krause +Lena Miyama +Jamaladdin Dalby +Andreas Stanning +Besik Unsworth +Lei Wojtkowiak +Roderick Atari +Tamara Cafaro +Pierre-Alexis Zhang +Anna Hosking +Irina Song +Juan Lovric +Mattia Saramotins +Norman Chen +Tina Boidin +Roger Kaeufer +Gulsah Makarova +Luigi Schwaiger +Yulan Mohaupt +Matthew Lessard +Qingfeng Li +Caster Gong +Louisa Horasan +Eric Silva +Dilshod Thiney +Paola Tai +Ehsan Yamazaki +Nevin Ikeda +Sebastian Gadabadze +Ponloeu Inthavong +Ai Portela +Ciaran Susanu +Xiaoxu Cardoso +Olena Kromowidjojo +Krista Dai +Hakim Nyantai +Eric Birca +Johan Arvaniti +Maksim Loza +Luke Ruh +Matt Waite +Martyna Kirkbride +Amanda Tateno +Deokhyeon Khinchegashvili +Marcelo Filippov +Luka Begu +Aleksandar Sandell +Aleksandra Gordon +Jitka Tranter +Thais Pereira +Silvio Steryiou +Seoyeong Montoya +Ilya Marcano +Aya Rakoczy +Whaseung Maresova +Emma Wei +Rebecca Ruta +Jitka Mottram +Gaetane Partridge +Yuliya Shiratori +Konstantin Papachristos +Teklit Zheng +Amer Reyes +Iaroslav Jakabos +Konstadinos Troicki +Alexander Frederiksen +Asumi Colo +Mohamed Steele +Patricia Zhang +Aniko Blume +Ensar Taylor +Konstadinos Voronov +Danijel Paderina +Jose Paldanius +Yerzhan Poulios +Marton Coetzee +Marius-Vasile Sidi +Martin Voulgarakis +Adnan Brendel +Lynne Om +Mateusz Mendoza +Simon Zordo +Moussa Fernandez +Aron Pilhofer +Michael Orjuela +Neisha Liang +Oliver Mokoka +Nurul Han +Eduarda Bartonova +Beth Mazuryk +Karolina Wells +Jenny Flognman +Serhiy Kang +Gundegmaa El-Sheryf +Alexandr Liu +Bubmin Saenz +Kevin Dawidowicz +Eusebio Wallace +Mario Vanasch +Todd Kuzmenok +Amine Kiss +Jing Sprunger +Ola Almeida +Carl Roux +Yumeka Guo +Mikaela Iwao +Daniel Loyden +Zouhair Ri +Marcus Khalid +Marcelien Hosnyanszky +Julian Antosova +Dzmitry Busienei +Rutger Mareghni +Antonin Morais +Shiho Brens +Suyoung Rodrigues +El-Sayed Prodius +Thi Kostadinov +Marcelinho Pendrel +Anita Goubel +Jacques Ide +Pieter-Jan Huang +Andreas Paonessa +Ever Levins +Anton Dlamini +Mark Turner +Natalia Lippok +Austra Bauza +Sophie Ahmadov +Yuhan Ryang +Uladzimir Bertrand +Jean-Christophe Pompey +Mike Bostock +Edgars Meshref +Amy Zaiser +Sarah Lokluoglu +Lorena Marenic +Andrea Kimani +Hye Wallace +Aina Gavrilovich +Stina Perova +James Chetcuti +Yik Akkaoui +Sadio Chouiref +Vincent Robinson +Chia Jensen +Yibo Al-Jumaili +Borja Rodriguez +Juan Oiwa +Caba Mandic +Vanesa Hitchon +Zamandosi Flood +Shehab Makhloufi +Xi Somogyi +James Takase +Jean-Christophe Davenport +Matias Hosnyanszky +Ava Silva +Myung McCafferty +Ali Milthaler +Junjing Kang +Stepan Gallantree +Bebey Rodaki +Andrew Liu +Marcin Mihamle +Liangliang Miller +Diego Udovicic +Yoo Miller +Yoon Kelsey +Walton Souleymane +Wirimai Enders +Louis Maneza +Sanne Kuo +Mie Callahan +Younghui Karasek +Ahmed Chammartin +Arlene Douka +Katharina Bartonickova +Karen Rew +Constanze Sanchez +Abraham Benitez +Mikhail Polaczyk +Jie Tarasova +Nadezda Lee +Oscar Mitic +Vincent Hartig +Silke Nam +Ziwei Braas +Agnieszka Iersel +Nenad Blerk +Mikhail Vlcek +Jangy Scott-Arruda +Suyeon Woo +Ivana Monteiro +Chun Yamaleu +Richard Kim +Khadzhimurat Wilkinson +Lidiia Ng +Nazmi Patrikeev +Julia Jeon +Kelly Gemmell +Olexiy Cheon +Emily Chow +Slobodan Elaisa +Zachary Podryadova +Sonja Ide +Klara Gubarev +Jeannette Prokopiev +Jaime Bruno +Michela Brown +Camille Andersen +Christofer Sokolova +Erwan Putra +Zsuzsanna Hodge +Xavier Cox +Chie Aigner +Shinichi Grasu +Chloe Santos +Lukasz Draudvila +Lee-Ann Song +Ana Williams +Ahmed Saladuha +Dina Hwang +Naydene Cabral +Krystian Pen +Lijie Fowles +Carlos Cebrian +Roba Suvorau +Ayako Coetzee +Lucas Neal +James Aniello +Bruno Tomas +Ju Isner +Tanyaporn Mazuryk +Javier Branza +Jinhyeok Yamaguchi +Robert Dent +Peng Perez +Valerie Battisti +Iuliana Costa +Stijn Choi +Yasemin Cavela +Alexander Obermoser +Irene Soloniaina +Yu Chinnawong +Anton Gu +Gia Mogawane +Jayde Madarasz +Boniface Kanis +Esref Moiseev +Yadira Psarra +Glenn Filandra +Marouen Tatari +Alex Nichols +Ibrahima Csima +Tinne Campriani +Cesar Chen +Ken Roland +Ivan Nakai +Olha Lewis-Smallwood +Alfonso Jneibi +Bashir Krovyakov +Yanfei Nono +Julien Chen +Kayono Nikitina +Spyridon Zhou +Elisabeth Amertil +Benjamin Noumonvi +Aldo Cerkovskis +Sandrine Lapeyre +Jehue Zolnerovics +Silvia Ioneticu +Aries Coston +Carli Kajuga +Denys Hasannen +Jo-Wilfried Schornberg +Daniel Kouassi +Jonas Vlcek +Aaron Purevjargal +Adrianti Tsirekidze +Anthony Dahlgren +Kaliese Sudol +Hellen Maher +Irene Russell +Lucy Vitting +Jamale Fu +Tatsuhiro Thompson +Cameron Allepuz +Crisanto Saikawa +Samantha Ahamada +Nguyen Mueller +Marcia Khubbieva +Kris White +Samantha Hantuchova +Andy Maier +Joshua Azcarraga +Tamas Fredericks +Mareme Mihelic +Natalya Mrabet +Christopher Follmann +Arturs Swann +Jianlian Burgers +Dongwon Rodriguez +Krystian Kean +Seen Flores +Maxime Tatishvili +Damien Hejmej +Sally Fuamatu +Lok Al-Athba +Diego Saedeleer +Lina Bujdoso +Barbara Hutten +Ioulietta Assefa +Martyn Stasiulis +Sergej Yli-Kiikka +Lionel Shabanov +Shara Burgrova +Alvaro Tanatarov +Bin Iersel +Dominic Al-Azzawi +Larisa Nagy +Ashley Saramotins +Lukas Jang +Peter Zyabkina +Sofiane Satch +Sandeep Karayel +Robbert Kanerva +Kanae Bracciali +Tim Mankoc +Aleksandr Inthavong +Alix Dziamidava +Pietro Boukhima +Murilo Rohart +Radu Colley +Lieuwe Lim +Henk Mrvaljevic +Ka Ilyes +Keith Pavoni +Seongeun Magdanis +Kate Scheuber +Kevin Giovannoni +Fionnuala Horst +Dmitriy Liang +Beth Andrade +Nicholas Nechita +El Rooney +Juliane Yanit +Wesley Meftah +Komeil Matheson +Nadiya BAER +Athanasia Ayling +Feiyi Zavadsky +Reza Egelstaff +Rasul Tichelt +Valentina Teschke +Nastassia Zalsky +Tamas Guo +Irina Tigau +Kianoush Tan +Alana Thiam +Moses Sihame +Elena Zhang +Naomi Gattsiev +Victor Ganeev +Valerie Penezic +Rachelle Cherniavska +Sardar Vuckovic +Sarah Guzzetti +Daniel Huckle +Mohamed Koo +Donglun Rohner +Ahreum Sum +Theodora Conway +Agnes Vasina +Magalie Allen +Xuanxu Barnard +Vladimir Dehghanabnavi +Darryl Strebel +Sholpan Draudvila +Cornel Ding +Katarina Rogina +Amy Prevot +Leah Aleksic +Eva Markussen +Melissa Brguljan +Timothy Li +Cindy Narcisse +Aleksei Rouwendaal +Njisane Arkhipova +Anaso Booth +Alexandros Grumier +Annalie Ekame +Alex Kim +Joshua Fenclova +Megan Raymond +Wen Ghayaza +Ryan Prasad +Monika Hwang +Anna Hirano +Johannes Berna +Timm Augustyn +Melanie Gibson-Byrne +Ravil Ismail +Gediminas Whitehurst +Rashed Head +Siham Moura +Molly Shtokalov +Darlenis Helal +Gabrielle Tikhomirova +Hanna Wraae +Emilio Williams +Leryn Henao +Eun Burton +Iain Kossayev +Laura Ng +Nicholas Ihle +Donglun Borlee +Patrick Navarro +David Jeong +Anastasia Biannic +Jana Yudin +Mohamed Nystrand +Toea Liptak +Jessica Sprenger +Peter Garcia +Ling Kromowidjojo +Hamid David +Jessica Garderen +Emmanuel Hornsey +Sven Nascimento +Vasilij Wang +Sanya Dreesens +Nacissela Makarau +Mikalai Bassaw +Kelly Kulish +Facinet Ratna +Michael Mirnyi +Szabolcs Culley +Kozue Martinez +Ahmet Polishchuk +Kay Coster +Casey Mccabe +Aldo Nicolas +Yasmin Brathwaite +DeeDee Montoya +Tyler Belmadani +Sascha Bentley +Dongho Jensen +Annari Simmonds +Delwayne Boon +Thomas Antonov +Mizuho Bennett +Elena Clark +Wissem Davies +Birhan Evans +Viktoriya Aguirregaray +Jussi Nesti +Jordan Ndoumbe +Kianoush Skrimov +Janin Aramburu +Marie-Pier Schultze +Nikolaus Milatz +Ling Langridge +Yury Mensah-Bonsu +Mate Montano +Mariusz Yang +Maurine Peters +Kay Rosa +Daniel Marburg +Jamila Rodhe +Almensh Zbogar +Evgeny May-Treanor +Yutong Pena +Ivana Lee +Oluwasegun Annabel +Marta Pyatachenko +Tatyana Mitrovic +Kelsey Bludova +Fanny Castillo +Georgia Tipsarevic +Rimantas Luca +Johana Pistorius +Matteo Nieminen +Alexis Diaz +Tarek Takahira +Hae-Ran Garcia +Alice Irabaruta +Mariya Gibson +Ravil Mokoena +Galen Kirpulyanskyy +Danielle Edlund +Henk Schorn +Jerome Pikkarainen +Norbert Feldwehr +Carlos Sekaric +Kyle Baddeley +Sviatlana Kable +Alexander Jiang +Sergey Zurrer +Jan-Di Kazlou +Jeneba Lee +Dathan Ziadi +Nourhan Benfeito +Arantxa Kalnins +Dagmara Balla +Yauheni Sokolowska +Brittany Crain +Fredy Melis +Casey Basic +Teun Tancock +Matteo Goncharova +Lene Zargari +Lauryn Powrie +Cristian Bennett +Tyson Tong +Shalane Shiratori +Francena Savchenko +Larissa Zhu +Diego Stojic +Margaux Glanc +Mostafa Kleen +Arnie Flaque +Benjamin Parker +Fabio Simonet +Nicola Socko +Iveta Blagojevic +Momotaro Khmyrova +Alexander Kurbanov +Daria Shkurenev +Mihai Correa +Azad Lavanchy +Marielis Findlay +Jonathan Niit +Bogdan Zavadova +Marry Gille +Francine Beaudry +Sergey Kain +Riza Bleasdale +Soufiane Odumosu +Bill Turner +Raphael Hardee +le Toksoy +Emanuele Oulmou +Peter Sloma +Angela Palomo +Peter Neethling +Michelle Kirilenko diff --git a/tests/sh/teacher/mystery3/memberships/Terminal_City_Library b/tests/sh/teacher/mystery3/memberships/Terminal_City_Library new file mode 100644 index 00000000..cb676b51 --- /dev/null +++ b/tests/sh/teacher/mystery3/memberships/Terminal_City_Library @@ -0,0 +1,1296 @@ +Julen Fogarty +Fabian Knight +Katarzyna Talay +Antonina Raif +Viktor Lamdassem +Yuko Gennaro +Hui Ahmed +Bianca Athanasiadis +Nils Guzzetti +Natasha Haywood +Sheng Romdhane +Hannah Barker +Marcos Laukkanen +Konstantin Papachristos +Andres Bouramdane +Mohamed Soares +Ivan Araujo +Kacper Coster +Woroud Baroukh +Benjamin Pietrus +Amer Lao +Tania Silva +Mario Boninfante +Rafal Hartley +Norayr Burton +Alicia Samoilau +Nicholas Kudryashov +Javier Branza +Eric Rouba +Elena Clark +Ioannis Tkach +Maximiliano Han +Marius Davies +Antonina Bernier +Irene Morath +Mikalai Bassaw +Zivko Manafov +Russell Miao +Yuliya Shiratori +Lucy Perez +Adam Sasaki +Mattias Kovtunovskaia +Sanja Silva +Meiliana Berglund +Nahla Tyler +Sarra Bainbridge +Donggeun Guion-Firmin +Keehee Rivers +Habibollah Smith +Melissa Brguljan +Kelis Wurzel +Maria Arismendi +Irawan Souza +Ahmed Weir +Kirani Kalargaris +Ioannis Burgaard +Sara Campbell +Becky Wozniak +Yuhan Ryang +Anita Goubel +Asgeir Goffin +Ganna Zonta +Anaso Booth +Alexander Kosok +Attila Vicaut +Donatien Lotfi +Masashi Angilella +Destinee Kucana +Milan Emmolo +Pavlos Nicolas +Daouda Martelli +Elisabeth Worthington +Braian Haydar +James Chetcuti +Darryl Soeda +Arseniy Janik +Alexandra Solja +Adrienne Buntic +Mujinga Peterson +Stsiapan Balmy +Jonathan Perez-Dortona +Celeste Leroy +Lucy Burmistrova +Zargo Dehesa +Marilyn Dominguez +Mhairi French +William Girard +Yu Moradi +Andriy Lukashyk +Monika Herman +Lukas Gong +Yuichi Burgh +Omar Dumerc +Clara Ahye +Yige Lamoen +Ai Lovtcova +Julie Ovchinnikovs +Janet Ganeev +Sven Nascimento +Sara Friis +Paul Demare +Yauhen Rafferty +Russell Aidietyte +Jan-Di Ilias +Norma Tomic +Julie Henriques +Andrew Monteiro +Brahim Wang +Omar Hurst +Ainhoa Taylor +Chun Yamaleu +Camille Andersen +Massimo Groot +Maksim Acuff +Rebecca Reid-Ross +Ruta Trowbridge +Kame Vesely +Bilel Karth +Ryan Fogg +James McNeill +Stefan Webster +Sarra Larsen +Jose Morgan +Par Awad +Yuhei Hybois +Kiril Larsson +Dalibor Gibson +Nenad Moran +Susana Barcelo +Elea Li +Mattia Sanchez +Emmanuel Barbieri +Sonata Raif +Maurine Peters +Todd Lewis-Smallwood +Anis Boninfante +Martin Houvenaghel +Afgan Mrvaljevic +Lisa Edgar +Silas Voronkov +Kilakone D'elia +Teresa Andrewartha +Kristina Liess +Minxia Yu +Peter Neethling +Yayoi Buckman +Nuno Rajabi +Ying Dancette +Jeff Larson +Tina Hristova +Lucia Berens +Michela Ayed +Martino Mayer +Norbert Feldwehr +Jade Kopac +Israel Osman +Mikhail Napoleao +Liam Edelman +Anderson Guo +Stanislav Dorneanu +Ahmed Annani +David Schuh +Aziz Chaabane +Hannah Knioua +Andrea Lammers +Pavel Lee +Eric Babos +Automne Driel +Maureen Silva +Charles He +Tosin Mckendry +Prince Zyl +Joel Tverdohlib +Jieun Sukhorukov +Juan Jeon +Rafael Vezzali +Phuttharaksa Signate +Edinson Rodrigues +Jehue Wild +Marina Murphy +Sara Hore +Marco Dries +Emiliia Gebhardt +Konstadinos Voronov +Aleksey Garcia +Hellen Maher +Maximilian Sedoykina +Samantha Zavadova +Martin Kergyte +Rokas Karasev +Daniel Shipilova +James Rosic +Dae-Nam Dunkley-Smith +Kari Boulleau +Teklemariam Fabre +Joshua Grechishnikova +Samson Burgaard +Azad Lavanchy +Milos Pavoni +Ashleigh Aissou +Sungdong Willis +Melissa Jovanovic +Kelsey Bludova +Cristiane Forciniti +Alexander Kurbanov +Radoslav Susanu +Dariya Bratoev +Alexander Hansen +Yennifer Haydar +Yonas Farrell +David Ferreira +William Salminen +Ying Marinova +Betsey Cunha +Faith Kim +Kyuwoong Pacheco +Bahar Febrianti +Evgeniya Maneva +Jessica Steger +Jose Banks +Katerin Pliev +Mario Vanasch +Marcin Mihamle +Karlo Romagnolo +Fabrizio Lanigan-O'keeffe +Francisco Lahbabi +Khalil Shi +Stephanie Hansen +Jake Claver +Juan Ananenka +Lieuwe Lim +Birhan Ryan +Kateryna Henzell +Vera Silva +Job Kretschmer +Ramon Kirkham +Boniface Kanis +Dagmara Balla +Liangliang Miller +Victoria Monteiro +Joe Germuska +Shana Halsall +Maris Izmaylova +Zohar Iwashimizu +Nelson Meilutyte +Claudia Butkevych +Diego Shing +Wen Ghayaza +Roel Garcia +Hedvig Alameri +George Rupp +Eva Hirata +Matiss Rosa +Nicola Belikova +Robert Ryan +Xiaoxiang Lan +Jie Tarasova +Benjamin Parker +David Dawidowicz +Gabrielle Lidberg +Zafeirios Ryu +Yaroslava Mehmedi +David Perez +Tomas Kaki +Monika Heidler +Elena Michan +William Bindrich +Salma Cely +Jonas Ciglar +Karen Brandl +Flor Magnini +Dragos Stone +Bartlomiej Marroquin +Ediz Raja +Steven Schlanger +Xavier Hayashi +Joel Giordano +Ashleigh Bruno +Jemma Wang +Glenn Gonzalez +Artiom Engin +Anett Kamaruddin +Fernanda Armstrong +Heather Billings +Slobodan White +Attila Sullivan +Elisa Ouedraogo +Claudia Eshuis +Pavel Lepron +Muhamad Lascar +Dmitriy Liang +Sabine Moffatt +Debbie Mohamed +Colin Vila +Elena Mekic +Vladimir King +Erik Plouffe +Ibrahima Csima +Lena Bithell +Bohdan Kostelecky +Dorian Sankuru +Vladimir Frayer +Ana Pavia +Tanyaporn Mohamed +Yifang Jang +Ka Ma +Zsofia Wang +John Keefe +Jirina Hojka +Daria Schmid +Jurgen Arndt +Jermaine Qin +Thomas Peralta +Iveta Blagojevic +Carlos Liu +Marcel Sigurdsson +Henk Schorn +David Jr +Megan Raymond +Katerina Saenz +Pascal Leroy +Eric Lemaitre +Marion Reynolds +Gauthier Bindrich +Vignir Charter +Shaune Milevicius +Jennifer Marco +Spas Traore +Asumi Colo +Sena Pietrus +Guzel Kahlefeldt +Mostafa Kleen +Sam Tian +Eva Mocsai +Igor Turner +Marta Pyatachenko +Andrew Wang +Ole Suhr +Monika Hwang +Jaime Ramadan +Sinta Denisov +Etenesh Liptak +Jamaladdin Dalby +Adrian Melzer +Akzhurek Whitty +Ivan Hollstein +Dominique Hall +Marcello Mendoza +Jens Lavrentyev +Kerron Bracciali +Olga Jankovic +Konstadinos Sauer +Simon Matsuda +Brittany Brzozowicz +Matteo Verschuren +Anthony Gerrand +Roline Rolin +Giovanni Kovacevic +Jorge Apithy +Suzana Teutenberg +Francielle Ziolkowski +Shinichi Hahn +Soulmaz Zolnerovics +Christos Jo +Layne Halsall +Gabor Palies +Janis Hansen +Grace Williams +Toshiyuki Nyasango +Marc Clair +Mohamed Kazakevic +Jonathan Glanc +Ahmed Sorokina +Zamandosi Chuang +Tiago Gillow +Sandra Kaukenas +Natalya Prorok +Matt Waite +Stanislav Krug +Jimmy Akizu +Jason Hostetler +Sam Scott-Arruda +Mark Arrighetti +Kristine Lynsha +Murray Nurudinov +Jessica Manker +Renata Rasic +Sergey Abalo +Aleksandr Kim +Xiaodong Dulko +Thais Pereira +Elena Costa +Peter Jang +Haibing Salvatori +Maria Kirkham +Jiaxing Bespalova +Ivo Bagdonas +Emmanuel Montoya +Artem Sanchez +Donatien Otoshi +Chia Bleasdale +Josefin Lamdassem +Wenwen Samilidis +Yunwen Crous +Lance Maksimovic +Aleksandar Abian +Nanthana Chen +Maryna Le +Iosif Wang +Dalibor Vidal +Josefin Crawshay +Linus Cha +Nyam-Ochir Yauhleuskaya +Hassan Nichols +Almensh Tuara +Mona Taibi +Hristo Avan +Branden Cavela +Imke Bosetti +Anastasia Gal +Tugba Brecciaroli +Oiana Mirnyi +Simon Zordo +Roderick Huang +Kerron Saedeleer +Kevin Dawidowicz +Laurence Intanon +Xiaojun Lee +Iurii Parker +Paolo Sirikaew +Kunzang Kim +Boglarka Vacenovska +Todd Istomin +Arlene Ketin +Hope Cseh +Szabolcs Culley +Sebastian Iwabuchi +Alexander Mccabe +El-Sayed Prodius +Andreas Soares +Norma Aanholt +Kenenisa Tomasevic +Shara Burgrova +Tsvetana Rogers +Zac Ashwood +Ruggero Dong +Martin Vanegas +Nguyen Barshim +Oleh Chinnawong +Melanie Disney-May +Urska Anacharsis +Rene Antosova +Bruno Tomas +Matthew Chakhnashvili +Feiyi Zavadsky +Sergej Ayalew +Jordan Ndoumbe +Bruno Oliver +Amina Pesce +Keith Pavoni +Xin Cuddihy +Mirco Pavoni +Athina Kula +Georgii Scheibl +Laurence Zyabkina +Laura Assefa +Glenn Liivamagi +Shalane Shiratori +Evi Junkrajang +Roberto Tsakonas +Lihua Ivanova +Mannad Khitraya +Carl Nielsen +Julia Kaniskina +Aksana Melian +Ligia Tancock +Yang Yin +Samira Grubisic +Jennifer Johnson +Stacey Frolov +Natalia Sombroek +Hayley Fischer +Ubaldina Ziegler +Aleksei Rouwendaal +Kenny Faminou +Ida Deak-Bardos +Martin Murray +Allan Liu +Bertrand Nakamoto +Narumi Hoketsu +Seen Flores +Joshua Capkova +Silvia Chaika +Marit Mickle +Jessica Basalaj +Ning Chen +Marta Marjanac +Hannah Jumah +Andrey Kim +Neymar Kaczor +Troy Garrigues +Bebey Rodaki +Fredy Ezzine +Mary Tomashova +Charles Zwarycz +Niklas Capelli +Luigi Marshall +Ibrahima Louw +Alessio Ariza +Kate Bourihane +Tiffany Zeid +Rodrigo Santos +Nedzad Braithwaite +Btissam Brunstrom +Olivia Gascon +Matthew Dalby +Clara Jeong +Thiago Gu +Abdelaziz Durant +Ebrahim Maeyens +Ekaterina Perera +Esref Moiseev +Kristi Melo +Aron Pilhofer +Nicole Shumak +Gemma Gaiduchik +Sibusiso Yudin +Darryl Strebel +Yang Fraser +Nguyen Calderon +The Pinguin +Iain Hartig +Johannes Willis +Jessica Fukumoto +Annari Simmonds +Maryna Desprat +Huajun Kerber +Barry Utanga +Pui Na +Vitali Oliver +Rosie Golas +Gilles Jang +Jun Podlesnyy +Christa Kvitova +Jonathan Gudmundsson +Pietro Walker +Xin Reis +Pops Terlecki +Xia Lansink +Goldie Marais +Savva Ford +Yahima Menkov +El Toth +Marlene Nicholson +Oleksiy Ferrer +Craig Csima +Ning Knowles +Jur Gebremeskel +Amy Zaiser +Maria Emmons +Nicola Socko +Dongho Jensen +Piotr Rabente +Victor Kondo +Jerome Amoros +Martin Amb +Dilshod Duong +Aleksandr Calder +Iryna Radovic +Marina Neuenschwander +Karolina Brennauer +Prisilla Nakamura +Alyssa Geikie +Geraint Traore +George Gogoladze +Pavlos Castro +Magdalena Kondratyeva +Gemma Milburn +Amanda Kalnins +Raul Baumrtova +Lijie Fowles +Benjamin Bussaglia +Daria Fouhy +Jeremiah Dean +Sofya Mortelette +Eric Sawa +Herve Kasa +Shane Wu +Vladimir Benedetti +Richard Hybois +Kristina Sireau +Adrian Lidberg +Alexis Mallet +Kurt Tran-Swensen +Leyla Szabo +Joao Dovgodko +Antoinette Silva +Risto Bertrand +Jens Seierskilde +Suwaibou Klemencic +Susana Neymour +Tinne Campriani +Rasul Tichelt +George Terpstra +Petra Sakai +Mi-Gyong Chen +George Liu +Andile Li +Vera Frangilli +Anfisa Whalan +Andrea Reilly +Patrik Brown +Kien Mottram +Stephanie Adlington +Eve Pessoa +Mandy Hinestroza +Silke Gallopin +Shugen Elkhedr +Joel Kammerichs +Riki Solomon +Hanna-Maria Bluman +Lisa Kamaruddin +Ahmed Gordon +Wing McMillan +Janelle Ovchinnikovs +Lene Zargari +Peter Wagner +Jan Sandig +Sergey Dahlberg +Kathleen Schmidt +Paulo Seric +Bryan Razarenova +Illse Mylonakis +Simona Skornyakov +Muller Nikcevic +Tino Henze +Mona Colupaev +Yi Daba +Michael Sjostrand +Anna Hosking +Alexey Gille +Henk Mrvaljevic +Sa-Nee Saldarriaga +Jakub Gondos +Kelly Drexler +Steven Stevens +Lina Hassine +Dorothy Abdvali +Carlos Hall +Ryan Welte +Christophe Tanii +Jens Tuimalealiifano +Hamza Tomecek +Maria Figlioli +Apostolos Sharp +Ondrej Houssaye +Diletta Sukochev +Sonia Williams +Lars Sobirov +Emma Chadid +Nanne Maree +Gil Warfe +Mike Bostock +Sinead McHale +Lindsay Savard +Vardan Romeu +Attila Tafatatha +Marina Kim +Daigoro Johansson +Kyung Steffensen +Lena Gasimov +Jinhui Brens +Danyal Achara +Esteban Storck +Igor Kasa +Jolanta Vives +Juliane Kim +Emma Wei +Hilder Zairov +Fateh Kovalev +Reinaldo Mutlu +Georgios Antal +Suhrob Jacob +Miho Franco +Sarah Ogimi +Vladimir Desravine +Alexander Lohvynenko +Tapio Gorman +Juan Lacrabere +Reika Moretti +Hossam Franek +Gerald Afroudakis +Anna Martinez +Wenling Aguiar +Ashley Kukors +Kellie Leon +Ivana Lee +Grega Horton +Nedzad Crisp +Paul Casey +Jamila Rodhe +Rebecca Orlova +Fabiana Kasyanov +Niclas Tymoshchenko +Jere Guidea +Sajjad Ulrich +Bebey Adamski +Lee Farris +Tamara Cafaro +Ravil Ismail +Nataliya Gherman +Olga Kasza +Yoshimi Szucs +Gabrio Dowabobo +Shane Gemmell +Olga Varnish +Teerawat Gueye +Yusuf Riner +Diguan Muff +Bianca Sekyrova +Elena Modenesi +Jan Garcia +Pedro Egelstaff +Valentino Ferguson-McKenzie +Gonzalo Gough +Matyas Lopez +Traian Chen +Cesar Chen +Fanny Castillo +Heiki Outteridge +Katarzyna Calabrese +Christopher Wilson +Anderson Schenk +Justine Ferrari +Takayuki Dundar +Ade Oconnor +Norbert Prokopenko +Tyler Payet +Margarita Ariza +Adam Yumira +Abdalaati Rodriguez +Asgeir Lamble +Nathalie Ionescu +Chantae Matuhin +Francesca Rowbotham +Gareth Culley +Andrei Masna +Michael Yamamoto +Tetsuya Cabrera +Alan Cerches +Roland Scott +Inaki Milanovic-Litre +Didier Munoz +Agnieszka Knittel +Maureen Makanza +Laura Wu +Daniel Silva +Lauren Subotic +James Seferovic +Tanoh Mehari +Daniela Gavnholt +Sviatlana Kable +Kumi Lewis-Francis +Deokhyeon Khinchegashvili +Mohammad Goderie +Francisco Lips +Johnno Listopadova +Patricia Bauer +Matthew Toth +Carmelita Zahmi +Yana Takatani +Kylie Ignaczak +Peter Malloy +Wesley Meftah +Chui Jacobsen +Luigi Luca +Chris Keller +Josefa Zambrano +Jiawei Crisp +Manuel Silva +Nikolaus Milatz +Gesa Su +Daniela Rajabi +Ju Isner +Malek Tomicevic +Ligia Jefferies +Romain Haig +Thomas Aly +Ed Papamihail +Younghui Karasek +Jordis Botia +Christen Gonzalez +Benjamin Kempas +Krystian Pen +Mikaela Iwao +Tsilavina Wozniacki +Kim Milczarek +Tatyana Flognman +Mervyn Mcmahon +Vanesa Hitchon +Zane Cane +Caroline Warlow +Byungchul Bouqantar +Toea Robert-Michon +Aksana Zhang +Paula Botia +Tina Boidin +Keith Beresnyeva +Teerawat Iersel +Andres Deng +Kenneth Howden +Martino Wallace +Yura Motsalin +Tim Han +Jaqueline Shcherbatsevich +Lee-Ann Song +Rebecca Teply +Shuai Huang +Thomas Frolov +Vlado Gu +Amy Kim +Mehdi Li +Maksim Muttai +Carolina Macias +Ferdinand Clair +Kelita Webster +Patrick Navarro +Sebastian Berdych +Atthaphon Starovic +Roberto Miller +Shinta Gong +Isabelle Grigorjeva +Carlos Yakimenko +Pavlo Stewart +Elyes Viteckova +Olga Schofield +Mie Hall +Nenad Blerk +Linyin Manojlovic +Annette Ouechtati +Yu Chinnawong +Candace Nagga +Lina Al-Jumaili +Adam Costa +Casey Mccabe +Mechiel Schulz +Yunlei Xu +Pajtim Nesterenko +Alberto Vidal +Euan Gunnarsson +Matthias Mendes +Marius-Vasile Biezen +Deron Estanguet +Simone Fesikov +Tarek Luis +Maynor Lemos +Borja Rodriguez +Ons Buljubasic +Caroline Ghislain +Kimberley Colhado +Maksim Culley +Khadzhimurat Wilkinson +Shane Dodig +Joseph Nolan +Jitka Mottram +Vanessa Figes +Esthera Koschischek +Jessica O'Connor +Tsimafei Helebrandt +Angel Souza +Sehryne Akrout +Kazuki Leroy +Courtney Bischof +Phillipp Absalon +Dakota Ulrich +Adelinde Mangold +Maria Smith +Tomasz Lanzone +Jana Rendon +Rodrigo Surgeloose +Yura Straume +Aretha Hatton +Ellie Danilyuk-Nevmerzhytskaya +Alistair Baccaille +Timm Augustyn +Davit Nibali +Gulnara Deeva +James Meszaros +Luigi Sofyan +Julia Dovgodko +Nikolina Otoshi +Viktor Santos +Nourhan Benfeito +Crisanto Saikawa +Taehee Bondaruk +Murat Huertas +Emmanuel Hornsey +Khairul Steffen +Eric Silva +Anna Savinova +Liubov Johansson +Andrew Guilheiro +Dipna Hammon +Augustin Lozano +Ilka Macias +Michal Bazlen +Niclas Calzada +Jongwoo Bognar +Dora Veljkovic +Ilona Harrison +Shara Gomez +Jessica Schwizer +Alex Kim +Nikolina Khuraskina +Yakhouba Garcia +Viktoriya Aguirregaray +Job Maestri +Natalie Barbosa +Mohanad Raudaschl +Akvile Saedeleer +Esref Pikkarainen +Judith Williams +Moritz Muller +Pal Amorim +Richard Kaniskina +Austra Bauza +Jane Hornsey +Gia Mogawane +Malek Greeff +Judith Zhu +Mario Husseiny +Carrie Spellerberg +Seen Dehesa +Sverre Dawkins +Raphaelle Batum +Jefferson He +Joseph Bartley +Ryosuke Ciglar +Carles Solesbury +Fabio Morkov +Mourad Nimke +Norayr Toth +Schillonie Benaissa +Vita Eckhardt +Stanislau Dmytrenko +Teresa Kim +Gloria Dean +Rosie Tempier +Denis McIntosh +Roline Camilo +Dion Pavlov +Viktor Rangelova +Andre Shimamoto +Jose Pedersen +Cy Malzahn +Sergiy Markt +Song-Chol Kim +Cesar Qin +Niki Grangeon +Hannah Gherman +Claudia Kavanagh +Carl Roux +Konstadinos Troicki +Tontowi Benedetti +Yutong Olaru +Dragan Murphy +Simone Morin +Docus Muff +Damian Baki +Geoffrey Plotyczer +le Toksoy +Iuliia Oatley +Yauheni Sokolowska +Alison Hayytbaeva +Sven Vandenbergh +Jillian Lalova +Elizabeth Batki +Nicholas Bithell +Oscar Bultheel +Kasper You +Aman Schulte +Robin Padilla +Alexander Filipovic +Spyridon Zhou +Al Shaw +Yasunari Jokovic +Paula Zhudina +Aida Ganiel +Max Lee +Georgina Manojlovic +Rayan Titenis +Allan Melgaard +Aldo Nicolas +Madias Jeffery +Jenny Flognman +Jin Pontifex +Dirk Steuer +Julian Hjelmer +Gyujin Nikolaev +Olga Mekic +Ieuan Zbogar +Dane Montelli +Markiyan Monteiro +Pablo Pereyra +Angelo Uhl +Natalia Kitamoto +Pierre-Alexis Steinegger +Luke Mamedova +Jan Ryakhov +Luca Kipyegon +Gretta Tang +Risa Synoradzka +Mariko Hidalgo +Emmanuel Willis +Giorgia Kleinert +Maneepong Lin +Fabiana Boussoughou +Rubie Sukhorukov +Mitch Trafton +Lucy Nakaya +Sergey Lee +Kum Musil +Manuel Davis +Klaas Wykes +Maoxing Bedik +Blazenko Ostling +Shao Watt +Esther Robinson +Jinzhe Trinquier +Simon Franco +Wendie Spearmon +Matteo Goncharova +Tatiana Naby +William Vicaut +Peter Sloma +Pietro Warfe +Elisabeth Santos +Shane Lima +Agnes Vasina +Michal Rochus +Guido Kanerva +Zachary Schelin +Ekaterina Thibus +Hugues Kim +Sarah Kozlov +Alexander Jiang +Adam Moreno +Valentyna Townsend +Huajun Oates +Hedvig Crain +Kara Vougiouka +Arnaldo Abella +Maroi Tatham +Anastasiya Jebbour +Julien Buchanan +Irina Camara +Igor Martin +Jens Biadulin +Thiago Rosso +Jemma Mayr +Raghd Ikehata +Georgina Issanova +Errol Benes +Eun Honrubia +Ardo Mastyanina +Edwige Henderson +Virginie Zhang +Vincenzo Moolman +Jos Oliva +Maksym Castillo +Shijia Conway +Sanja Kusuro +Vasilij Blouin +Chia England +Joel Scanlan +Peng Masai +Magalie Allen +Astrid Kusznierewicz +Lulu Maguire +Yoann Gentry +Nataliya Lippok +Kathleen Jo +Lara Siegelaar +Silvia Wambach +Yana Elmslie +Alise Bellaarouss +Tim Csonka +Antonija Dilmukhamedov +Lyudmyla Dilmukhamedov +Desiree Khachatryan +Stijn Choi +Hagos Hassler +Gal Pascual +Hector Moutoussamy +Connor Touzaint +Alejandro Velasquez +Ekaterina Hernandez +Craig Galvez +Aleksejs Collins +Konstadinos Houghton +Vladislav Sivkova +Srdjan Stein +Tina Teutenberg +Kirsten Wang +Marcin Desta +Madeleine Mitchell +Mirna Seck +Alexey Guloien +Azad Honeybone +Clarissa Skydan +Erina Cabrera +Vincent Lawrence +Nadezda Plouffe +Ji Stewart +Denis Rezola +Jun Szczepanski +Taufik Toksoy +Daniel Worthington +Gia Yoon +Asgeir Dzerkal +Zengyu Driel +Charles Wang +Abby Cooper +Louisa Tomas +Mariusz Yang +Ediz Gorlero +Woojin Nazaryan +Christina Vesela +Alan Mestres +Danilo Chabbey +Sultana Angelov +Ancuta Emmons +Fetra Shemarov +Jean Andrunache +Jack Garcia +Niki Batkovic +Sin Cambage +Vincent Girke +Rebecca Simon +Westley Tatalashvili +Francine Beaudry +Sofiane Satch +Jessie Vlahos +Saheed Durkovic +Lankantien Kristensen +Aya Rakoczy +James Aniello +Yawei Fourie +Damian Kim +Pawel Jensen +Citra Comba +Vasyl Geijer +Mihail Flanigan +Dino Aicardi +Petr Smith +Dmitriy Bartman +Zara Jung +Sara Jeong +Rudi Noga +Rauli Schlanger +Tyler Belmadani +Dorothy Rossi +Evi Fang +Kim Estrada +Nathan Nishikori +Daniel Verdasco +Dorian Taylor +Alice Liu +Katerine Podlesnyy +Vincenzo Kermani +Blair Wei +Patricia Guo +Torben Jaskolka +Michal Chatzitheodorou +Andrew Negrean +Zhiwen Wu +Emily Chow +Viktor Steffens +Enzo Balciunas +Katharina Mizuochi +Jiawei Koedooder +Amy Mizzau +Marcin Guderzo +Fortunato Asgari +Louisa Bassaw +Silviya Saholinirina +Shota Michta +Haley Deetlefs +Bill Turner +Brian Boyer +Timea Nus +Radoslaw Sze +Elodie Arcioni +Jonathan Cornelius +Yun Milevicius +Nicolas Dotto +Matthew Helgesson +Edith Sofyan +Riccardo Cheng +Soslan Fernandez +Amanda Ndlovu +Leryn Henao +Elisabeth Wukie +Sabrina Burns +Rachelle Roleder +Laura Neben +Eric Rolin +Kelly Kulish +Huizi Accambray +Milena Hall +Jong de +Michael Houvenaghel +Samir Panguana +Christina Maneephan +Alberto Gryn +Roland Deak-Bardos +Louise Mrisho +Njisane Arkhipova +Line Emanuel +Yohan Miljanic +Won Davison +Alexa Loch +Milos Blazhevski +Jana Yudin +Jackelina Gadisov +Trixi Niwa +Pedro Harper +Zi Stanning +Matti Othman +Xavier Cox +Jinzhe Aubameyang +Jonelle Ayim +Lankantien Parker +Rasmus Honeybone +Adnane Srebotnik +Adam Hatsko +Josephine Caleyron +Lizzie Sheiko +Aleksandrs Castellani +Luis Gascon +Byron Lezak +Dragana Yonemoto +Mark Skudina +Kasper Addy +Aniko Ahmed +Nilson Belmadani +Sergey Leiva +Jianfei Erokhin +Simon Stepanyuk +Tomasz Gkountoulas +Aleksandar Sandell +Hotaru Terceira +Joshua Fenclova +Yang Conti +Stsiapan Kaun +Karim Kuczynski +Kurt Sano +Beatriz Smock +Sabina Williams +Hyo Ponsot +Sergey Britton +Mateusz Yi +Diego Connor +Ruslan Filho +Aleksandar Fasungova +Claudine Baltacha +Andja Gabriele +Marcus O'leary +Wael Li +Tatyana Bernado +Xiaojun Hachlaf +Ranohon Montano +Simone Brathwaite +Svetlana Janoyan +Tina Ortiz +Ivana Grubisic +Christina Illarramendi +Gabriel Langridge +Mclain Rakoczy +Ferenc Aydarski +Gauthier Alimzhanov +Reza Hoff +Artur Darien +Reid Demanov +Sergio Modos +Mizuho Suetsuna +Marcin Cash +Nicola Saranovic +Maria Yim +Salima Nakano +Annika Wang +Sviatlana Zucchetti +Christopher Stafford +Xiang Wukie +Mohammad Li +Bernardo Thompson diff --git a/tests/sh/teacher/mystery3/streets/Buckingham_Place b/tests/sh/teacher/mystery3/streets/Buckingham_Place new file mode 100644 index 00000000..0dc571cc --- /dev/null +++ b/tests/sh/teacher/mystery3/streets/Buckingham_Place @@ -0,0 +1,300 @@ +one earthlings startles invitingly pall +headwaiter mate impregnability +unmake drainpipe utilities pointillist +apropos impressively forborne finite exempt +griming vised thankfully burlap hypertension +landsliding landfill furlong mittens heartland +bully tortoise enlargers roamed undressing +yuks troubleshooting seaboards +springtime deaves reinitialize puttying +densities warranties penultimates dehumanizes perorations +untangles stays smashing spinets breadfruits +granulating toreadors finishes knob headhunter +longhairs pennyweights womanizers +depressive overused disturbs glandular pillowed +fallibly proportioning settling jumpier +vagueness lethal alienating potted +immortalizing parfaits ignited malnutrition +feisty senseless manly fifths tailspin supposed downstairs +ringer drainers agiler pinholes reedier +meekest revolvers gobblers panelists unassigned yew butterfly +nuts singsonged writs arm dimness +bearing shags kleptomania sprinted barkers +augury bullied letups shimming filmy golds +thunders forbid snowflake unstabler moralist +torrential attributable poniards newsletter stealthier +breastplates bundled nationalization +invaliding fitfully figured keystones +misdoing unplugged newspapermen grandstand +shrouding pushed botanists pivots domed +mealier formerly trivet avenues flukey humorously +twofold sniffling misdoes intros bookmarked +subordinated amateur ambition tarpons fluttery +gassier soldiering irritant wavelengths wriggling +tarots gruesomely pair minks enrapture +stupefy dukedoms emanating manikin enshrines +freaky meditated paginating suddenly farewells presentations +darted sizes tartly meddlers startled +strong love thumbnail aquifer samurai +parleys mobilizing repertoires sanitarium punts +entwining inkier exterminate remission purblind +inflammations resist impedes lighthouses allegro +additions pantomiming wrongdoing natives elusive opals +finagles assaying raving primmest libel repairable +gallbladders dismissed girders waxworks tenderly feasibly +temporaries peephole whams faultfinding metabolizing +floor huddles refinish flattering swamped +levied whets undersign bestiary +auras kite presumes toasty pair loping revelled teas abnormally +reality polarized preferably nominated +pawnshops bootie pealed violist haulers haled +palmettoes waste spot soggier annulled +steak shrews gunshots foregone kneel +inlets bran maraud salts hemmed +poniard mangled dither humblest demitasses proprietary +augury telemetry starlit landlubbers +portrayed battleships orderliness salver forming grits +alleyways disowning blogged argosies +supervisor adored unequalled dangle nonreturnables +sixteens defaulted bandoliers turtledove +gearwheels junks endlessly wear internship timidly maxim +waver windbreaker sunken disguising importations +shoots smoggiest lifestyles journeymen +reffed raft futzing dagger surrealism +unsupervised disrepute ingeniously annul divining +expressing rib snorted hexagons sway sharing neurosurgery +frazzled leaving aqueous stigma punning psalmists +desirous devaluation pudding alight squealed +marital unsubstantial peasant drying bee agglomerates +hansom methought adapts muezzins relish +eastward maydays gondola burger abstains predetermined gated +ornithology unarmed godfather roomer penises primitives +slumber ether mender edgy underhanded ablest affirmatively +sex barbershops leotards bobolink hormonal sump +indubitable yardages felons unquestionably versifies infinitesimals +aliasing inhibiting originally synthesizes +perjuries goblet pasta moves farrow urged dotes fluffs +liberals indentation horns erosion harrow snowstorm emulator +pretending expiation imperialist overdresses +bookmakers analogues dittoed effigy thunderheads +employee wafer pessimist alleyway envisages +orderings bedbug employ muskmelon benumb +shards ominous bawl worryings refills animators soften +merrier vanadium provides medleys obstinately summoner +fold swoons grievously dismantles +unbroken hothead jessamine yolk loath rake +bludgeoned inflationary dowdy fingers saunter +great diminutive puffiness bankbooks +insolvent more balms millions mommy river sullenest +intertwines obeisant gallon blame tub seeking firsts +lingered populates naughty galvanizes postulated +frailest shin wrestle faking goddamed allergist minute lobotomies +thrower industriously idolized unabashed understudied +shaking refereed mullet harmfulness hasp +tubeless irretrievable transits underwrites drainage +renegaded bilk gearbox expertise away beating +rapt preventative freedman trouts insulted peopling pales +earnest blabbing prohibitionist deserts runway +patents idiot marvel deadens shad sluggers essay talkative +sneer lows sidled sparingly ink geranium lighthearted +boudoirs merry juniper while liquifies phobias goad peanuts +hesitating inverse nighttime +loosely impish threaded formlessness signet +knotted pursues sightseer history software +admonishment underskirt speedway deviate fags +sandblasting plodding faggots grungy eventuality +workmen extemporaneous espouses straitening laxatives +harangue summing binderies membership +huskies sidesaddles restoration tawdriest gazillions +liven delimit jibe profited butterfly faithful +iodize wheezier ministration hotbed rehabbing nuzzle +esquire swallows smelly grounder shimmering sharpers hexed +legionnaires workdays rinds personality +governor floury earrings overusing +winsomer falsity paradigm rows wiry alas worship +spears goaded took despaired betrothal mink doled penetrative +ingot tasting uprights barks sottish troubleshooter +persevere ping deafening kisser innovators +gaudier noiselessly glamorously quasar beeping yesterdays +spinal klutzes yeastier initializing +foetuses brews blunderbuss emitting +hillier streak opines retirement straightedges nontransferable +mending envisions gizmos drags finnier wildest +adder malingerers euphony antiphonal departs spitfires +hypes dye illuminations disablement +sender waned bottomless saintlier lades plethora +shenanigan larynges penguin heatstroke +steins exiles underestimating guts billet flabbergasting +sieges flawlessly serialized kippers +enfeeble weathered bedridden liquidations +flints winners unfairest damaged +partnered pilaws hogs pluming avenge +tanker forwent sag pheromone snowdrifts syphons +mimes mountaineers exalted disfigure shelves nimble +flusters derivable potato establishment +regimen betterment sarape misused balladeer pilling +besiegers whitens dinky stupid +kettle borax partnering preppiest +fisherman dappling mustier fobs figuratively orthopaedists +jumpiest tundra hybridizing +inexhaustibly thrower metaphors intones slanted +insinuated garrison prettifying attests +stemming shrewdness prigs workweek feebleness abiding distrust +sternest rowel debater peas adversely enshrouds +premiss nowhere billion gatherings fetid traded +misappropriation donations printers +dethronement holler spurned divisors +reverts plaza obsequiously permutation +grandpas tyrants metastases personae hauler eyelash +outrage shelters soured surlier metronome moonlighted +mailmen maneuverable mattered seeding dehumanizes +spiniest dents weightless kookaburras misprinted disorders +intermediary selling jersey polymaths empathizing +doubling peaked owlish byline levitates suspense relabels +autumns wiping dhotis damming twentieth proportion +potentate bribes rifer moderate verbena desire framing +twaddle polite pretext mazourka situated +bilking darling tempera stresses earmarking +breezes fretted exhumed fertile +vineyards gingerbread ridgepoles helixes +deal heppest malignantly tallest ebony +flexible espressos prioresses linoleum deposed tourism +sophomore filtering prostitute wasps +parboiling sine rain unprofessional +surrey mudslide brilliants planing derail wilder +environmentally professor frenzies trolled +watermelons garrisoning imprisonments typified +busied besetting founders flurried state trill +hyphened flashiest advertise byline patrons fighter goldsmith +sightread teazles footfall washbasin molesting +grainiest lobbing shrouded largest jump geometries +eluded sophism stages pertly sewerage biplanes maturer travelogs +fords plaque droned spars misleading sunburn +serenely shits dialyses roistering registrars pointillists +bales napes warts mammary referrals fisherman training +panting battalion greedier allergens orotund +headers badge bullhorn agglutinating bearable +analogs departing anguished nylons +whitewall napkins overheats embittering grimmer beamed +SEE INTERVIEW #699607 +festoon dispenser kidder odysseys spoons buttonholing +arguably manse lessened logging pasts +holler burg spotlight quadrupeds glitzy froths harmony +bashfully blotter bushy prettifies +invent baseness heave flunking temerity +noose harms grebe attributively ruling +swat reissues founts envy gingko nuzzled albums +pippins deathblows hounds voodoo buffed +politer volunteers overtaxed quoted bakery +mute jasmine imbues pejorative implementing +flooded immortal rebuking enthralling +value bebops brasses mono toileting +kindle ghostwriter moodier original abridging +palliation fumbler elapsing marauders honorariums +invaluable sauntering spuriously phalanx marry plights +blameworthy bandages gentlemen playboys rosebuds +norms masterminding milkier demoralization leaven disallowing +supersedes ambivalent dearness organizational +sinks resemble noisiest peppy feedbag +wrapper grotesquely importunity retrograded struggle deviling +stymie gangrene rapine nevermore digested whirling +freshets adverbial addles amalgamating forest informants +motorboats sadism drouths swaggering foursquare ermine +paperweight pub pitied yearning reeving +polish penes tortoises immaturity trellis timetabling +horsehide putting raved meditate inertia thoughtfulness +savaged saviours disburses tonsil +bind ruffle mausolea enjoined whiskeys dozen tomato shortsightedness +hampering artworks jehad manifested +buffing peeking dart roils omission trumpery +kippered fruited snuffled unmitigated mansards spies +dumpster relate meadow hands boardwalk kites +takeaways goatskins detail ogre spurs +ruminant piggish fiesta remodel +nonstop suggester mess wheedles denied enjoyed +dishtowel ponytail spotlessly barman +blindest arraignments showroom provably +manful mandrills gangplanks glandular +manganese futurities suffragette +metamorphosis bounders leeriest hyperventilated waterfall +pitiable tarragons interring drawl +emotional reexamined revelries slipperier forwarding potentates +outliving suspending stippled hesitates rosary aliased +expatriated delivered quintuplets +razors assortment sparser yews +relabeled snoop resales hornier berets squeezers +jinn guttered untreated vegetarian waterspouts +broadest ashes piquant oftenest nether sheering surrounded +stewarding tanner foghorn repasts orders +weer badmouths rape lug utter donkey +gybing veered rely metering harmfulness bombshells +peeps regressing pasture skywriter +proportional trio gelled shivery inferiority +leaflets pilgrims guileful inflates playfully tarpaulins +ugh pompons simulate numbers martyr introverts aerie urgent +stage powering ermine enquire merrier stalker +undoubted urban illumined flotillas downtrodden gelatine +abbreviated skiers grumpy attesting gals roil +synthesizer tared dungarees headlights pluralities module +preponderating skylarks lawyer swordsmen stupefying motliest +upstream garnered sprightlier explodes intervenes drawings +antitrust brandies railroads toenails inveighs +laded gives quibbler nonplused parliament meadowlarks +dandled snafu angiosperm hamburgers adverser snowfall +dogmatism jousts bullshits esquires observable +request tended reported rhapsody grandstands +fantasied wonderlands mutually tiptoeing misdeeds +endue liquidation tinging redistributing +studied predisposes gauges agenda airfoils +himself reformation twenty types rotundness file blearier +jokers sharpest hookahs zinged shutting bestowing +linkage brothel faggots lisp runway relation harboring +plurality gazette lively impostures youngest +refunds supported headroom trekked outtakes interrogation +fashionable inhibits trumpeting pizazz +semimonthly shuddering signer roughshod +epitaphs stales dipper debarment wader +marinades flashily dispossessed +segmenting examine appoints granddads molt four monorails +gibe aspirating vulgarities fetishes lenses +extroversion vibrantly lubbers kiss haw +exult enslavement mutuality maturities ousted +arson hogwash tush bouquets donor disrupting landsliding +furtively rhapsodies inky laddered wringing rosebud +limpid hobos shimmering relying +likewise inquests kid pinnate insignias journeys +greyed hewing surtaxing hydrology transfigures horded +suborned whirlpools hobnails aligning agent logotype +hatefully homeopathy riskiest ilk flagpoles burglarizes +sundown delphinium normalized +amnesties trellising rolled misrepresentations +avast hankerings abominates sloughing +heartrending bullish removers fraternity dignified +mettlesome prowlers beautiful manager lollygagged +suburbs donut gunrunner supports denotes seraphim polyunsaturated +origination longevity snowballing foretasted sunlight obliteration +slipping tranquillizers perfumeries +disaster titled mitigated inseminates populating +thirsty burros disproved damned validate +hookworms what magpies weeknight lolls mixing +dragooning stipple gangway leafletted +possibles downfall inspire lobbies +substituted nightshirts delimiters hereof ulna benumb +hilltops beeped apologizes ties skewed fate +needles weekending provisioning emended transfusion +rifer pipers dogfish strafed stereotyped +junked wooer vaulters sodium dynamism +looting goodbys tweets uniquer bibulous lodestone +hospital gnarl fathomless barrings implies manners tunneled +debasement loathsomeness tabued wraith +shout shed telepathy reparations filthy brandish +instrumentalists fatally tattooists anonymity biography +prostrate refill dreads belaying +riposted adaptive bawling applauding mushes toileted sleazy +juggernauts leis downstream dismounts propriety hit +rite boogies argument shampooed semitone dork +voluntary ravages draftier purports +disproves uphold randomized flexes reassures snoopiest +quadruple hampers assureds blindsides blab pay woodmen motivations +daydreams jalopy remarking engraves +quasars delineate blanket unstudied hoax skiff diff --git a/tests/sh/teacher/mystery3/vehicles b/tests/sh/teacher/mystery3/vehicles new file mode 100644 index 00000000..cdfd17f6 --- /dev/null +++ b/tests/sh/teacher/mystery3/vehicles @@ -0,0 +1,31 @@ +*************** +Vehicle and owner information from the Terminal City Department of Motor Vehicles +*************** + +License Plate L337QE9 +Make: Honda +Color: Blue +Owner: Erika Owens +Height: 6'5" +Weight: 220 lbs + +License Plate L337DV9 +Make: Honda +Color: Blue +Owner: Joe Germuska +Height: 6'2" +Weight: 164 lbs + +License Plate L3375A9 +Make: Honda +Color: Blue +Owner: Dartey Henv +Height: 6'1" +Weight: 204 lbs + +License Plate L337WR9 +Make: Honda +Color: Blue +Owner: Hellen Maher +Height: 6'2" +Weight: 130 lbs diff --git a/tests/sh/teacher_test.sh b/tests/sh/teacher_test.sh new file mode 100755 index 00000000..584ceda1 --- /dev/null +++ b/tests/sh/teacher_test.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +# Unofficial Bash Strict Mode +set -euo pipefail +IFS=' +' + +script_dirS=$(cd -P "$(dirname "$BASH_SOURCE")" &>/dev/null && pwd) + + +challenge() { + submitted=$(cd "$1" && "$script_dirS"/student/teacher.sh) + expected=$(cd "$1" && "$script_dirS"/solutions/teacher.sh) + + if ! diff -q <(echo "$submitted") <(echo "$expected") &>/dev/null; then + echo "??? What ?? Wrong answer, teacher. Did you really do the job previously? Or was is just an \"echo\" of luck??" + exit 1 + fi +} + +MAIN_SUSPECT="Harvey Dent" challenge teacher/mystery1 +MAIN_SUSPECT="The Joker" challenge teacher/mystery2 +MAIN_SUSPECT="The Pinguin" challenge teacher/mystery3 diff --git a/tests/sh/to-git-or-not-to-git_test.sh b/tests/sh/to-git-or-not-to-git_test.sh new file mode 100755 index 00000000..bc302ca1 --- /dev/null +++ b/tests/sh/to-git-or-not-to-git_test.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Unofficial Bash Strict Mode +set -euo pipefail +IFS=' +' + +submitted=$(./student/to-git-or-not-to-git.sh) +expected=$(./solutions/to-git-or-not-to-git.sh) + +diff <(echo "$submitted") <(echo "$expected") diff --git a/tests/sh/who-are-you_test.sh b/tests/sh/who-are-you_test.sh new file mode 100755 index 00000000..1082e088 --- /dev/null +++ b/tests/sh/who-are-you_test.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Unofficial Bash Strict Mode +set -euo pipefail +IFS=' +' + +submitted=$(./student/who-are-you.sh) +expected=$(./solutions/who-are-you.sh) + +diff <(echo "$submitted") <(echo "$expected")