trackler 2.0.8.13 → 2.0.8.14
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/acronym/canonical-data.json +50 -39
- data/common/exercises/all-your-base/canonical-data.json +192 -146
- data/common/exercises/allergies/canonical-data.json +133 -93
- data/common/exercises/anagram/canonical-data.json +128 -106
- data/common/exercises/atbash-cipher/canonical-data.json +92 -74
- data/common/exercises/binary/canonical-data.json +94 -77
- data/common/exercises/bob/canonical-data.json +154 -127
- data/common/exercises/book-store/canonical-data.json +106 -92
- data/common/exercises/change/canonical-data.json +80 -68
- data/common/exercises/grains/canonical-data.json +75 -60
- data/common/exercises/hello-world/canonical-data.json +6 -6
- data/common/exercises/leap/canonical-data.json +28 -22
- data/common/exercises/luhn/canonical-data.json +16 -1
- data/common/exercises/pig-latin/canonical-data.json +93 -75
- data/common/exercises/raindrops/canonical-data.json +112 -92
- data/common/exercises/rna-transcription/canonical-data.json +64 -54
- data/common/exercises/run-length-encoding/canonical-data.json +20 -0
- data/common/exercises/run-length-encoding/description.md +3 -7
- data/common/exercises/say/canonical-data.json +98 -81
- data/common/exercises/scrabble-score/canonical-data.json +13 -0
- data/common/exercises/sieve/canonical-data.json +48 -42
- data/common/exercises/trinary/canonical-data.json +75 -60
- data/common/exercises/word-count/canonical-data.json +116 -54
- data/common/exercises/wordy/canonical-data.json +101 -83
- data/lib/trackler/version.rb +1 -1
- data/tracks/delphi/SETUP.md +10 -1
- data/tracks/delphi/config.json +8 -0
- data/tracks/delphi/docs/TESTS.md +4 -0
- data/tracks/delphi/exercises/hello-world/uTestHelloWorld.pas +49 -27
- data/tracks/delphi/exercises/triangle/Triangle.dpr +60 -0
- data/tracks/delphi/exercises/triangle/uTestTriangle.pas +186 -0
- data/tracks/delphi/exercises/triangle/uTriangleExample.pas +64 -0
- data/tracks/go/exercises/poker/poker_test.go +6 -6
- data/tracks/java/exercises/atbash-cipher/src/test/java/AtbashTest.java +2 -1
- data/tracks/scala/config.json +10 -0
- data/tracks/scala/exercises/variable-length-quantity/HINTS.md +2 -0
- data/tracks/scala/exercises/variable-length-quantity/build.sbt +3 -0
- data/tracks/scala/exercises/variable-length-quantity/example.scala +56 -0
- data/tracks/scala/exercises/variable-length-quantity/src/main/scala/VariableLengthQuantity.scala +0 -0
- data/tracks/scala/exercises/variable-length-quantity/src/test/scala/VariableLengthQuantityTest.scala +162 -0
- data/tracks/scala/testgen/src/main/scala/VariableLengthQuantityTestGenerator.scala +80 -0
- data/tracks/typescript/common/package.json +6 -7
- data/tracks/typescript/common/yarn.lock +422 -380
- data/tracks/typescript/config.json +12 -0
- data/tracks/typescript/exercises/anagram/package.json +6 -7
- data/tracks/typescript/exercises/anagram/yarn.lock +422 -380
- data/tracks/typescript/exercises/beer-song/package.json +6 -7
- data/tracks/typescript/exercises/beer-song/yarn.lock +422 -380
- data/tracks/typescript/exercises/bob/package.json +6 -7
- data/tracks/typescript/exercises/bob/yarn.lock +422 -380
- data/tracks/typescript/exercises/food-chain/package.json +6 -7
- data/tracks/typescript/exercises/food-chain/yarn.lock +422 -380
- data/tracks/typescript/exercises/gigasecond/package.json +6 -7
- data/tracks/typescript/exercises/gigasecond/yarn.lock +422 -380
- data/tracks/typescript/exercises/grade-school/grade-school.example.ts +31 -0
- data/tracks/typescript/exercises/grade-school/grade-school.test.ts +81 -0
- data/tracks/typescript/exercises/grade-school/package.json +36 -0
- data/tracks/typescript/exercises/grade-school/tsconfig.json +21 -0
- data/tracks/typescript/exercises/grade-school/tslint.json +127 -0
- data/tracks/typescript/exercises/grade-school/yarn.lock +2739 -0
- data/tracks/typescript/exercises/hamming/package.json +6 -7
- data/tracks/typescript/exercises/hamming/yarn.lock +422 -380
- data/tracks/typescript/exercises/hello-world/package.json +6 -7
- data/tracks/typescript/exercises/hello-world/yarn.lock +422 -380
- data/tracks/typescript/exercises/leap/package.json +6 -7
- data/tracks/typescript/exercises/leap/yarn.lock +422 -380
- data/tracks/typescript/exercises/pangram/package.json +6 -7
- data/tracks/typescript/exercises/pangram/yarn.lock +422 -380
- data/tracks/typescript/exercises/phone-number/package.json +6 -7
- data/tracks/typescript/exercises/phone-number/yarn.lock +422 -380
- data/tracks/typescript/exercises/rna-transcription/package.json +6 -7
- data/tracks/typescript/exercises/rna-transcription/yarn.lock +422 -380
- data/tracks/typescript/exercises/robot-name/package.json +36 -0
- data/tracks/typescript/exercises/robot-name/robot-name.example.ts +36 -0
- data/tracks/typescript/exercises/robot-name/robot-name.test.ts +86 -0
- data/tracks/typescript/exercises/robot-name/tsconfig.json +21 -0
- data/tracks/typescript/exercises/robot-name/tslint.json +127 -0
- data/tracks/typescript/exercises/robot-name/yarn.lock +2739 -0
- data/tracks/typescript/exercises/say/package.json +6 -7
- data/tracks/typescript/exercises/say/yarn.lock +422 -380
- data/tracks/typescript/exercises/word-count/package.json +6 -7
- data/tracks/typescript/exercises/word-count/yarn.lock +422 -380
- data/tracks/typescript/exercises/wordy/package.json +6 -7
- data/tracks/typescript/exercises/wordy/yarn.lock +422 -380
- metadata +23 -2
@@ -1,71 +1,83 @@
|
|
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
|
-
|
2
|
+
"exercise": "change",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"comments": [
|
5
|
+
"Given an infinite supply of coins with different values, ",
|
6
|
+
"find the smallest number of coins needed to make a desired ",
|
7
|
+
"amount of change."
|
8
|
+
],
|
9
|
+
"cases": [
|
10
|
+
{
|
11
|
+
"description": "single coin change",
|
12
|
+
"property": "findFewestCoins",
|
13
|
+
"coins": [1, 5, 10, 25, 100],
|
14
|
+
"target": 25,
|
15
|
+
"expected": [25]
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"description": "multiple coin change",
|
19
|
+
"property": "findFewestCoins",
|
20
|
+
"coins": [1, 5, 10, 25, 100],
|
21
|
+
"target": 15,
|
22
|
+
"expected": [5, 10]
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"description": "change with Lilliputian Coins",
|
26
|
+
"property": "findFewestCoins",
|
27
|
+
"coins": [1, 4, 15, 20, 50],
|
28
|
+
"target": 23,
|
29
|
+
"expected": [4, 4, 15]
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"description": "change with Lower Elbonia Coins",
|
33
|
+
"property": "findFewestCoins",
|
34
|
+
"coins": [1, 5, 10, 21, 25],
|
35
|
+
"target": 63,
|
36
|
+
"expected": [21, 21, 21]
|
37
|
+
},
|
38
|
+
{
|
39
|
+
"description": "large target values",
|
40
|
+
"property": "findFewestCoins",
|
41
|
+
"coins": [1, 2, 5, 10, 20, 50, 100],
|
42
|
+
"target": 999,
|
43
|
+
"expected": [ 2, 2, 5, 20, 20
|
44
|
+
, 50, 100, 100, 100, 100
|
45
|
+
, 100, 100, 100, 100, 100 ]
|
46
|
+
},
|
47
|
+
{
|
48
|
+
"description": "possible change without unit coins available",
|
49
|
+
"property": "findFewestCoins",
|
50
|
+
"coins": [2, 5, 10, 20, 50],
|
51
|
+
"target": 21,
|
52
|
+
"expected": [2, 2, 2, 5, 10]
|
53
|
+
},
|
54
|
+
{
|
55
|
+
"description": "no coins make 0 change",
|
56
|
+
"property": "findFewestCoins",
|
57
|
+
"coins": [1, 5, 10, 21, 25],
|
58
|
+
"target": 0,
|
59
|
+
"expected": []
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"description": "error testing for change smaller than the smallest of coins",
|
63
|
+
"property": "findFewestCoins",
|
64
|
+
"coins": [5, 10],
|
65
|
+
"target": 3,
|
66
|
+
"expected": -1
|
67
|
+
},
|
68
|
+
{
|
69
|
+
"description": "error if no combination can add up to target",
|
70
|
+
"property": "findFewestCoins",
|
71
|
+
"coins": [5, 10],
|
72
|
+
"target": 94,
|
73
|
+
"expected": -1
|
74
|
+
},
|
75
|
+
{
|
76
|
+
"description": "cannot find negative change values",
|
77
|
+
"property": "findFewestCoins",
|
78
|
+
"coins": [1, 2, 5],
|
79
|
+
"target": -5,
|
80
|
+
"expected": -1
|
70
81
|
}
|
82
|
+
]
|
71
83
|
}
|
@@ -1,66 +1,81 @@
|
|
1
1
|
{
|
2
|
-
"
|
2
|
+
"exercise": "grains",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"comments": [
|
3
5
|
"The final tests of square test error conditions",
|
4
6
|
"The expection for these tests is -1, indicating an error",
|
5
7
|
"In these cases you should expect an error as is idiomatic for your language"
|
6
8
|
],
|
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
|
-
|
9
|
+
"cases": [
|
10
|
+
{
|
11
|
+
"description": "returns the number of grains on the square",
|
12
|
+
"cases": [
|
13
|
+
{
|
14
|
+
"description": "1",
|
15
|
+
"property": "square",
|
16
|
+
"input": 1,
|
17
|
+
"expected": 1
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"description": "2",
|
21
|
+
"property": "square",
|
22
|
+
"input": 2,
|
23
|
+
"expected": 2
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"description": "3",
|
27
|
+
"property": "square",
|
28
|
+
"input": 3,
|
29
|
+
"expected": 4
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"description": "4",
|
33
|
+
"property": "square",
|
34
|
+
"input": 4,
|
35
|
+
"expected": 8
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"description": "16",
|
39
|
+
"property": "square",
|
40
|
+
"input": 16,
|
41
|
+
"expected": 32768
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"description": "32",
|
45
|
+
"property": "square",
|
46
|
+
"input": 32,
|
47
|
+
"expected": 2147483648
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"description": "64",
|
51
|
+
"property": "square",
|
52
|
+
"input": 64,
|
53
|
+
"expected": 9223372036854775808
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"description": "square 0 raises an exception",
|
57
|
+
"property": "square",
|
58
|
+
"input": 0,
|
59
|
+
"expected": -1
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"description": "negative square raises an exception",
|
63
|
+
"property": "square",
|
64
|
+
"input": -1,
|
65
|
+
"expected": -1
|
66
|
+
},
|
67
|
+
{
|
68
|
+
"description": "square greater than 64 raises an exception",
|
69
|
+
"property": "square",
|
70
|
+
"input": 65,
|
71
|
+
"expected": -1
|
72
|
+
}
|
73
|
+
]
|
74
|
+
},
|
75
|
+
{
|
76
|
+
"description": "returns the total number of grains on the board",
|
77
|
+
"property": "total",
|
78
|
+
"expected": 18446744073709551615
|
79
|
+
}
|
80
|
+
]
|
66
81
|
}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
{
|
2
|
-
"exercise":"hello-world",
|
3
|
-
"version":"
|
4
|
-
"cases":[
|
2
|
+
"exercise": "hello-world",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"cases": [
|
5
5
|
{
|
6
|
-
"description":"Say Hi!",
|
7
|
-
"property":"hello",
|
8
|
-
"expected":"Hello, World!"
|
6
|
+
"description": "Say Hi!",
|
7
|
+
"property": "hello",
|
8
|
+
"expected": "Hello, World!"
|
9
9
|
}
|
10
10
|
]
|
11
11
|
}
|
@@ -1,24 +1,30 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
2
|
+
"exercise": "leap",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"cases": [
|
5
|
+
{
|
6
|
+
"description": "year not divisible by 4: common year",
|
7
|
+
"property": "leapYear",
|
8
|
+
"input": 2015,
|
9
|
+
"expected": false
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"description": "year divisible by 4, not divisible by 100: leap year",
|
13
|
+
"property": "leapYear",
|
14
|
+
"input": 2016,
|
15
|
+
"expected": true
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"description": "year divisible by 100, not divisible by 400: common year",
|
19
|
+
"property": "leapYear",
|
20
|
+
"input": 2100,
|
21
|
+
"expected": false
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"description": "year divisible by 400: leap year",
|
25
|
+
"property": "leapYear",
|
26
|
+
"input": 2000,
|
27
|
+
"expected": true
|
28
|
+
}
|
29
|
+
]
|
24
30
|
}
|
@@ -1,67 +1,82 @@
|
|
1
1
|
{
|
2
|
-
"
|
2
|
+
"exercise": "luhn",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"cases": [
|
3
5
|
{
|
4
6
|
"description": "single digit strings can not be valid",
|
7
|
+
"property": "valid",
|
5
8
|
"input": "1",
|
6
9
|
"expected": false
|
7
10
|
},
|
8
11
|
{
|
9
12
|
"description": "A single zero is invalid",
|
13
|
+
"property": "valid",
|
10
14
|
"input": "0",
|
11
15
|
"expected": false
|
12
16
|
},
|
13
17
|
{
|
14
18
|
"description": "a simple valid SIN that remains valid if reversed",
|
19
|
+
"property": "valid",
|
15
20
|
"input": "059",
|
16
21
|
"expected": true
|
17
22
|
},
|
18
23
|
{
|
19
24
|
"description": "a simple valid SIN that becomes invalid if reversed",
|
25
|
+
"property": "valid",
|
20
26
|
"input": "59",
|
21
27
|
"expected": true
|
22
28
|
},
|
23
29
|
{
|
24
30
|
"description": "a valid Canadian SIN",
|
31
|
+
"property": "valid",
|
25
32
|
"input": "055 444 285",
|
26
33
|
"expected": true
|
27
34
|
},
|
28
35
|
{
|
29
36
|
"description": "invalid Canadian SIN",
|
37
|
+
"property": "valid",
|
30
38
|
"input": "055 444 286",
|
31
39
|
"expected": false
|
32
40
|
},
|
33
41
|
{
|
34
42
|
"description": "invalid credit card",
|
43
|
+
"property": "valid",
|
35
44
|
"input": "8273 1232 7352 0569",
|
36
45
|
"expected": false
|
37
46
|
},
|
38
47
|
{
|
39
48
|
"description": "valid strings with a non-digit included become invalid",
|
49
|
+
"property": "valid",
|
40
50
|
"input": "055a 444 285",
|
41
51
|
"expected": false
|
42
52
|
},
|
43
53
|
{
|
44
54
|
"description": "valid strings with punctuation included become invalid",
|
55
|
+
"property": "valid",
|
45
56
|
"input": "055-444-285",
|
46
57
|
"expected": false
|
47
58
|
},
|
48
59
|
{
|
49
60
|
"description": "valid strings with symbols included become invalid",
|
61
|
+
"property": "valid",
|
50
62
|
"input": "055£ 444$ 285",
|
51
63
|
"expected": false
|
52
64
|
},
|
53
65
|
{
|
54
66
|
"description": "single zero with space is invalid",
|
67
|
+
"property": "valid",
|
55
68
|
"input": " 0",
|
56
69
|
"expected": false
|
57
70
|
},
|
58
71
|
{
|
59
72
|
"description": "more than a single zero is valid",
|
73
|
+
"property": "valid",
|
60
74
|
"input": "0000 0",
|
61
75
|
"expected": true
|
62
76
|
},
|
63
77
|
{
|
64
78
|
"description": "input digit 9 is correctly converted to output digit 9",
|
79
|
+
"property": "valid",
|
65
80
|
"input": "091",
|
66
81
|
"expected": true
|
67
82
|
}
|