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.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/common/exercises/clock/canonical-data.json +473 -425
  3. data/common/exercises/crypto-square/canonical-data.json +105 -95
  4. data/common/exercises/difference-of-squares/canonical-data.json +76 -62
  5. data/common/exercises/etl/canonical-data.json +67 -59
  6. data/common/exercises/meetup/canonical-data.json +859 -762
  7. data/common/exercises/meetup/description.md +13 -7
  8. data/common/exercises/minesweeper/canonical-data.json +21 -5
  9. data/common/exercises/nth-prime/canonical-data.json +23 -16
  10. data/common/exercises/nucleotide-count/canonical-data.json +49 -41
  11. data/common/exercises/ocr-numbers/canonical-data.json +204 -183
  12. data/common/exercises/pascals-triangle/canonical-data.json +38 -27
  13. data/common/exercises/queen-attack/canonical-data.json +125 -109
  14. data/common/exercises/rotational-cipher/canonical-data.json +1 -1
  15. data/common/exercises/triangle/canonical-data.json +103 -74
  16. data/lib/trackler/version.rb +1 -1
  17. data/tracks/csharp/docs/TESTS.md +7 -1
  18. data/tracks/csharp/exercises/{exercises.sln → Exercises.All.sln} +0 -0
  19. data/tracks/csharp/exercises/Exercises.Default.sln +1433 -0
  20. data/tracks/csharp/exercises/Exercises.Refactoring.sln +61 -0
  21. data/tracks/csharp/exercises/acronym/AcronymTest.cs +35 -11
  22. data/tracks/csharp/exercises/parallel-letter-frequency/ParallelLetterFrequencyTest.cs +2 -2
  23. data/tracks/delphi/docs/TESTS.md +2 -2
  24. data/tracks/elixir/exercises/bowling/bowling.exs +1 -1
  25. data/tracks/fsharp/docs/LEARNING.md +2 -1
  26. data/tracks/go/config.json +7 -1
  27. data/tracks/go/exercises/prime-factors/{primefactors_test.go → prime_factors_test.go} +4 -1
  28. data/tracks/go/exercises/protein-translation/protein_translation_test.go +6 -6
  29. data/tracks/go/exercises/pythagorean-triplet/example.go +2 -0
  30. data/tracks/go/exercises/pythagorean-triplet/pythagorean_triplet_test.go +8 -0
  31. data/tracks/julia/README.md +2 -0
  32. data/tracks/julia/config.json +9 -0
  33. data/tracks/julia/exercises/rotational-cipher/HINTS.md +21 -0
  34. data/tracks/julia/exercises/rotational-cipher/example.jl +16 -0
  35. data/tracks/julia/exercises/rotational-cipher/rotational-cipher.jl +0 -0
  36. data/tracks/julia/exercises/rotational-cipher/runtests.jl +51 -0
  37. data/tracks/ocaml/config.json +5 -0
  38. data/tracks/ocaml/exercises/connect/.merlin +3 -0
  39. data/tracks/ocaml/exercises/connect/Makefile +15 -0
  40. data/tracks/ocaml/exercises/connect/connect.mli +4 -0
  41. data/tracks/ocaml/exercises/connect/example.ml +80 -0
  42. data/tracks/ocaml/exercises/connect/test.ml +121 -0
  43. data/tracks/ocaml/tools/test-generator/templates/connect/template.ml +23 -0
  44. data/tracks/python/exercises/all-your-base/all_your_base_test.py +2 -0
  45. data/tracks/python/exercises/luhn/example.py +5 -8
  46. data/tracks/python/exercises/luhn/luhn_test.py +34 -24
  47. data/tracks/ruby/README.md +138 -23
  48. metadata +16 -4
