trackler 2.2.1.88 → 2.2.1.89

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/exercises/bowling/canonical-data.json +95 -39
  4. data/problem-specifications/exercises/gigasecond/canonical-data.json +17 -7
  5. data/problem-specifications/exercises/pangram/canonical-data.json +32 -12
  6. data/problem-specifications/exercises/say/canonical-data.json +47 -17
  7. data/problem-specifications/exercises/sum-of-multiples/canonical-data.json +54 -28
  8. data/problem-specifications/exercises/triangle/canonical-data.json +52 -18
  9. data/problem-specifications/exercises/two-bucket/canonical-data.json +38 -26
  10. data/problem-specifications/exercises/two-fer/canonical-data.json +14 -8
  11. data/problem-specifications/exercises/word-count/canonical-data.json +35 -13
  12. data/problem-specifications/exercises/wordy/canonical-data.json +50 -18
  13. data/tracks/bash/exercises/leap/.meta/version +1 -0
  14. data/tracks/bash/exercises/leap/example.sh +9 -9
  15. data/tracks/bash/exercises/leap/leap_test.sh +17 -33
  16. data/tracks/ceylon/exercises/anagram/source/anagram/AnagramTest.ceylon +1 -1
  17. data/tracks/ceylon/exercises/bracket-push/source/bracketpush/BracketsTest.ceylon +1 -1
  18. data/tracks/ceylon/exercises/rna-transcription/source/rnatranscription/RNATest.ceylon +2 -1
  19. data/tracks/fsharp/build.cake +2 -7
  20. data/tracks/fsharp/exercises/acronym/AcronymTest.fs +1 -1
  21. data/tracks/fsharp/exercises/all-your-base/AllYourBase.fs +1 -1
  22. data/tracks/fsharp/exercises/all-your-base/AllYourBaseTest.fs +43 -43
  23. data/tracks/fsharp/exercises/all-your-base/Example.fs +5 -5
  24. data/tracks/fsharp/exercises/allergies/AllergiesTest.fs +1 -1
  25. data/tracks/fsharp/exercises/alphametics/AlphameticsTest.fs +19 -1
  26. data/tracks/fsharp/exercises/alphametics/Example.fs +53 -34
  27. data/tracks/fsharp/exercises/anagram/AnagramTest.fs +1 -1
  28. data/tracks/fsharp/exercises/atbash-cipher/AtbashCipherTest.fs +1 -1
  29. data/tracks/fsharp/exercises/beer-song/BeerSongTest.fs +1 -1
  30. data/tracks/fsharp/exercises/binary-search/BinarySearchTest.fs +1 -1
  31. data/tracks/fsharp/exercises/bob/BobTest.fs +1 -1
  32. data/tracks/fsharp/exercises/book-store/BookStoreTest.fs +1 -1
  33. data/tracks/fsharp/exercises/bracket-push/BracketPushTest.fs +1 -1
  34. data/tracks/fsharp/exercises/change/ChangeTest.fs +1 -1
  35. data/tracks/fsharp/exercises/collatz-conjecture/CollatzConjectureTest.fs +1 -1
  36. data/tracks/fsharp/exercises/connect/ConnectTest.fs +1 -1
  37. data/tracks/fsharp/exercises/crypto-square/CryptoSquareTest.fs +1 -1
  38. data/tracks/fsharp/exercises/difference-of-squares/DifferenceOfSquaresTest.fs +1 -1
  39. data/tracks/fsharp/exercises/dominoes/DominoesTest.fs +25 -25
  40. data/tracks/fsharp/exercises/etl/EtlTest.fs +8 -8
  41. data/tracks/fsharp/exercises/isbn-verifier/IsbnVerifierTest.fs +5 -1
  42. data/tracks/fsharp/exercises/luhn/LuhnTest.fs +1 -1
  43. data/tracks/fsharp/exercises/meetup/Example.fs +11 -11
  44. data/tracks/fsharp/exercises/meetup/Meetup.fs +2 -2
  45. data/tracks/fsharp/exercises/meetup/MeetupTest.fs +96 -96
  46. data/tracks/fsharp/exercises/robot-simulator/Example.fs +21 -21
  47. data/tracks/fsharp/exercises/robot-simulator/RobotSimulator.fs +5 -5
  48. data/tracks/fsharp/exercises/robot-simulator/RobotSimulatorTest.fs +78 -96
  49. data/tracks/fsharp/generators/CanonicalData.fs +50 -4
  50. data/tracks/fsharp/generators/Common.fs +4 -13
  51. data/tracks/fsharp/generators/Exercise.fs +31 -15
  52. data/tracks/fsharp/generators/Generators.fs +76 -111
  53. data/tracks/haskell/exercises/alphametics/package.yaml +1 -1
  54. data/tracks/haskell/exercises/alphametics/test/Tests.hs +5 -0
  55. data/tracks/haskell/exercises/bowling/package.yaml +1 -1
  56. data/tracks/haskell/exercises/pangram/package.yaml +1 -1
  57. data/tracks/haskell/exercises/say/package.yaml +1 -1
  58. data/tracks/haskell/exercises/sum-of-multiples/package.yaml +1 -1
  59. data/tracks/haskell/exercises/word-count/package.yaml +1 -1
  60. data/tracks/haskell/exercises/wordy/package.yaml +1 -1
  61. data/tracks/java/exercises/nucleotide-count/.meta/hints.md +58 -0
  62. data/tracks/java/exercises/nucleotide-count/README.md +62 -0
  63. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5957f729112f4f43919c3c765109db6e6d2a239d
