trackler 2.0.6.25 → 2.0.6.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/common/exercises/nucleotide-count/canonical-data.json +44 -0
- data/common/exercises/scrabble-score/canonical-data.json +5 -0
- data/lib/trackler/version.rb +1 -1
- data/tracks/c/exercises/gigasecond/test/test_gigasecond.c +1 -1
- data/tracks/c/exercises/grains/src/example.c +4 -0
- data/tracks/c/exercises/grains/test/test_grains.c +12 -0
- data/tracks/csharp/exercises/error-handling/ErrorHandlingTest.cs +5 -5
- data/tracks/delphi/SETUP.md +1 -1
- data/tracks/fsharp/exercises/food-chain/HINTS.md +2 -0
- data/tracks/fsharp/exercises/house/HINTS.md +2 -0
- data/tracks/fsharp/exercises/proverb/HINTS.md +2 -0
- data/tracks/fsharp/exercises/scrabble-score/ScrabbleScoreTest.fs +6 -1
- data/tracks/fsharp/exercises/twelve-days/HINTS.md +2 -0
- data/tracks/haskell/config.json +60 -0
- data/tracks/java/config.json +6 -0
- data/tracks/java/exercises/clock/build.gradle +17 -0
- data/tracks/java/exercises/clock/src/example/java/Clock.java +49 -0
- data/tracks/java/exercises/clock/src/main/java/.keep +0 -0
- data/tracks/java/exercises/clock/src/test/java/ClockAddTest.java +135 -0
- data/tracks/java/exercises/clock/src/test/java/ClockCreationTest.java +120 -0
- data/tracks/java/exercises/clock/src/test/java/ClockEqualTest.java +98 -0
- data/tracks/java/exercises/grade-school/build.gradle +1 -0
- data/tracks/java/exercises/grade-school/src/test/java/SchoolTest.java +39 -28
- data/tracks/java/exercises/settings.gradle +1 -0
- data/tracks/javascript/exercises/rna-transcription/example.js +1 -0
- data/tracks/javascript/exercises/rna-transcription/rna-transcription.spec.js +12 -0
- data/tracks/rust/config.json +41 -41
- metadata +13 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 723ea04d71ff6562a6d27f75ed7fbbbd37251d4d
|
4
|
+
data.tar.gz: dcdab8d87803eed5e08a47f9b73959181e6b0b43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3be2e4eca18e56ffb216b7b32ed7caa70904061b4acfc378de5cae07b1c98e7411e1883603f18d14fd5b1156e9feafacb10d596fd17941102d5d06e5ec349c46
|
7
|
+
data.tar.gz: bd0d44195fa4bb6644434227cfeb3ce852bb7d76523bc72dc427950ea7480ae5d6021bd179a53bd93f01a33dd240ad3afbe294ec9dbeca390ca3d9c01b05833f
|
@@ -0,0 +1,44 @@
|
|
1
|
+
{
|
2
|
+
"nucleotide_counts": {
|
3
|
+
"description": "count all nucleotides in a strand",
|
4
|
+
"cases": [
|
5
|
+
{
|
6
|
+
"description": "empty strand",
|
7
|
+
"strand": "",
|
8
|
+
"expected": {
|
9
|
+
"A": 0,
|
10
|
+
"C": 0,
|
11
|
+
"G": 0,
|
12
|
+
"T": 0
|
13
|
+
}
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"description": "strand with repeated nucleotide",
|
17
|
+
"strand": "GGGGGGG",
|
18
|
+
"expected": {
|
19
|
+
"A": 0,
|
20
|
+
"C": 0,
|
21
|
+
"G": 7,
|
22
|
+
"T": 0
|
23
|
+
}
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"description": "strand with multiple nucleotides",
|
27
|
+
"strand": "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC",
|
28
|
+
"expected": {
|
29
|
+
"A": 20,
|
30
|
+
"C": 12,
|
31
|
+
"G": 17,
|
32
|
+
"T": 21
|
33
|
+
}
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"description": "strand with invalid nucleotides",
|
37
|
+
"strand": "AGXXACT",
|
38
|
+
"expected": {
|
39
|
+
"error": "Invalid nucleotide in strand"
|
40
|
+
}
|
41
|
+
}
|
42
|
+
]
|
43
|
+
}
|
44
|
+
}
|
data/lib/trackler/version.rb
CHANGED
@@ -36,6 +36,16 @@ void test_square_64(void)
|
|
36
36
|
TEST_ASSERT_EQUAL_UINT64(9223372036854775808ul, square(64));
|
37
37
|
}
|
38
38
|
|
39
|
+
void test_square_0_does_not_exist(void)
|
40
|
+
{
|
41
|
+
TEST_ASSERT_EQUAL_UINT64(0, square(0));
|
42
|
+
}
|
43
|
+
|
44
|
+
void test_square_greater_than_64_does_not_exist(void)
|
45
|
+
{
|
46
|
+
TEST_ASSERT_EQUAL_UINT64(0, square(65));
|
47
|
+
}
|
48
|
+
|
39
49
|
void test_total(void)
|
40
50
|
{
|
41
51
|
TEST_ASSERT_EQUAL_UINT64(18446744073709551615ul, total());
|
@@ -52,6 +62,8 @@ int main(void)
|
|
52
62
|
RUN_TEST(test_square_16);
|
53
63
|
RUN_TEST(test_square_32);
|
54
64
|
RUN_TEST(test_square_64);
|
65
|
+
RUN_TEST(test_square_0_does_not_exist);
|
66
|
+
RUN_TEST(test_square_greater_than_64_does_not_exist);
|
55
67
|
RUN_TEST(test_total);
|
56
68
|
|
57
69
|
UnityEnd();
|
@@ -6,7 +6,7 @@ public class ErrorHandlingTest
|
|
6
6
|
{
|
7
7
|
// Read more about exception handling here:
|
8
8
|
// https://msdn.microsoft.com/en-us/library/ms173162.aspx?f=255&MSPPError=-2147217396
|
9
|
-
[
|
9
|
+
[Test]
|
10
10
|
public void ThrowException()
|
11
11
|
{
|
12
12
|
Assert.Throws<Exception>(ErrorHandling.HandleErrorByThrowingException);
|
@@ -14,7 +14,7 @@ public class ErrorHandlingTest
|
|
14
14
|
|
15
15
|
// Read more about nullable types here:
|
16
16
|
// https://msdn.microsoft.com/en-us/library/1t3y8s4s.aspx?f=255&MSPPError=-2147217396
|
17
|
-
[
|
17
|
+
[Test]
|
18
18
|
[Ignore("Remove to run test")]
|
19
19
|
public void ReturnNullableType()
|
20
20
|
{
|
@@ -27,7 +27,7 @@ public class ErrorHandlingTest
|
|
27
27
|
|
28
28
|
// Read more about out parameters here:
|
29
29
|
// https://msdn.microsoft.com/en-us/library/t3c3bfhx.aspx?f=255&MSPPError=-2147217396
|
30
|
-
[
|
30
|
+
[Test]
|
31
31
|
[Ignore("Remove to run test")]
|
32
32
|
public void ReturnWithOutParameter()
|
33
33
|
{
|
@@ -53,7 +53,7 @@ public class ErrorHandlingTest
|
|
53
53
|
|
54
54
|
// Read more about IDisposable here:
|
55
55
|
// https://msdn.microsoft.com/en-us/library/system.idisposable(v=vs.110).aspx
|
56
|
-
[
|
56
|
+
[Test]
|
57
57
|
[Ignore("Remove to run test")]
|
58
58
|
public void DisposableObjectsAreDisposedWhenThrowingAnException()
|
59
59
|
{
|
@@ -62,4 +62,4 @@ public class ErrorHandlingTest
|
|
62
62
|
Assert.Throws<Exception>(() => ErrorHandling.DisposableResourcesAreDisposedWhenExceptionIsThrown(disposableResource));
|
63
63
|
Assert.That(disposableResource.IsDisposed, Is.EqualTo(true));
|
64
64
|
}
|
65
|
-
}
|
65
|
+
}
|
data/tracks/delphi/SETUP.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Testing
|
2
2
|
|
3
3
|
In order to run the tests for this track, you will need to install
|
4
|
-
DUnitX. Please see [
|
4
|
+
DUnitX. Please see [installation](http://www.exercism.io/languages/delphi/installing) instructions for more information.
|
5
5
|
|
6
6
|
### Submitting Exercises
|
7
7
|
|
@@ -35,4 +35,9 @@ let ``Complicated word scores more`` () =
|
|
35
35
|
[<Test>]
|
36
36
|
[<Ignore("Remove to run test")>]
|
37
37
|
let ``Scores are case insensitive`` () =
|
38
|
-
Assert.That(score "OXYPHENBUTAZONE", Is.EqualTo(41))
|
38
|
+
Assert.That(score "OXYPHENBUTAZONE", Is.EqualTo(41))
|
39
|
+
|
40
|
+
[<Test>]
|
41
|
+
[<Ignore("Remove to run test")>]
|
42
|
+
let ``Entire alphabet`` () =
|
43
|
+
Assert.That(score "abcdefghijklmnopqrstuvwxyz", Is.EqualTo(87))
|
data/tracks/haskell/config.json
CHANGED
@@ -32,6 +32,7 @@
|
|
32
32
|
"slug": "rna-transcription",
|
33
33
|
"difficulty": 1,
|
34
34
|
"topics": [
|
35
|
+
"Maybe"
|
35
36
|
]
|
36
37
|
},
|
37
38
|
{
|
@@ -50,24 +51,28 @@
|
|
50
51
|
"slug": "grains",
|
51
52
|
"difficulty": 2,
|
52
53
|
"topics": [
|
54
|
+
"Maybe"
|
53
55
|
]
|
54
56
|
},
|
55
57
|
{
|
56
58
|
"slug": "hamming",
|
57
59
|
"difficulty": 2,
|
58
60
|
"topics": [
|
61
|
+
"Maybe"
|
59
62
|
]
|
60
63
|
},
|
61
64
|
{
|
62
65
|
"slug": "nucleotide-count",
|
63
66
|
"difficulty": 2,
|
64
67
|
"topics": [
|
68
|
+
"Either"
|
65
69
|
]
|
66
70
|
},
|
67
71
|
{
|
68
72
|
"slug": "grade-school",
|
69
73
|
"difficulty": 2,
|
70
74
|
"topics": [
|
75
|
+
"Define type"
|
71
76
|
]
|
72
77
|
},
|
73
78
|
{
|
@@ -86,24 +91,30 @@
|
|
86
91
|
"slug": "accumulate",
|
87
92
|
"difficulty": 3,
|
88
93
|
"topics": [
|
94
|
+
"Lazy evaluation",
|
95
|
+
"Library reimplementation"
|
89
96
|
]
|
90
97
|
},
|
91
98
|
{
|
92
99
|
"slug": "strain",
|
93
100
|
"difficulty": 3,
|
94
101
|
"topics": [
|
102
|
+
"Lazy evaluation",
|
103
|
+
"Library reimplementation"
|
95
104
|
]
|
96
105
|
},
|
97
106
|
{
|
98
107
|
"slug": "phone-number",
|
99
108
|
"difficulty": 3,
|
100
109
|
"topics": [
|
110
|
+
"Maybe"
|
101
111
|
]
|
102
112
|
},
|
103
113
|
{
|
104
114
|
"slug": "beer-song",
|
105
115
|
"difficulty": 3,
|
106
116
|
"topics": [
|
117
|
+
"Refactoring"
|
107
118
|
]
|
108
119
|
},
|
109
120
|
{
|
@@ -128,12 +139,14 @@
|
|
128
139
|
"slug": "robot-simulator",
|
129
140
|
"difficulty": 3,
|
130
141
|
"topics": [
|
142
|
+
"Define type"
|
131
143
|
]
|
132
144
|
},
|
133
145
|
{
|
134
146
|
"slug": "secret-handshake",
|
135
147
|
"difficulty": 3,
|
136
148
|
"topics": [
|
149
|
+
"instance custom"
|
137
150
|
]
|
138
151
|
},
|
139
152
|
{
|
@@ -146,12 +159,16 @@
|
|
146
159
|
"slug": "simple-linked-list",
|
147
160
|
"difficulty": 4,
|
148
161
|
"topics": [
|
162
|
+
"Define type",
|
163
|
+
"Library reimplementation"
|
149
164
|
]
|
150
165
|
},
|
151
166
|
{
|
152
167
|
"slug": "list-ops",
|
153
168
|
"difficulty": 4,
|
154
169
|
"topics": [
|
170
|
+
"Accumulator-strictness",
|
171
|
+
"Library reimplementation"
|
155
172
|
]
|
156
173
|
},
|
157
174
|
{
|
@@ -164,6 +181,7 @@
|
|
164
181
|
"slug": "roman-numerals",
|
165
182
|
"difficulty": 4,
|
166
183
|
"topics": [
|
184
|
+
"Maybe"
|
167
185
|
]
|
168
186
|
},
|
169
187
|
{
|
@@ -182,30 +200,36 @@
|
|
182
200
|
"slug": "all-your-base",
|
183
201
|
"difficulty": 4,
|
184
202
|
"topics": [
|
203
|
+
"Maybe"
|
185
204
|
]
|
186
205
|
},
|
187
206
|
{
|
188
207
|
"slug": "largest-series-product",
|
189
208
|
"difficulty": 4,
|
190
209
|
"topics": [
|
210
|
+
"Maybe"
|
191
211
|
]
|
192
212
|
},
|
193
213
|
{
|
194
214
|
"slug": "clock",
|
195
215
|
"difficulty": 4,
|
196
216
|
"topics": [
|
217
|
+
"Define type",
|
218
|
+
"instance Num"
|
197
219
|
]
|
198
220
|
},
|
199
221
|
{
|
200
222
|
"slug": "matrix",
|
201
223
|
"difficulty": 4,
|
202
224
|
"topics": [
|
225
|
+
"Define type"
|
203
226
|
]
|
204
227
|
},
|
205
228
|
{
|
206
229
|
"slug": "house",
|
207
230
|
"difficulty": 4,
|
208
231
|
"topics": [
|
232
|
+
"Refactoring"
|
209
233
|
]
|
210
234
|
},
|
211
235
|
{
|
@@ -254,6 +278,7 @@
|
|
254
278
|
"slug": "nth-prime",
|
255
279
|
"difficulty": 5,
|
256
280
|
"topics": [
|
281
|
+
"Maybe"
|
257
282
|
]
|
258
283
|
},
|
259
284
|
{
|
@@ -266,6 +291,8 @@
|
|
266
291
|
"slug": "binary-search-tree",
|
267
292
|
"difficulty": 5,
|
268
293
|
"topics": [
|
294
|
+
"Define type",
|
295
|
+
"Maybe"
|
269
296
|
]
|
270
297
|
},
|
271
298
|
{
|
@@ -278,6 +305,7 @@
|
|
278
305
|
"slug": "queen-attack",
|
279
306
|
"difficulty": 5,
|
280
307
|
"topics": [
|
308
|
+
"Maybe"
|
281
309
|
]
|
282
310
|
},
|
283
311
|
{
|
@@ -290,12 +318,15 @@
|
|
290
318
|
"slug": "food-chain",
|
291
319
|
"difficulty": 5,
|
292
320
|
"topics": [
|
321
|
+
"Refactoring"
|
293
322
|
]
|
294
323
|
},
|
295
324
|
{
|
296
325
|
"slug": "custom-set",
|
297
326
|
"difficulty": 5,
|
298
327
|
"topics": [
|
328
|
+
"Define type",
|
329
|
+
"Library reimplementation"
|
299
330
|
]
|
300
331
|
},
|
301
332
|
{
|
@@ -308,6 +339,9 @@
|
|
308
339
|
"slug": "simple-cipher",
|
309
340
|
"difficulty": 6,
|
310
341
|
"topics": [
|
342
|
+
"IO monad",
|
343
|
+
"Random",
|
344
|
+
"Mutable state"
|
311
345
|
]
|
312
346
|
},
|
313
347
|
{
|
@@ -320,6 +354,9 @@
|
|
320
354
|
"slug": "robot-name",
|
321
355
|
"difficulty": 6,
|
322
356
|
"topics": [
|
357
|
+
"Define type",
|
358
|
+
"IO monad",
|
359
|
+
"Random"
|
323
360
|
]
|
324
361
|
},
|
325
362
|
{
|
@@ -332,12 +369,17 @@
|
|
332
369
|
"slug": "say",
|
333
370
|
"difficulty": 6,
|
334
371
|
"topics": [
|
372
|
+
"Maybe"
|
335
373
|
]
|
336
374
|
},
|
337
375
|
{
|
338
376
|
"slug": "bank-account",
|
339
377
|
"difficulty": 6,
|
340
378
|
"topics": [
|
379
|
+
"Define type",
|
380
|
+
"IO monad",
|
381
|
+
"Maybe",
|
382
|
+
"Mutable state"
|
341
383
|
]
|
342
384
|
},
|
343
385
|
{
|
@@ -350,6 +392,11 @@
|
|
350
392
|
"slug": "linked-list",
|
351
393
|
"difficulty": 6,
|
352
394
|
"topics": [
|
395
|
+
"Define type",
|
396
|
+
"IO monad",
|
397
|
+
"Library reimplementation",
|
398
|
+
"Maybe",
|
399
|
+
"Mutable state"
|
353
400
|
]
|
354
401
|
},
|
355
402
|
{
|
@@ -368,48 +415,56 @@
|
|
368
415
|
"slug": "wordy",
|
369
416
|
"difficulty": 7,
|
370
417
|
"topics": [
|
418
|
+
"Maybe"
|
371
419
|
]
|
372
420
|
},
|
373
421
|
{
|
374
422
|
"slug": "change",
|
375
423
|
"difficulty": 7,
|
376
424
|
"topics": [
|
425
|
+
"Maybe"
|
377
426
|
]
|
378
427
|
},
|
379
428
|
{
|
380
429
|
"slug": "alphametics",
|
381
430
|
"difficulty": 7,
|
382
431
|
"topics": [
|
432
|
+
"Maybe"
|
383
433
|
]
|
384
434
|
},
|
385
435
|
{
|
386
436
|
"slug": "bowling",
|
387
437
|
"difficulty": 7,
|
388
438
|
"topics": [
|
439
|
+
"Either"
|
389
440
|
]
|
390
441
|
},
|
391
442
|
{
|
392
443
|
"slug": "connect",
|
393
444
|
"difficulty": 8,
|
394
445
|
"topics": [
|
446
|
+
"Maybe"
|
395
447
|
]
|
396
448
|
},
|
397
449
|
{
|
398
450
|
"slug": "dominoes",
|
399
451
|
"difficulty": 8,
|
400
452
|
"topics": [
|
453
|
+
"Maybe"
|
401
454
|
]
|
402
455
|
},
|
403
456
|
{
|
404
457
|
"slug": "sgf-parsing",
|
405
458
|
"difficulty": 9,
|
406
459
|
"topics": [
|
460
|
+
"Maybe"
|
407
461
|
]
|
408
462
|
},
|
409
463
|
{
|
410
464
|
"slug": "go-counting",
|
411
465
|
"difficulty": 9,
|
412
466
|
"topics": [
|
467
|
+
"Maybe"
|
413
468
|
]
|
414
469
|
},
|
415
470
|
{
|
@@ -422,18 +477,23 @@
|
|
422
477
|
"slug": "zipper",
|
423
478
|
"difficulty": 10,
|
424
479
|
"topics": [
|
480
|
+
"Define type",
|
481
|
+
"Maybe"
|
425
482
|
]
|
426
483
|
},
|
427
484
|
{
|
428
485
|
"slug": "forth",
|
429
486
|
"difficulty": 10,
|
430
487
|
"topics": [
|
488
|
+
"Define type",
|
489
|
+
"Either"
|
431
490
|
]
|
432
491
|
},
|
433
492
|
{
|
434
493
|
"slug": "pov",
|
435
494
|
"difficulty": 10,
|
436
495
|
"topics": [
|
496
|
+
"Maybe"
|
437
497
|
]
|
438
498
|
}
|
439
499
|
],
|