@@ -1,47 +1,58 @@
1
1
  {
2
- "#": [
3
- "Expectations are represented here as an array of arrays.",
4
- "How you represent this idiomatically in your language is up to you.",
5
- "An expectation of -1 indicates some sort of failure should occur"
6
- ],
7
- "rows": {
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
- "description": "zero rows",
12
- "count": 0,
13
- "expected": []
14
+ "description": "zero rows",
15
+ "property": "rows",
16
+ "count": 0,
17
+ "expected": []
14
18
  },
15
19
  {
16
- "description": "single row",
17
- "count": 1,
18
- "expected": [[1]]
20
+ "description": "single row",
21
+ "property": "rows",
22
+ "count": 1,
23
+ "expected": [[1]]
19
24
  },
20
25
  {
21
- "description": "two rows",
22
- "count": 2,
23
- "expected": [[1], [1, 1]]
26
+ "description": "two rows",
27
+ "property": "rows",
28
+ "count": 2,
29
+ "expected": [[1], [1, 1]]
24
30
  },
25
31
  {
26
- "description": "three rows",
27
- "count": 3,
28
- "expected": [[1], [1, 1], [1, 2, 1]]
32
+ "description": "three rows",
33
+ "property": "rows",
34
+ "count": 3,
35
+ "expected": [[1], [1, 1], [1, 2, 1]]
29
36
  },
30
37
  {
31
- "description": "four rows",
32
- "count": 4,
33
- "expected": [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]]
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
- "description": "negative rows",
37
- "count": -1,
38
- "expected": -1
44
+ "description": "negative rows",
45
+ "property": "rows",
46
+ "count": -1,
47
+ "expected": -1
39
48
  },
