trackler 2.0.8.15 → 2.0.8.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/common/exercises/clock/canonical-data.json +473 -425
- data/common/exercises/crypto-square/canonical-data.json +105 -95
- data/common/exercises/difference-of-squares/canonical-data.json +76 -62
- data/common/exercises/etl/canonical-data.json +67 -59
- data/common/exercises/meetup/canonical-data.json +859 -762
- data/common/exercises/meetup/description.md +13 -7
- data/common/exercises/minesweeper/canonical-data.json +21 -5
- data/common/exercises/nth-prime/canonical-data.json +23 -16
- data/common/exercises/nucleotide-count/canonical-data.json +49 -41
- data/common/exercises/ocr-numbers/canonical-data.json +204 -183
- data/common/exercises/pascals-triangle/canonical-data.json +38 -27
- data/common/exercises/queen-attack/canonical-data.json +125 -109
- data/common/exercises/rotational-cipher/canonical-data.json +1 -1
- data/common/exercises/triangle/canonical-data.json +103 -74
- data/lib/trackler/version.rb +1 -1
- data/tracks/csharp/docs/TESTS.md +7 -1
- data/tracks/csharp/exercises/{exercises.sln → Exercises.All.sln} +0 -0
- data/tracks/csharp/exercises/Exercises.Default.sln +1433 -0
- data/tracks/csharp/exercises/Exercises.Refactoring.sln +61 -0
- data/tracks/csharp/exercises/acronym/AcronymTest.cs +35 -11
- data/tracks/csharp/exercises/parallel-letter-frequency/ParallelLetterFrequencyTest.cs +2 -2
- data/tracks/delphi/docs/TESTS.md +2 -2
- data/tracks/elixir/exercises/bowling/bowling.exs +1 -1
- data/tracks/fsharp/docs/LEARNING.md +2 -1
- data/tracks/go/config.json +7 -1
- data/tracks/go/exercises/prime-factors/{primefactors_test.go → prime_factors_test.go} +4 -1
- data/tracks/go/exercises/protein-translation/protein_translation_test.go +6 -6
- data/tracks/go/exercises/pythagorean-triplet/example.go +2 -0
- data/tracks/go/exercises/pythagorean-triplet/pythagorean_triplet_test.go +8 -0
- data/tracks/julia/README.md +2 -0
- data/tracks/julia/config.json +9 -0
- data/tracks/julia/exercises/rotational-cipher/HINTS.md +21 -0
- data/tracks/julia/exercises/rotational-cipher/example.jl +16 -0
- data/tracks/julia/exercises/rotational-cipher/rotational-cipher.jl +0 -0
- data/tracks/julia/exercises/rotational-cipher/runtests.jl +51 -0
- data/tracks/ocaml/config.json +5 -0
- data/tracks/ocaml/exercises/connect/.merlin +3 -0
- data/tracks/ocaml/exercises/connect/Makefile +15 -0
- data/tracks/ocaml/exercises/connect/connect.mli +4 -0
- data/tracks/ocaml/exercises/connect/example.ml +80 -0
- data/tracks/ocaml/exercises/connect/test.ml +121 -0
- data/tracks/ocaml/tools/test-generator/templates/connect/template.ml +23 -0
- data/tracks/python/exercises/all-your-base/all_your_base_test.py +2 -0
- data/tracks/python/exercises/luhn/example.py +5 -8
- data/tracks/python/exercises/luhn/luhn_test.py +34 -24
- data/tracks/ruby/README.md +138 -23
- metadata +16 -4
@@ -1,97 +1,107 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
"
|
35
|
-
"
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
"
|
54
|
-
"
|
55
|
-
"
|
56
|
-
"
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
2
|
+
"exercise": "crypto-square",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"cases": [
|
5
|
+
{
|
6
|
+
"description": "the spaces and punctuation are removed from the English text and the message is downcased",
|
7
|
+
"cases": [
|
8
|
+
{
|
9
|
+
"description": "Lowercase",
|
10
|
+
"property": "normalizedPlaintext",
|
11
|
+
"plaintext": "Hello",
|
12
|
+
"expected": "hello"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"description": "Remove spaces",
|
16
|
+
"property": "normalizedPlaintext",
|
17
|
+
"plaintext": "Hi there",
|
18
|
+
"expected": "hithere"
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"description": "Remove punctuation",
|
22
|
+
"property": "normalizedPlaintext",
|
23
|
+
"plaintext": "@1, 2%, 3 Go!",
|
24
|
+
"expected": "123go"
|
25
|
+
}
|
26
|
+
]
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"description": "The plaintext should be organized in to a rectangle. The size of the rectangle (`r x c`) should be decided by the length of the message, such that `c >= r` and `c - r <= 1`, where `c` is the number of columns and `r` is the number of rows.",
|
30
|
+
"cases": [
|
31
|
+
{
|
32
|
+
"description": "empty plaintext results in an empty rectangle",
|
33
|
+
"property": "plaintextSegments",
|
34
|
+
"plaintext": "",
|
35
|
+
"expected": "[]"
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"description": "4 character plaintext results in an 2x2 rectangle",
|
39
|
+
"property": "plaintextSegments",
|
40
|
+
"plaintext": "Ab Cd",
|
41
|
+
"expected": [ "ab",
|
42
|
+
"cd" ]
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"description": "9 character plaintext results in an 3x3 rectangle",
|
46
|
+
"property": "plaintextSegments",
|
47
|
+
"plaintext": "This is fun!",
|
48
|
+
"expected": [ "thi",
|
49
|
+
"sis",
|
50
|
+
"fun" ]
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"description": "54 character plaintext results in an 8x7 rectangle",
|
54
|
+
"property": "plaintextSegments",
|
55
|
+
"plaintext": "If man was meant to stay on the ground, god would have given us roots.",
|
56
|
+
"expected": [ "ifmanwas",
|
57
|
+
"meanttos",
|
58
|
+
"tayonthe",
|
59
|
+
"groundgo",
|
60
|
+
"dwouldha",
|
61
|
+
"vegivenu",
|
62
|
+
"sroots" ]
|
63
|
+
}
|
64
|
+
]
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"description": "The coded message is obtained by reading down the columns going left to right.",
|
68
|
+
"cases": [
|
69
|
+
{
|
70
|
+
"description": "empty plaintext results in an empty encode",
|
71
|
+
"property": "encoded",
|
72
|
+
"plaintext": "",
|
73
|
+
"expected": ""
|
74
|
+
},
|
75
|
+
{
|
76
|
+
"description": "Non-empty plaintext results in the combined plaintext segments",
|
77
|
+
"property": "encoded",
|
78
|
+
"plaintext": "If man was meant to stay on the ground, god would have given us roots.",
|
79
|
+
"expected": "imtgdvsfearwermayoogoanouuiontnnlvtwttddesaohghnsseoau"
|
80
|
+
}
|
81
|
+
]
|
82
|
+
},
|
83
|
+
{
|
84
|
+
"description": "Output the encoded text in chunks. Phrases that fill perfect squares `(r X r)` should be output in `r`-length chunks separated by spaces. Imperfect squares will have `n` empty spaces. Those spaces should be distributed evenly across the last `n` rows.",
|
85
|
+
"cases": [
|
86
|
+
{
|
87
|
+
"description": "empty plaintext results in an empty ciphertext",
|
88
|
+
"property": "ciphertext",
|
89
|
+
"plaintext": "",
|
90
|
+
"expected": ""
|
91
|
+
},
|
92
|
+
{
|
93
|
+
"description": "9 character plaintext results in 3 chunks of 3 characters",
|
94
|
+
"property": "ciphertext",
|
95
|
+
"plaintext": "This is fun!",
|
96
|
+
"expected": "tsf hiu isn"
|
97
|
+
},
|
98
|
+
{
|
99
|
+
"description": "54 character plaintext results in 7 chunks, the last two padded with spaces",
|
100
|
+
"property": "ciphertext",
|
101
|
+
"plaintext": "If man was meant to stay on the ground, god would have given us roots.",
|
102
|
+
"expected": "imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau "
|
103
|
+
}
|
104
|
+
]
|
105
|
+
}
|
106
|
+
]
|
97
107
|
}
|
@@ -1,67 +1,81 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
2
|
+
"exercise": "difference-of-squares",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"cases": [
|
5
|
+
{
|
6
|
+
"description": "Square the sum of the numbers up to the given number",
|
7
|
+
"cases": [
|
8
|
+
{
|
9
|
+
"description": "square of sum 5",
|
10
|
+
"property": "squareOfSum",
|
11
|
+
"number": 5,
|
12
|
+
"expected": 225
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"description": "square of sum 10",
|
16
|
+
"property": "squareOfSum",
|
17
|
+
"number": 10,
|
18
|
+
"expected": 3025
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"description": "square of sum 100",
|
22
|
+
"property": "squareOfSum",
|
23
|
+
"number": 100,
|
24
|
+
"expected": 25502500
|
25
|
+
}
|
26
|
+
]
|
21
27
|
},
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
28
|
+
{
|
29
|
+
"description": "Sum the squares of the numbers up to the given number",
|
30
|
+
"cases": [
|
31
|
+
{
|
32
|
+
"description": "sum of squares 5",
|
33
|
+
"property": "sumOfSquares",
|
34
|
+
"number": 5,
|
35
|
+
"expected": 55
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"description": "sum of squares 10",
|
39
|
+
"property": "sumOfSquares",
|
40
|
+
"number": 10,
|
41
|
+
"expected": 385
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"description": "sum of squares 100",
|
45
|
+
"property": "sumOfSquares",
|
46
|
+
"number": 100,
|
47
|
+
"expected": 338350
|
48
|
+
}
|
49
|
+
]
|
41
50
|
},
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
51
|
+
{
|
52
|
+
"description": "Subtract sum of squares from square of sums",
|
53
|
+
"cases": [
|
54
|
+
{
|
55
|
+
"description": "difference of squares 0",
|
56
|
+
"property": "differenceOfSquares",
|
57
|
+
"number": 0,
|
58
|
+
"expected": 0
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"description": "difference of squares 5",
|
62
|
+
"property": "differenceOfSquares",
|
63
|
+
"number": 5,
|
64
|
+
"expected": 170
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"description": "difference of squares 10",
|
68
|
+
"property": "differenceOfSquares",
|
69
|
+
"number": 10,
|
70
|
+
"expected": 2640
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"description": "difference of squares 100",
|
74
|
+
"property": "differenceOfSquares",
|
75
|
+
"number": 100,
|
76
|
+
"expected": 25164150
|
77
|
+
}
|
78
|
+
]
|
66
79
|
}
|
80
|
+
]
|
67
81
|
}
|
@@ -1,69 +1,77 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
|
4
|
-
|
2
|
+
"exercise": "etl",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"cases": [
|
5
|
+
{
|
6
|
+
"comments": [
|
7
|
+
"Note: The expected input data for these tests should have",
|
5
8
|
"integer keys (not stringified numbers as shown in the JSON below",
|
6
9
|
"Unless the language prohibits that, please implement these tests",
|
7
10
|
"such that keys are integers. e.g. in JavaScript, it might look ",
|
8
11
|
"like `transform( { 1: ['A'] } );`"
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
"
|
12
|
+
],
|
13
|
+
"description": "transforms the a set of scrabble data previously indexed by the tile score to a set of data indexed by the tile letter",
|
14
|
+
"cases": [
|
15
|
+
{
|
16
|
+
"description": "a single letter",
|
17
|
+
"property": "transform",
|
18
|
+
"input": {
|
19
|
+
"1": ["A"]
|
20
|
+
},
|
21
|
+
"expected": {
|
22
|
+
"a": 1
|
23
|
+
}
|
16
24
|
},
|
17
|
-
|
18
|
-
"
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
"o" : 1,
|
31
|
-
"u" : 1
|
32
|
-
}
|
33
|
-
},
|
34
|
-
{
|
35
|
-
"description": "multiple scores with multiple letters",
|
36
|
-
"input": {
|
37
|
-
"1": ["A", "E"],
|
38
|
-
"2": ["D", "G"]
|
25
|
+
{
|
26
|
+
"description": "single score with multiple letters",
|
27
|
+
"property": "transform",
|
28
|
+
"input": {
|
29
|
+
"1": ["A", "E", "I", "O", "U"]
|
30
|
+
},
|
31
|
+
"expected": {
|
32
|
+
"a": 1,
|
33
|
+
"e": 1,
|
34
|
+
"i": 1,
|
35
|
+
"o": 1,
|
36
|
+
"u": 1
|
37
|
+
}
|
39
38
|
},
|
40
|
-
|
41
|
-
"
|
42
|
-
"
|
43
|
-
"
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
"4": [ "F", "H", "V", "W", "Y" ],
|
54
|
-
"5": [ "K" ],
|
55
|
-
"8": [ "J", "X" ],
|
56
|
-
"10": [ "Q", "Z" ]
|
39
|
+
{
|
40
|
+
"description": "multiple scores with multiple letters",
|
41
|
+
"property": "transform",
|
42
|
+
"input": {
|
43
|
+
"1": ["A", "E"],
|
44
|
+
"2": ["D", "G"]
|
45
|
+
},
|
46
|
+
"expected": {
|
47
|
+
"a": 1,
|
48
|
+
"d": 2,
|
49
|
+
"e": 1,
|
50
|
+
"g": 2
|
51
|
+
}
|
57
52
|
},
|
58
|
-
|
59
|
-
"
|
60
|
-
"
|
61
|
-
"
|
62
|
-
|
63
|
-
|
64
|
-
|
53
|
+
{
|
54
|
+
"description": "multiple scores with differing numbers of letters",
|
55
|
+
"property": "transform",
|
56
|
+
"input": {
|
57
|
+
"1": ["A", "E", "I", "O", "U", "L", "N", "R", "S", "T"],
|
58
|
+
"2": ["D", "G"],
|
59
|
+
"3": ["B", "C", "M", "P"],
|
60
|
+
"4": ["F", "H", "V", "W", "Y"],
|
61
|
+
"5": ["K"],
|
62
|
+
"8": ["J", "X"],
|
63
|
+
"10": ["Q", "Z"]
|
64
|
+
},
|
65
|
+
"expected": {
|
66
|
+
"a": 1, "b": 3, "c": 3, "d": 2, "e": 1,
|
67
|
+
"f": 4, "g": 2, "h": 4, "i": 1, "j": 8,
|
68
|
+
"k": 5, "l": 1, "m": 3, "n": 1, "o": 1,
|
69
|
+
"p": 3, "q": 10, "r": 1, "s": 1, "t": 1,
|
70
|
+
"u": 1, "v": 4, "w": 4, "x": 8, "y": 4,
|
71
|
+
"z": 10
|
72
|
+
}
|
65
73
|
}
|
66
|
-
|
67
|
-
|
68
|
-
|
74
|
+
]
|
75
|
+
}
|
76
|
+
]
|
69
77
|
}
|