trackler 2.0.8.13 → 2.0.8.14
Sign up to get free protection for your applications and to get access to all the features.
- 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,129 +1,156 @@
|
|
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
|
-
|
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
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
2
|
+
"exercise": "bob",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"cases": [
|
5
|
+
{
|
6
|
+
"description": "stating something",
|
7
|
+
"property": "response",
|
8
|
+
"input": "Tom-ay-to, tom-aaaah-to.",
|
9
|
+
"expected": "Whatever."
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"description": "shouting",
|
13
|
+
"property": "response",
|
14
|
+
"input": "WATCH OUT!",
|
15
|
+
"expected": "Whoa, chill out!"
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"description": "shouting gibberish",
|
19
|
+
"property": "response",
|
20
|
+
"input": "FCECDFCAAB",
|
21
|
+
"expected": "Whoa, chill out!"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"description": "asking a question",
|
25
|
+
"property": "response",
|
26
|
+
"input": "Does this cryogenic chamber make me look fat?",
|
27
|
+
"expected": "Sure."
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"description": "asking a numeric question",
|
31
|
+
"property": "response",
|
32
|
+
"input": "You are, what, like 15?",
|
33
|
+
"expected": "Sure."
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"description": "asking gibberish",
|
37
|
+
"property": "response",
|
38
|
+
"input": "fffbbcbeab?",
|
39
|
+
"expected": "Sure."
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"description": "talking forcefully",
|
43
|
+
"property": "response",
|
44
|
+
"input": "Let's go make out behind the gym!",
|
45
|
+
"expected": "Whatever."
|
46
|
+
},
|
47
|
+
{
|
48
|
+
"description": "using acronyms in regular speech",
|
49
|
+
"property": "response",
|
50
|
+
"input": "It's OK if you don't want to go to the DMV.",
|
51
|
+
"expected": "Whatever."
|
52
|
+
},
|
53
|
+
{
|
54
|
+
"description": "forceful question",
|
55
|
+
"property": "response",
|
56
|
+
"input": "WHAT THE HELL WERE YOU THINKING?",
|
57
|
+
"expected": "Whoa, chill out!"
|
58
|
+
},
|
59
|
+
{
|
60
|
+
"description": "shouting numbers",
|
61
|
+
"property": "response",
|
62
|
+
"input": "1, 2, 3 GO!",
|
63
|
+
"expected": "Whoa, chill out!"
|
64
|
+
},
|
65
|
+
{
|
66
|
+
"description": "only numbers",
|
67
|
+
"property": "response",
|
68
|
+
"input": "1, 2, 3",
|
69
|
+
"expected": "Whatever."
|
70
|
+
},
|
71
|
+
{
|
72
|
+
"description": "question with only numbers",
|
73
|
+
"property": "response",
|
74
|
+
"input": "4?",
|
75
|
+
"expected": "Sure."
|
76
|
+
},
|
77
|
+
{
|
78
|
+
"description": "shouting with special characters",
|
79
|
+
"property": "response",
|
80
|
+
"input": "ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!",
|
81
|
+
"expected": "Whoa, chill out!"
|
82
|
+
},
|
83
|
+
{
|
84
|
+
"description": "shouting with no exclamation mark",
|
85
|
+
"property": "response",
|
86
|
+
"input": "I HATE YOU",
|
87
|
+
"expected": "Whoa, chill out!"
|
88
|
+
},
|
89
|
+
{
|
90
|
+
"description": "statement containing question mark",
|
91
|
+
"property": "response",
|
92
|
+
"input": "Ending with ? means a question.",
|
93
|
+
"expected": "Whatever."
|
94
|
+
},
|
95
|
+
{
|
96
|
+
"description": "non-letters with question",
|
97
|
+
"property": "response",
|
98
|
+
"input": ":) ?",
|
99
|
+
"expected": "Sure."
|
100
|
+
},
|
101
|
+
{
|
102
|
+
"description": "prattling on",
|
103
|
+
"property": "response",
|
104
|
+
"input": "Wait! Hang on. Are you going to be OK?",
|
105
|
+
"expected": "Sure."
|
106
|
+
},
|
107
|
+
{
|
108
|
+
"description": "silence",
|
109
|
+
"property": "response",
|
110
|
+
"input": "",
|
111
|
+
"expected": "Fine. Be that way!"
|
112
|
+
},
|
113
|
+
{
|
114
|
+
"description": "prolonged silence",
|
115
|
+
"property": "response",
|
116
|
+
"input": " ",
|
117
|
+
"expected": "Fine. Be that way!"
|
118
|
+
},
|
119
|
+
{
|
120
|
+
"description": "alternate silence",
|
121
|
+
"property": "response",
|
122
|
+
"input": "\t\t\t\t\t\t\t\t\t\t",
|
123
|
+
"expected": "Fine. Be that way!"
|
124
|
+
},
|
125
|
+
{
|
126
|
+
"description": "multiple line question",
|
127
|
+
"property": "response",
|
128
|
+
"input": "\nDoes this cryogenic chamber make me look fat?\nno",
|
129
|
+
"expected": "Whatever."
|
130
|
+
},
|
131
|
+
{
|
132
|
+
"description": "starting with whitespace",
|
133
|
+
"property": "response",
|
134
|
+
"input": " hmmmmmmm...",
|
135
|
+
"expected": "Whatever."
|
136
|
+
},
|
137
|
+
{
|
138
|
+
"description": "ending with whitespace",
|
139
|
+
"property": "response",
|
140
|
+
"input": "Okay if like my spacebar quite a bit? ",
|
141
|
+
"expected": "Sure."
|
142
|
+
},
|
143
|
+
{
|
144
|
+
"description": "other whitespace",
|
145
|
+
"property": "response",
|
146
|
+
"input": "\n\r \t",
|
147
|
+
"expected": "Fine. Be that way!"
|
148
|
+
},
|
149
|
+
{
|
150
|
+
"description": "non-question ending with whitespace",
|
151
|
+
"property": "response",
|
152
|
+
"input": "This is a statement ending with whitespace ",
|
153
|
+
"expected": "Whatever."
|
154
|
+
}
|
155
|
+
]
|
129
156
|
}
|
@@ -1,93 +1,107 @@
|
|
1
1
|
{
|
2
|
-
"book-store"
|
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
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
2
|
+
"exercise": "book-store",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"cases": [
|
5
|
+
{
|
6
|
+
"description": "Return the total basket price after applying the best discount.",
|
7
|
+
"comments": [
|
8
|
+
"Calculate lowest price for a shopping basket containing books only from ",
|
9
|
+
"a single series. There is no discount advantage for having more than ",
|
10
|
+
"one copy of any single book in a grouping."
|
11
|
+
],
|
12
|
+
"cases": [
|
13
|
+
{
|
14
|
+
"property": "total",
|
15
|
+
"description": "Only a single book",
|
16
|
+
"basket": [1],
|
17
|
+
"targetgrouping": [[1]],
|
18
|
+
"expected": 8.00
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"property": "total",
|
22
|
+
"description": "Two of the same book",
|
23
|
+
"basket": [2,2],
|
24
|
+
"targetgrouping": [[2],[2]],
|
25
|
+
"expected": 16.00
|
26
|
+
},
|
27
|
+
{
|
28
|
+
"property": "total",
|
29
|
+
"description": "Empty basket",
|
30
|
+
"basket": [],
|
31
|
+
"targetgrouping": [],
|
32
|
+
"expected": 0.00
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"property": "total",
|
36
|
+
"description": "Two different books",
|
37
|
+
"basket": [1,2],
|
38
|
+
"targetgrouping": [[1,2]],
|
39
|
+
"expected": 15.20
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"property": "total",
|
43
|
+
"description": "Three different books",
|
44
|
+
"basket": [1,2,3],
|
45
|
+
"targetgrouping": [[1,2,3]],
|
46
|
+
"expected": 21.60
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"property": "total",
|
50
|
+
"description": "Four different books",
|
51
|
+
"basket": [1,2,3,4],
|
52
|
+
"targetgrouping": [[1,2,3,4]],
|
53
|
+
"expected": 25.60
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"property": "total",
|
57
|
+
"description": "Five different books",
|
58
|
+
"basket": [1,2,3,4,5],
|
59
|
+
"targetgrouping": [[1,2,3,4,5]],
|
60
|
+
"expected": 30.00
|
61
|
+
},
|
62
|
+
{
|
63
|
+
"property": "total",
|
64
|
+
"description": "Two groups of four is cheaper than group of five plus group of three",
|
65
|
+
"basket": [1,1,2,2,3,3,4,5],
|
66
|
+
"targetgrouping": [[1,2,3,4],[1,2,3,5]],
|
67
|
+
"expected": 51.20
|
68
|
+
},
|
69
|
+
{
|
70
|
+
"property": "total",
|
71
|
+
"description": "Group of four plus group of two is cheaper than two groups of three",
|
72
|
+
"basket": [1,1,2,2,3,4],
|
73
|
+
"targetgrouping": [[1,2,3,4],[1,2]],
|
74
|
+
"expected": 40.8
|
75
|
+
},
|
76
|
+
{
|
77
|
+
"property": "total",
|
78
|
+
"description": "Two each of first 4 books and 1 copy each of rest",
|
79
|
+
"basket": [1,1,2,2,3,3,4,4,5],
|
80
|
+
"targetgrouping": [[1,2,3,4,5],[1,2,3,4]],
|
81
|
+
"expected": 55.60
|
82
|
+
},
|
83
|
+
{
|
84
|
+
"property": "total",
|
85
|
+
"description": "Two copies of each book",
|
86
|
+
"basket": [1,1,2,2,3,3,4,4,5,5],
|
87
|
+
"targetgrouping": [[1,2,3,4,5],[1,2,3,4,5]],
|
88
|
+
"expected": 60.00
|
89
|
+
},
|
90
|
+
{
|
91
|
+
"property": "total",
|
92
|
+
"description": "Three copies of first book and 2 each of remaining",
|
93
|
+
"basket": [1,1,2,2,3,3,4,4,5,5,1],
|
94
|
+
"targetgrouping": [[1,2,3,4,5],[1,2,3,4,5],[1]],
|
95
|
+
"expected": 68.00
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"property": "total",
|
99
|
+
"description": "Three each of first 2 books and 2 each of remaining books",
|
100
|
+
"basket": [1,1,2,2,3,3,4,4,5,5,1,2],
|
101
|
+
"targetgrouping": [[1,2,3,4,5],[1,2,3,4,5],[1,2]],
|
102
|
+
"expected": 75.20
|
103
|
+
}
|
104
|
+
]
|
105
|
+
}
|
106
|
+
]
|
107
|
+
}
|