4
- data.tar.gz: ec02fec7fdfa555fd8fceb7fea89c24e90b0bd18
3
+ metadata.gz: 54dcd4e9322bb9c0319c133fdbd385c681223090
4
+ data.tar.gz: 70685e822782caa9d0154d29d929809c87468a2c
5
5
  SHA512:
6
- metadata.gz: 7732abc8fa6638740667703e3cd7a78abc398675de413e83f1a454199d37c4c93eff038bc82adebc49f1d14eabad362380f6125237090c3ab636827faa2692bd
7
- data.tar.gz: d19cfde995d99e9f5045bed54a8f6be52975f69be9e7e12d7b4fdd71efded89470f9e30631c4cf196416d8a394a0454a3da44049f16c79e1c008c472ae30248c
6
+ metadata.gz: 85c27aebbbfa56706709ada5850ab5b85afb1d2a7d51fdd9ed7fbc94b3c976f125e9b2c13082719c95b4b4bef6d151964460dba1350e4d0eac166cf5135152c4
7
+ data.tar.gz: 449d36d2f05e4271075a1cab1cd17d1b407ce7b817bfc67548862f17a3f4240b337be81a6c437337cfe4f1c1c77c222b035cd0133fa82a2570d3ef3e02d66a24
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.2.1.88"
2
+ VERSION = "2.2.1.89"
3
3
  end
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "exercise": "bowling",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "comments": [
5
5
  "Students should implement roll and score methods.",
6
6
  "Roll should accept a single integer.",
7
7
  "Score should return the game's final score, when possible",
8
8
  "For brevity the tests display all the previous rolls in an array;",
9
- "each element of the previous_rolls array should be passed to the roll method",
9
+ "each element of the previousRolls array should be passed to the roll method",
10
10
  "and each of those previous rolls is expected to succeed.",
11
11
  "",
12
12
  "Two properties are tested:",
@@ -14,7 +14,7 @@
14
14
  "`score`: All rolls succeed, and taking the score gives the expected result.",
15
15
  "The expected result may be an integer score or an error.",
16
16
  "",
17
- "`roll`: All previous_rolls succeed, and rolling the number of pins in `roll` produces the expected result.",
17
+ "`roll`: All previousRolls succeed, and rolling the number of pins in `roll` produces the expected result.",
18
18
  "Currently, all cases of this type result in errors.",
19
19
  "",
20
20
  "In all error cases you should expect an error as is idiomatic for your language",
@@ -23,150 +23,206 @@
23
23
  "cases": [{
24
24
  "description": "should be able to score a game with all zeros",
25
25
  "property": "score",
26
- "previous_rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
26
+ "input": {
27
+ "previousRolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
28
+ },
27
29
  "expected": 0
28
30
  }, {
29
31
  "description": "should be able to score a game with no strikes or spares",
30
32
  "property": "score",
31
- "previous_rolls": [3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6],
33
+ "input": {
34
+ "previousRolls": [3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6]
35
+ },
32
36
  "expected": 90
33
37
  }, {
34
38
  "description": "a spare followed by zeros is worth ten points",
35
39
  "property": "score",
36
- "previous_rolls": [6, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
40
+ "input": {
41
+ "previousRolls": [6, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
42
+ },
37
43
  "expected": 10
38
44
  }, {
39
45
  "description": "points scored in the roll after a spare are counted twice",
40
46
  "property": "score",
41
- "previous_rolls": [6, 4, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
47
+ "input": {
48
+ "previousRolls": [6, 4, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
49
+ },
42
50
  "expected": 16
43
51
  }, {
44
52
  "description": "consecutive spares each get a one roll bonus",
45
53
  "property": "score",
46
- "previous_rolls": [5, 5, 3, 7, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
54
+ "input": {
55
+ "previousRolls": [5, 5, 3, 7, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
56
+ },
47
57
  "expected": 31
48
58
  }, {
49
59
  "description": "a spare in the last frame gets a one roll bonus that is counted once",
50
60
  "property": "score",
51
- "previous_rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 3, 7],
61
+ "input": {
62
+ "previousRolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 3, 7]
63
+ },
52
64
  "expected": 17
53
65
  }, {
54
66
  "description": "a strike earns ten points in a frame with a single roll",
55
67
  "property": "score",
56
- "previous_rolls": [10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
68
+ "input": {
69
+ "previousRolls": [10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
70
+ },
57
71
  "expected": 10
58
72
  }, {
59
73
  "description": "points scored in the two rolls after a strike are counted twice as a bonus",
60
74
  "property": "score",
61
- "previous_rolls": [10, 5, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
75
+ "input": {
76
+ "previousRolls": [10, 5, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
77
+ },
62
78
  "expected": 26
63
79
  }, {
64
80
  "description": "consecutive strikes each get the two roll bonus",
65
81
  "property": "score",
66
- "previous_rolls": [10, 10, 10, 5, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
82
+ "input": {
83
+ "previousRolls": [10, 10, 10, 5, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
84
+ },
67
85
  "expected": 81
68
86
  }, {
69
87
  "description": "a strike in the last frame gets a two roll bonus that is counted once",
70
88
  "property": "score",
71
- "previous_rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 7, 1],
89
+ "input": {
90
+ "previousRolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 7, 1]
91
+ },
72
92
  "expected": 18
73
93
  }, {
74
94
  "description": "rolling a spare with the two roll bonus does not get a bonus roll",
75
95
  "property": "score",
76
- "previous_rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 7, 3],
96
+ "input": {
97
+ "previousRolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 7, 3]
98
+ },
77
99
  "expected": 20
78
100
  }, {
79
101
  "description": "strikes with the two roll bonus do not get bonus rolls",
80
102
  "property": "score",
81
- "previous_rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10],
103
+ "input": {
104
+ "previousRolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10]
105
+ },
82
106
  "expected": 30
83
107
  }, {
84
108
  "description": "a strike with the one roll bonus after a spare in the last frame does not get a bonus",
85
109
  "property": "score",
86
- "previous_rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 3, 10],
110
+ "input": {
111
+ "previousRolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 3, 10]
112
+ },
87
113
  "expected": 20
88
114
  }, {
89
115
  "description": "all strikes is a perfect game",
90
116
  "property": "score",
91
- "previous_rolls": [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10],
117
+ "input": {
118
+ "previousRolls": [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]
119
+ },
92
120
  "expected": 300
93
121
  }, {
94
122
  "description": "rolls cannot score negative points",
95
123
  "property": "roll",
96
- "previous_rolls": [],
97
- "roll": -1,
124
+ "input": {
125
+ "previousRolls": [],
126
+ "roll": -1
127
+ },
98
128
  "expected": {"error": "Negative roll is invalid"}
99
129
  }, {
100
130
  "description": "a roll cannot score more than 10 points",
101
131
  "property": "roll",
102
- "previous_rolls": [],
103
- "roll": 11,
132
+ "input": {
133
+ "previousRolls": [],
134
+ "roll": 11
135
+ },
104
136
  "expected": {"error": "Pin count exceeds pins on the lane"}
105
137
  }, {
106
138
  "description": "two rolls in a frame cannot score more than 10 points",
107
139
  "property": "roll",
108
- "previous_rolls": [5],
109
- "roll": 6,
140
+ "input": {
141
+ "previousRolls": [5],
142
+ "roll": 6
143
+ },
110
144
  "expected": {"error": "Pin count exceeds pins on the lane"}
111
145
  }, {
112
146
  "description": "bonus roll after a strike in the last frame cannot score more than 10 points",
113
147
  "property": "roll",
114
- "previous_rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10],
115
- "roll": 11,
148
+ "input": {
149
+ "previousRolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10],
150
+ "roll": 11
151
+ },
116
152
  "expected": {"error": "Pin count exceeds pins on the lane"}
117
153
  }, {
118
154
  "description": "two bonus rolls after a strike in the last frame cannot score more than 10 points",
119
155
  "property": "roll",
120
- "previous_rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 5],
121
- "roll": 6,
156
+ "input": {
157
+ "previousRolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 5],
158
+ "roll": 6
159
+ },
122
160
  "expected": {"error": "Pin count exceeds pins on the lane"}
123
161
  }, {
124
162
  "description": "two bonus rolls after a strike in the last frame can score more than 10 points if one is a strike",
125
163
  "property": "score",
126
- "previous_rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 6],
164
+ "input": {
165
+ "previousRolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 6]
166
+ },
127
167
  "expected": 26
128
168
  }, {
129
169
  "description": "the second bonus rolls after a strike in the last frame cannot be a strike if the first one is not a strike",
130
170
  "property": "roll",
131
- "previous_rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 6],
132
- "roll": 10,
171
+ "input": {
172
+ "previousRolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 6],
173
+ "roll": 10
174
+ },
133
175
  "expected": {"error": "Pin count exceeds pins on the lane"}
134
176
  }, {
135
177
  "description": "second bonus roll after a strike in the last frame cannot score more than 10 points",
136
178
  "property": "roll",
137
- "previous_rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10],
138
- "roll": 11,
179
+ "input": {
180
+ "previousRolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10],
181
+ "roll": 11
182
+ },
139
183
  "expected": {"error": "Pin count exceeds pins on the lane"}
140
184
  }, {
141
185
  "description": "an unstarted game cannot be scored",
142
186
  "property": "score",
143
- "previous_rolls": [],
187
+ "input": {
188
+ "previousRolls": []
189
+ },
144
190
  "expected": {"error": "Score cannot be taken until the end of the game"}
145
191
  }, {
146
192
  "description": "an incomplete game cannot be scored",
147
193
  "property": "score",
148
- "previous_rolls": [0, 0],
194
+ "input": {
195
+ "previousRolls": [0, 0]
196
+ },
149
197
  "expected": {"error": "Score cannot be taken until the end of the game"}
150
198
  }, {
151
199
  "description": "cannot roll if game already has ten frames",
152
200
  "property": "roll",
153
- "previous_rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
154
- "roll": 0,
201
+ "input": {
202
+ "previousRolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
203
+ "roll": 0
204
+ },
155
205
  "expected": {"error": "Cannot roll after game is over"}
156
206
  }, {
157
207
  "description": "bonus rolls for a strike in the last frame must be rolled before score can be calculated",
158
208
  "property": "score",
159
- "previous_rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10],
209
+ "input": {
210
+ "previousRolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10]
211
+ },
160
212
  "expected": {"error": "Score cannot be taken until the end of the game"}
161
213
  }, {
162
214
  "description": "both bonus rolls for a strike in the last frame must be rolled before score can be calculated",
163
215
  "property": "score",
164
- "previous_rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10],
216
+ "input": {
217
+ "previousRolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10]
218
+ },
165
219
  "expected": {"error": "Score cannot be taken until the end of the game"}
166
220
  }, {
167
221
  "description": "bonus roll for a spare in the last frame must be rolled before score can be calculated",
168
222
  "property": "score",
169
- "previous_rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 3],
223
+ "input": {
224
+ "previousRolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 3]
225
+ },
170
226
  "expected": {"error": "Score cannot be taken until the end of the game"}
171
227
  }]
172
228
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "exercise": "gigasecond",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "comments": [
5
5
  "The basic test is to add one gigasecond to a few ordinary dates.",
6
6
  "Most test programs currently check only the date and ignore the time.",
@@ -22,34 +22,44 @@
22
22
  {
23
23
  "description": "date only specification of time",
24
24
  "property": "add",
25
- "input": "2011-04-25",
25
+ "input": {
26
+ "birthdate": "2011-04-25"
27
+ },
26
28
  "expected": "2043-01-01T01:46:40"
27
29
  },
28
30
  {
29
31
  "description": "second test for date only specification of time",
30
32
  "property": "add",
31
- "input": "1977-06-13",
33
+ "input": {
34
+ "birthdate": "1977-06-13"
35
+ },
32
36
  "expected": "2009-02-19T01:46:40"
33
37
  },
34
38
  {
35
39
  "description": "third test for date only specification of time",
36
40
  "property": "add",
37
- "input": "1959-07-19",
41
+ "input": {
42
+ "birthdate": "1959-07-19"
43
+ },
38
44
  "expected": "1991-03-27T01:46:40"
39
45
  },
40
46
  {
41
47
  "description": "full time specified",
42
48
  "property": "add",
43
- "input": "2015-01-24T22:00:00",
49
+ "input": {
50
+ "birthdate": "2015-01-24T22:00:00"
51
+ },
44
52
  "expected": "2046-10-02T23:46:40"
45
53
  },
46
54
  {
47
55
  "description": "full time with day roll-over",
48
56
  "property": "add",
49
- "input": "2015-01-24T23:59:59",
57
+ "input": {
58
+ "birthdate": "2015-01-24T23:59:59"
59
+ },
50
60
  "expected": "2046-10-03T01:46:39"
51
61
  }
52
62
  ]
53
63
  }
54
64
  ]
55
- }
65
+ }
@@ -3,7 +3,7 @@
3
3
  "comments": [
4
4
  "A pangram is a sentence using every letter of the alphabet at least once."
5
5
  ],
6
- "version": "1.3.0",
6
+ "version": "1.4.0",
7
7
  "cases": [
8
8
  {
9
9
  "description": "Check if the given string is an pangram",
@@ -14,64 +14,84 @@
14
14
  {
15
15
  "description": "sentence empty",
16
16
  "property": "isPangram",
17
- "input": "",
17
+ "input": {
18
+ "sentence": ""
19
+ },
18
20
  "expected": false
19
21
  },
20
22
  {
21
23
  "description": "recognizes a perfect lower case pangram",
22
24
  "property": "isPangram",
23
- "input": "abcdefghijklmnopqrstuvwxyz",
25
+ "input": {
26
+ "sentence": "abcdefghijklmnopqrstuvwxyz"
27
+ },
24
28
  "expected": true
25
29
  },
26
30
  {
27
31
  "description": "pangram with only lower case",
28
32
  "property": "isPangram",
29
- "input": "the quick brown fox jumps over the lazy dog",
33
+ "input": {
34
+ "sentence": "the quick brown fox jumps over the lazy dog"
35
+ },
30
36
  "expected": true
31
37
  },
32
38
  {
33
39
  "description": "missing character 'x'",
34
40
  "property": "isPangram",
35
- "input": "a quick movement of the enemy will jeopardize five gunboats",
41
+ "input": {
42
+ "sentence": "a quick movement of the enemy will jeopardize five gunboats"
43
+ },
36
44
  "expected": false
37
45
  },
38
46
  {
39
47
  "description": "another missing character, e.g. 'h'",
40
48
  "property": "isPangram",
41
- "input": "five boxing wizards jump quickly at it",
49
+ "input": {
50
+ "sentence": "five boxing wizards jump quickly at it"
51
+ },
42
52
  "expected": false
43
53
  },
44
54
  {
45
55
  "description": "pangram with underscores",
46
56
  "property": "isPangram",
47
- "input": "the_quick_brown_fox_jumps_over_the_lazy_dog",
57
+ "input": {
58
+ "sentence": "the_quick_brown_fox_jumps_over_the_lazy_dog"
59
+ },
48
60
  "expected": true
49
61
  },
50
62
  {
51
63
  "description": "pangram with numbers",
52
64
  "property": "isPangram",
53
- "input": "the 1 quick brown fox jumps over the 2 lazy dogs",
65
+ "input": {
66
+ "sentence": "the 1 quick brown fox jumps over the 2 lazy dogs"
67
+ },
54
68
  "expected": true
55
69
  },
56
70
  {
57
71
  "description": "missing letters replaced by numbers",
58
72
  "property": "isPangram",
59
- "input": "7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog",
73
+ "input": {
74
+ "sentence": "7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog"
75
+ },
60
76
  "expected": false
61
77
  },
62
78
  {
63
79
  "description": "pangram with mixed case and punctuation",
64
80
  "property": "isPangram",
65
- "input": "\"Five quacking Zephyrs jolt my wax bed.\"",
81
+ "input": {
82
+ "sentence": "\"Five quacking Zephyrs jolt my wax bed.\""
83
+ },
66
84
  "expected": true
67
85
  },
68
86
  {
69
87
  "description": "upper and lower case versions of the same character should not be counted separately",
70
88
  "property": "isPangram",
71
- "input": "the quick brown fox jumps over with lazy FX",
89
+ "input": {
90
+ "sentence": "the quick brown fox jumps over with lazy FX"
91
+ },
72
92
  "expected": false
73
93
  }
74
94
  ]
75
95
  }
76
96
  ]
77
- }
97
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "exercise": "say",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "comments": [
5
5
  "Here -1 is used as expected value to indicate that the",
6
6
  "input value is out of the range described in the exercise."
@@ -9,92 +9,122 @@
9
9
  {
10
10
  "description": "zero",
11
11
  "property": "say",
12
- "input": 0,
12
+ "input": {
13
+ "number": 0
14
+ },
13
15
  "expected": "zero"
14
16
  },
15
17
  {
16
18
  "description": "one",
17
19
  "property": "say",
18
- "input": 1,
20
+ "input": {
21
+ "number": 1
22
+ },
19
23
  "expected": "one"
20
24
  },
21
25
  {
22
26
  "description": "fourteen",
23
27
  "property": "say",
24
- "input": 14,
28
+ "input": {
29
+ "number": 14
30
+ },
25
31
  "expected": "fourteen"
26
32
  },
27
33
  {
28
34
  "description": "twenty",
29
35
  "property": "say",
30
- "input": 20,
36
+ "input": {
37
+ "number": 20
38
+ },
31
39
  "expected": "twenty"
32
40
  },
33
41
  {
34
42
  "description": "twenty-two",
35
43
  "property": "say",
36
- "input": 22,
44
+ "input": {
45
+ "number": 22
46
+ },
37
47
  "expected": "twenty-two"
38
48
  },
39
49
  {
40
50
  "description": "one hundred",
41
51
  "property": "say",
42
- "input": 100,
52
+ "input": {
53
+ "number": 100
54
+ },
43
55
  "expected": "one hundred"
44
56
  },
45
57
  {
46
58
  "description": "one hundred twenty-three",
47
59
  "property": "say",
48
- "input": 123,
60
+ "input": {
61
+ "number": 123
62
+ },
49
63
  "expected": "one hundred twenty-three"
50
64
  },
51
65
  {
52
66
  "description": "one thousand",
53
67
  "property": "say",
54
- "input": 1000,
68
+ "input": {
69
+ "number": 1000
70
+ },
55
71
  "expected": "one thousand"
56
72
  },
57
73
  {
58
74
  "description": "one thousand two hundred thirty-four",
59
75
  "property": "say",
60
- "input": 1234,
76
+ "input": {
77
+ "number": 1234
78
+ },
61
79
  "expected": "one thousand two hundred thirty-four"
62
80
  },
63
81
  {
64
82
  "description": "one million",
65
83
  "property": "say",
66
- "input": 1000000,
84
+ "input": {
85
+ "number": 1000000
86
+ },
67
87
  "expected": "one million"
68
88
  },
69
89
  {
70
90
  "description": "one million two thousand three hundred forty-five",
71
91
  "property": "say",
72
- "input": 1002345,
92
+ "input": {
93
+ "number": 1002345
94
+ },
73
95
  "expected": "one million two thousand three hundred forty-five"
74
96
  },
75
97
  {
76
98
  "description": "one billion",
77
99
  "property": "say",
78
- "input": 1000000000,
100
+ "input": {
101
+ "number": 1000000000
102
+ },
79
103
  "expected": "one billion"
80
104
  },
81
105
  {
82
106
  "description": "a big number",
83
107
  "property": "say",
84
- "input": 987654321123,
108
+ "input": {
109
+ "number": 987654321123
110
+ },
85
111
  "expected": "nine hundred eighty-seven billion six hundred fifty-four million three hundred twenty-one thousand one hundred twenty-three"
86
112
  },
87
113
  {
88
114
  "description": "numbers below zero are out of range",
89
115
  "property": "say",
90
- "input": -1,
116
+ "input": {
117
+ "number": -1
118
+ },
91
119
  "expected": -1
92
120
  },
93
121
  {
94
122
  "description": "numbers above 999,999,999,999 are out of range",
95
123
  "property": "say",
96
- "input": 1000000000000,
124
+ "input": {
125
+ "number": 1000000000000
126
+ },
97
127
  "expected": -1
98
128
  }
99
129
  ]
100
- }
130
+ }