trackler 2.0.8.15 → 2.0.8.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,47 +1,58 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
"
|
2
|
+
"exercise": "pascals-triangle",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"comments": [
|
5
|
+
"Expectations are represented here as an array of arrays.",
|
6
|
+
"How you represent this idiomatically in your language is up to you.",
|
7
|
+
"An expectation of -1 indicates some sort of failure should occur"
|
8
|
+
],
|
9
|
+
"cases": [
|
10
|
+
{
|
8
11
|
"description": "Given a count, return a collection of that many rows of pascal's triangle",
|
9
12
|
"cases": [
|
10
13
|
{
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
+
"description": "zero rows",
|
15
|
+
"property": "rows",
|
16
|
+
"count": 0,
|
17
|
+
"expected": []
|
14
18
|
},
|
15
19
|
{
|
16
|
-
|
17
|
-
|
18
|
-
|
20
|
+
"description": "single row",
|
21
|
+
"property": "rows",
|
22
|
+
"count": 1,
|
23
|
+
"expected": [[1]]
|
19
24
|
},
|
20
25
|
{
|
21
|
-
|
22
|
-
|
23
|
-
|
26
|
+
"description": "two rows",
|
27
|
+
"property": "rows",
|
28
|
+
"count": 2,
|
29
|
+
"expected": [[1], [1, 1]]
|
24
30
|
},
|
25
31
|
{
|
26
|
-
|
27
|
-
|
28
|
-
|
32
|
+
"description": "three rows",
|
33
|
+
"property": "rows",
|
34
|
+
"count": 3,
|
35
|
+
"expected": [[1], [1, 1], [1, 2, 1]]
|
29
36
|
},
|
30
37
|
{
|
31
|
-
|
32
|
-
|
33
|
-
|
38
|
+
"description": "four rows",
|
39
|
+
"property": "rows",
|
40
|
+
"count": 4,
|
41
|
+
"expected": [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]]
|
34
42
|
},
|
35
43
|
{
|
36
|
-
|
37
|
-
|
38
|
-
|
44
|
+
"description": "negative rows",
|
45
|
+
"property": "rows",
|
46
|
+
"count": -1,
|
47
|
+
"expected": -1
|
39
48
|
},
|
40
49
|
{
|
41
|
-
|
42
|
-
|
43
|
-
|
50
|
+
"description": "null/no rows",
|
51
|
+
"property": "rows",
|
52
|
+
"count": null,
|
53
|
+
"expected": -1
|
44
54
|
}
|
45
55
|
]
|
46
56
|
}
|
57
|
+
]
|
47
58
|
}
|
@@ -1,5 +1,7 @@
|
|
1
1
|
{
|
2
|
-
"
|
2
|
+
"exercise": "queen-attack",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"comments": [
|
3
5
|
"Testing invalid positions will vary by language. The expected",
|
4
6
|
"value of -1 is there to indicate some sort of failure should",
|
5
7
|
"occur, while a 0 means no failure.",
|
@@ -8,119 +10,133 @@
|
|
8
10
|
"the board graphically, or using standard chess notation. Those",
|
9
11
|
"tests can be offered as extra credit"
|
10
12
|
],
|
11
|
-
"
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
"
|
13
|
+
"cases": [
|
14
|
+
{
|
15
|
+
"description": "Test creation of Queens with valid and invalid positions",
|
16
|
+
"cases": [
|
17
|
+
{
|
18
|
+
"description": "queen with a valid position",
|
19
|
+
"property": "create",
|
20
|
+
"queen": {
|
21
|
+
"position": "(2,2)"
|
22
|
+
},
|
23
|
+
"expected": 0
|
18
24
|
},
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
+
{
|
26
|
+
"description": "queen must have positive rank",
|
27
|
+
"property": "create",
|
28
|
+
"queen": {
|
29
|
+
"position": "(-2,2)"
|
30
|
+
},
|
31
|
+
"expected": -1
|
25
32
|
},
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
33
|
+
{
|
34
|
+
"description": "queen must have rank on board",
|
35
|
+
"property": "create",
|
36
|
+
"queen": {
|
37
|
+
"position": "(8,4)"
|
38
|
+
},
|
39
|
+
"expected": -1
|
32
40
|
},
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
41
|
+
{
|
42
|
+
"description": "queen must have positive file",
|
43
|
+
"property": "create",
|
44
|
+
"queen": {
|
45
|
+
"position": "(2,-2)"
|
46
|
+
},
|
47
|
+
"expected": -1
|
39
48
|
},
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
49
|
+
{
|
50
|
+
"description": "queen must have file on board",
|
51
|
+
"property": "create",
|
52
|
+
"queen": {
|
53
|
+
"position": "(4,8)"
|
54
|
+
},
|
55
|
+
"expected": -1
|
56
|
+
}
|
57
|
+
]
|
58
|
+
},
|
59
|
+
{
|
60
|
+
"description": "Test the ability of one queen to attack another",
|
61
|
+
"cases": [
|
62
|
+
{
|
63
|
+
"description": "can not attack",
|
64
|
+
"property": "canAttack",
|
65
|
+
"white_queen": {
|
66
|
+
"position": "(2,4)"
|
67
|
+
},
|
68
|
+
"black_queen": {
|
69
|
+
"position": "(6,6)"
|
70
|
+
},
|
71
|
+
"expected": false
|
46
72
|
},
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
"position": "(2,4)"
|
73
|
+
{
|
74
|
+
"description": "can attack on same rank",
|
75
|
+
"property": "canAttack",
|
76
|
+
"white_queen": {
|
77
|
+
"position": "(2,4)"
|
78
|
+
},
|
79
|
+
"black_queen": {
|
80
|
+
"position": "(2,6)"
|
81
|
+
},
|
82
|
+
"expected": true
|
58
83
|
},
|
59
|
-
|
60
|
-
"
|
84
|
+
{
|
85
|
+
"description": "can attack on same file",
|
86
|
+
"property": "canAttack",
|
87
|
+
"white_queen": {
|
88
|
+
"position": "(4,5)"
|
89
|
+
},
|
90
|
+
"black_queen": {
|
91
|
+
"position": "(2,5)"
|
92
|
+
},
|
93
|
+
"expected": true
|
61
94
|
},
|
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
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
"black_queen": {
|
110
|
-
"position": "(1,1)"
|
111
|
-
},
|
112
|
-
"expected": true
|
113
|
-
},
|
114
|
-
{
|
115
|
-
"description": "can attack on fourth diagonal",
|
116
|
-
"white_queen": {
|
117
|
-
"position": "(2,2)"
|
118
|
-
},
|
119
|
-
"black_queen": {
|
120
|
-
"position": "(5,5)"
|
121
|
-
},
|
122
|
-
"expected": true
|
123
|
-
}
|
124
|
-
]
|
125
|
-
}
|
95
|
+
{
|
96
|
+
"description": "can attack on first diagonal",
|
97
|
+
"property": "canAttack",
|
98
|
+
"white_queen": {
|
99
|
+
"position": "(2,2)"
|
100
|
+
},
|
101
|
+
"black_queen": {
|
102
|
+
"position": "(0,4)"
|
103
|
+
},
|
104
|
+
"expected": true
|
105
|
+
},
|
106
|
+
{
|
107
|
+
"description": "can attack on second diagonal",
|
108
|
+
"property": "canAttack",
|
109
|
+
"white_queen": {
|
110
|
+
"position": "(2,2)"
|
111
|
+
},
|
112
|
+
"black_queen": {
|
113
|
+
"position": "(3,1)"
|
114
|
+
},
|
115
|
+
"expected": true
|
116
|
+
},
|
117
|
+
{
|
118
|
+
"description": "can attack on third diagonal",
|
119
|
+
"property": "canAttack",
|
120
|
+
"white_queen": {
|
121
|
+
"position": "(2,2)"
|
122
|
+
},
|
123
|
+
"black_queen": {
|
124
|
+
"position": "(1,1)"
|
125
|
+
},
|
126
|
+
"expected": true
|
127
|
+
},
|
128
|
+
{
|
129
|
+
"description": "can attack on fourth diagonal",
|
130
|
+
"property": "canAttack",
|
131
|
+
"white_queen": {
|
132
|
+
"position": "(2,2)"
|
133
|
+
},
|
134
|
+
"black_queen": {
|
135
|
+
"position": "(5,5)"
|
136
|
+
},
|
137
|
+
"expected": true
|
138
|
+
}
|
139
|
+
]
|
140
|
+
}
|
141
|
+
]
|
126
142
|
}
|
@@ -1,122 +1,151 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
2
|
+
"exercise": "triangle",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"comments": [
|
5
|
+
" Pursuant to discussion in #202, we have decided NOT to test triangles ",
|
6
|
+
" where all side lengths are positive but a + b = c. e.g: ",
|
7
|
+
" (2, 4, 2, Isosceles), (1, 3, 4, Scalene). ",
|
8
|
+
" It's true that the triangle inequality admits such triangles.These ",
|
9
|
+
" triangles have zero area, however. ",
|
10
|
+
" They're degenerate triangles with all three vertices collinear. ",
|
11
|
+
" (In contrast, we will test (0, 0, 0, Illegal), as it is a point) ",
|
12
|
+
" The tests assert properities of the triangle are true or false. ",
|
13
|
+
" See: https://github.com/exercism/x-common/issues/379 for disscussion ",
|
14
|
+
" of this approach ",
|
15
|
+
" How you handle invalid triangles is up to you. These tests suggest a ",
|
16
|
+
" triangle is returned, but all of its properties are false. But you ",
|
17
|
+
" could also have the creation of an invalid triangle return an error ",
|
18
|
+
" or exception. Choose what is idiomatic for your language. "
|
19
|
+
],
|
20
|
+
"cases": [
|
21
|
+
{
|
20
22
|
"description": "returns true if the triangle is equilateral",
|
21
23
|
"cases": [
|
22
24
|
{
|
23
|
-
|
24
|
-
|
25
|
-
|
25
|
+
"description": "true if all sides are equal",
|
26
|
+
"property": "equilateral",
|
27
|
+
"sides": [2, 2, 2],
|
28
|
+
"expected": true
|
26
29
|
},
|
27
30
|
{
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
+
"description": "false if any side is unequal",
|
32
|
+
"property": "equilateral",
|
33
|
+
"sides": [2, 3, 2],
|
34
|
+
"expected": false
|
31
35
|
},
|
32
36
|
{
|
33
|
-
|
34
|
-
|
35
|
-
|
37
|
+
"description": "false if no sides are equal",
|
38
|
+
"property": "equilateral",
|
39
|
+
"sides": [5, 4, 6],
|
40
|
+
"expected": false
|
36
41
|
},
|
37
42
|
{
|
38
|
-
|
39
|
-
|
40
|
-
|
43
|
+
"description": "All zero sides are illegal, so the triangle is not equilateral",
|
44
|
+
"property": "equilateral",
|
45
|
+
"sides": [0, 0, 0],
|
46
|
+
"expected": false
|
41
47
|
},
|
42
48
|
{
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
49
|
+
"comments": [
|
50
|
+
" Your track may choose to skip this test ",
|
51
|
+
" and deal only with integers if appropriate "
|
52
|
+
],
|
53
|
+
"description": "sides may be floats",
|
54
|
+
"property": "equilateral",
|
55
|
+
"sides": [0.5, 0.5, 0.5],
|
56
|
+
"expected": true
|
47
57
|
}
|
48
58
|
]
|
49
59
|
},
|
50
|
-
|
60
|
+
{
|
51
61
|
"description": "returns true if the triangle is isosceles",
|
52
62
|
"cases": [
|
53
63
|
{
|
54
|
-
|
55
|
-
|
56
|
-
|
64
|
+
"description": "true if last two sides are equal",
|
65
|
+
"property": "isosceles",
|
66
|
+
"sides": [3, 4, 4],
|
67
|
+
"expected": true
|
57
68
|
},
|
58
69
|
{
|
59
|
-
|
60
|
-
|
61
|
-
|
70
|
+
"description": "true if first two sides are equal",
|
71
|
+
"property": "isosceles",
|
72
|
+
"sides": [4, 4, 3],
|
73
|
+
"expected": true
|
62
74
|
},
|
63
75
|
{
|
64
|
-
|
65
|
-
|
66
|
-
|
76
|
+
"description": "true if first and last sides are equal",
|
77
|
+
"property": "isosceles",
|
78
|
+
"sides": [4, 3, 4],
|
79
|
+
"expected": true
|
67
80
|
},
|
68
81
|
{
|
69
|
-
|
70
|
-
|
71
|
-
|
82
|
+
"description": "equilateral triangles are also isosceles",
|
83
|
+
"property": "isosceles",
|
84
|
+
"sides": [4, 4, 4],
|
85
|
+
"expected": true
|
72
86
|
},
|
73
87
|
{
|
74
|
-
|
75
|
-
|
76
|
-
|
88
|
+
"description": "false if no sides are equal",
|
89
|
+
"property": "isosceles",
|
90
|
+
"sides": [2, 3, 4],
|
91
|
+
"expected": false
|
77
92
|
},
|
78
93
|
{
|
79
|
-
|
80
|
-
|
81
|
-
|
94
|
+
"description": "Sides that violate triangle inequality are not isosceles, even if two are equal",
|
95
|
+
"property": "isosceles",
|
96
|
+
"sides": [1, 1, 3],
|
97
|
+
"expected": false
|
82
98
|
},
|
83
99
|
{
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
100
|
+
"comments": [
|
101
|
+
" Your track may choose to skip this test ",
|
102
|
+
" and deal only with integers if appropriate "
|
103
|
+
],
|
104
|
+
"property": "isosceles",
|
105
|
+
"description": "sides may be floats",
|
106
|
+
"sides": [0.5, 0.4, 0.5],
|
107
|
+
"expected": true
|
88
108
|
}
|
89
109
|
]
|
90
110
|
},
|
91
|
-
|
111
|
+
{
|
92
112
|
"description": "returns true if the triangle is scalene",
|
93
113
|
"cases": [
|
94
114
|
{
|
95
|
-
|
96
|
-
|
97
|
-
|
115
|
+
"description": "true if no sides are equal",
|
116
|
+
"property": "scalene",
|
117
|
+
"sides": [5, 4, 6],
|
118
|
+
"expected": true
|
98
119
|
},
|
99
120
|
{
|
100
|
-
|
101
|
-
|
102
|
-
|
121
|
+
"description": "false if all sides are equal",
|
122
|
+
"property": "scalene",
|
123
|
+
"sides": [4, 4, 4],
|
124
|
+
"expected": false
|
103
125
|
},
|
104
126
|
{
|
105
|
-
|
106
|
-
|
107
|
-
|
127
|
+
"description": "false if two sides are equal",
|
128
|
+
"property": "scalene",
|
129
|
+
"sides": [4, 4, 3],
|
130
|
+
"expected": false
|
108
131
|
},
|
109
132
|
{
|
110
|
-
|
111
|
-
|
112
|
-
|
133
|
+
"description": "Sides that violate triangle inequality are not scalene, even if they are all different",
|
134
|
+
"property": "scalene",
|
135
|
+
"sides": [7, 3, 2],
|
136
|
+
"expected": false
|
113
137
|
},
|
114
138
|
{
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
139
|
+
"comments": [
|
140
|
+
" Your track may choose to skip this test ",
|
141
|
+
" and deal only with integers if appropriate "
|
142
|
+
],
|
143
|
+
"description": "sides may be floats",
|
144
|
+
"property": "scalene",
|
145
|
+
"sides": [0.5, 0.4, 0.6],
|
146
|
+
"expected": true
|
119
147
|
}
|
120
148
|
]
|
121
149
|
}
|
150
|
+
]
|
122
151
|
}
|