40
49
  {
41
- "description": "null/no rows",
42
- "count": null,
43
- "expected": -1
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
- "create": {
12
- "description": "Test creation of Queens with valid and invalid positions",
13
- "cases" : [
14
- {
15
- "description": "queen with a valid position",
16
- "queen": {
17
- "position": "(2,2)"
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
- "expected": 0
20
- },
21
- {
22
- "description": "queen must have positive rank",
23
- "queen": {
24
- "position": "(-2,2)"
25
+ {
26
+ "description": "queen must have positive rank",
27
+ "property": "create",
28
+ "queen": {
29
+ "position": "(-2,2)"
30
+ },
31
+ "expected": -1
25
32
  },
26
- "expected": -1
27
- },
28
- {
29
- "description": "queen must have rank on board",
30
- "queen": {
31
- "position": "(8,4)"
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
- "expected": -1
34
- },
35
- {
36
- "description": "queen must have positive file",
37
- "queen": {
38
- "position": "(2,-2)"
41
+ {
42
+ "description": "queen must have positive file",
43
+ "property": "create",
44
+ "queen": {
45
+ "position": "(2,-2)"
46
+ },
47
+ "expected": -1
39
48
  },
40
- "expected": -1
41
- },
42
- {
43
- "description": "queen must have file on board",
44
- "queen": {
45
- "position": "(4,8)"
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
- "expected": -1
48
- }
49
- ]
50
- },
51
- "can_attack": {
52
- "description": "Test the ability of one queen to attack another",
53
- "cases": [
54
- {
55
- "description": "can not attack",
56
- "white_queen": {
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
- "black_queen": {
60
- "position": "(6,6)"
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
- "expected": false
63
- },
64
- {
65
- "description": "can attack on same rank",
66
- "white_queen": {
67
- "position": "(2,4)"
68
- },
69
- "black_queen": {
70
- "position": "(2,6)"
71
- },
72
- "expected": true
73
- },
74
- {
75
- "description": "can attack on same file",
76
- "white_queen": {
77
- "position": "(4,5)"
78
- },
79
- "black_queen": {
80
- "position": "(2,5)"
81
- },
82
- "expected": true
83
- },
84
- {
85
- "description": "can attack on first diagonal",
86
- "white_queen": {
87
- "position": "(2,2)"
88
- },
89
- "black_queen": {
90
- "position": "(0,4)"
91
- },
92
- "expected": true
93
- },
94
- {
95
- "description": "can attack on second diagonal",
96
- "white_queen": {
97
- "position": "(2,2)"
98
- },
99
- "black_queen": {
100
- "position": "(3,1)"
101
- },
102
- "expected": true
103
- },
104
- {
105
- "description": "can attack on third diagonal",
106
- "white_queen": {
107
- "position": "(2,2)"
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
  }
@@ -20,7 +20,7 @@
20
20
  {
21
21
  "description": "rotate a by 0, same output as input",
22
22
  "text": "a",
23
- "shift_key": 26,
23
+ "shift_key": 0,
24
24
  "expected": "a"
25
25
  },
26
26
  {
@@ -1,122 +1,151 @@
1
1
  {
2
- "#": [
3
- "Pursuant to discussion in #202,",
4
- "we have decided NOT to test triangles where all side lengths are positive but a + b = c.",
5
- "e.g: (2, 4, 2, Isosceles), (1, 3, 4, Scalene).",
6
- "It's true that the triangle inequality admits such triangles.",
7
- "These triangles have zero area, however.",
8
- "They're degenerate triangles with all three vertices collinear.",
9
- "(In contrast, we will test (0, 0, 0, Illegal), as it is a point).",
10
-
11
- "The tests assert properities of the triangle are true or false.",
12
- "See: https://github.com/exercism/x-common/issues/379 for disscussion of this approach",
13
-
14
- "How you handle invalid triangles is up to you. These tests suggest a triangle",
15
- "is returned, but all of its properties are false. But you could also have the creation",
16
- "of an invalid triangle return an error or exception. Choose what is idiomatic for",
17
- "your language."
18
- ],
19
- "equilateral": {
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
- "description": "true if all sides are equal",
24
- "sides": [2, 2, 2],
25
- "expected": true
25
+ "description": "true if all sides are equal",
26
+ "property": "equilateral",
27
+ "sides": [2, 2, 2],
28
+ "expected": true
26
29
  },
27
30
  {
28
- "description": "false if any side is unequal",
29
- "sides": [2, 3, 2],
30
- "expected": false
31
+ "description": "false if any side is unequal",
32
+ "property": "equilateral",
33
+ "sides": [2, 3, 2],
34
+ "expected": false
31
35
  },
32
36
  {
33
- "description": "false if no sides are equal",
34
- "sides": [5, 4, 6],
35
- "expected": false
37
+ "description": "false if no sides are equal",
38
+ "property": "equilateral",
39
+ "sides": [5, 4, 6],
40
+ "expected": false
36
41
  },
37
42
  {
38
- "description": "All zero sides are illegal, so the triangle is not equilateral",
39
- "sides": [0, 0, 0],
40
- "expected": false
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
- "#": "Your track may choose to skip this test and deal only with integers if appropriate",
44
- "description": "sides may be floats",
45
- "sides": [0.5, 0.5, 0.5],
46
- "expected": true
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
- "isosceles": {
60
+ {
51
61
  "description": "returns true if the triangle is isosceles",
52
62
  "cases": [
53
63
  {
54
- "description": "true if last two sides are equal",
55
- "sides": [3, 4, 4],
56
- "expected": true
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
- "description": "true if first two sides are equal",
60
- "sides": [4, 4, 3],
61
- "expected": true
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
- "description": "true if first and last sides are equal",
65
- "sides": [4, 3, 4],
66
- "expected": true
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
- "description": "equilateral triangles are also isosceles",
70
- "sides": [4, 4, 4],
71
- "expected": true
82
+ "description": "equilateral triangles are also isosceles",
83
+ "property": "isosceles",
84
+ "sides": [4, 4, 4],
85
+ "expected": true
72
86
  },
73
87
  {
74
- "description": "false if no sides are equal",
75
- "sides": [2, 3, 4],
76
- "expected": false
88
+ "description": "false if no sides are equal",
89
+ "property": "isosceles",
90
+ "sides": [2, 3, 4],
91
+ "expected": false
77
92
  },
78
93
  {
79
- "description": "Sides that violate triangle inequality are not isosceles, even if two are equal",
80
- "sides": [1, 1, 3],
81
- "expected": false
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
- "#": "Your track may choose to skip this test and deal only with integers if appropriate",
85
- "description": "sides may be floats",
86
- "sides": [0.5, 0.4, 0.5],
87
- "expected": true
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
- "scalene": {
111
+ {
92
112
  "description": "returns true if the triangle is scalene",
93
113
  "cases": [
94
114
  {
95
- "description": "true if no sides are equal",
96
- "sides": [5, 4, 6],
97
- "expected": true
115
+ "description": "true if no sides are equal",
116
+ "property": "scalene",
117
+ "sides": [5, 4, 6],
118
+ "expected": true
98
119
  },
99
120
  {
100
- "description": "false if all sides are equal",
101
- "sides": [4, 4, 4],
102
- "expected": false
121
+ "description": "false if all sides are equal",
122
+ "property": "scalene",
123
+ "sides": [4, 4, 4],
124
+ "expected": false
103
125
  },
104
126
  {
105
- "description": "false if two sides are equal",
106
- "sides": [4, 4, 3],
107
- "expected": false
127
+ "description": "false if two sides are equal",
128
+ "property": "scalene",
129
+ "sides": [4, 4, 3],
130
+ "expected": false
108
131
  },
109
132
  {
110
- "description": "Sides that violate triangle inequality are not scalene, even if they are all different",
111
- "sides": [7, 3, 2],
112
- "expected": false
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
- "#": "Your track may choose to skip this test and deal only with integers if appropriate",
116
- "description": "sides may be floats",
117
- "sides": [0.5, 0.4, 0.6],
118
- "expected": true
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
  }