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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f495f28a576503455eb2749eec1817235e48a609
|
4
|
+
data.tar.gz: c9276d4e561fc5122e8a1c15b7ecafafb983d746
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec0fdb62e954d9c10772f81f130377ff32de49c4b055d7c05b7cb0481746c11ad00d7c845872e0d239ca0769d4076a2e233fe7d68f606654f5431c0b65ea0d1a
|
7
|
+
data.tar.gz: 57baf1579064267dc182ed725697510b3114ec975d1f29796e95bac4b696ddc3ea8111b0a6f63d351b3a2ac449939c97cc817deb7c2190ecb2e118fcf7adc384
|
@@ -1,42 +1,53 @@
|
|
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
|
-
|
2
|
+
"exercise": "acronym",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"cases": [
|
5
|
+
{
|
6
|
+
"description": "Abbreviate a phrase",
|
7
|
+
"cases": [
|
8
|
+
{
|
9
|
+
"description": "basic",
|
10
|
+
"property": "abbreviate",
|
11
|
+
"phrase": "Portable Network Graphics",
|
12
|
+
"expected": "PNG"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"description": "lowercase words",
|
16
|
+
"property": "abbreviate",
|
17
|
+
"phrase": "Ruby on Rails",
|
18
|
+
"expected": "ROR"
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"description": "camelcase",
|
22
|
+
"property": "abbreviate",
|
23
|
+
"phrase": "HyperText Markup Language",
|
24
|
+
"expected": "HTML"
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"description": "punctuation",
|
28
|
+
"property": "abbreviate",
|
29
|
+
"phrase": "First In, First Out",
|
30
|
+
"expected": "FIFO"
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"description": "all caps words",
|
34
|
+
"property": "abbreviate",
|
35
|
+
"phrase": "PHP: Hypertext Preprocessor",
|
36
|
+
"expected": "PHP"
|
37
|
+
},
|
38
|
+
{
|
39
|
+
"description": "non-acronym all caps word",
|
40
|
+
"property": "abbreviate",
|
41
|
+
"phrase": "GNU Image Manipulation Program",
|
42
|
+
"expected": "GIMP"
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"description": "hyphenated",
|
46
|
+
"property": "abbreviate",
|
47
|
+
"phrase": "Complementary metal-oxide semiconductor",
|
48
|
+
"expected": "CMOS"
|
49
|
+
}
|
50
|
+
]
|
41
51
|
}
|
52
|
+
]
|
42
53
|
}
|
@@ -1,148 +1,194 @@
|
|
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
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
2
|
+
"exercise": "all-your-base",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"comments": [
|
5
|
+
"It's up to each track do decide:",
|
6
|
+
"",
|
7
|
+
"1. What's the canonical representation of zero?",
|
8
|
+
" - []?",
|
9
|
+
" - [0]?",
|
10
|
+
"",
|
11
|
+
"2. What representations of zero are allowed?",
|
12
|
+
" - []?",
|
13
|
+
" - [0]?",
|
14
|
+
" - [0,0]?",
|
15
|
+
"",
|
16
|
+
"3. Are leading zeroes allowed?",
|
17
|
+
"",
|
18
|
+
"4. How should invalid input be handled?",
|
19
|
+
"",
|
20
|
+
"All the undefined cases are marked as null.",
|
21
|
+
"",
|
22
|
+
"All your numeric-base are belong to [2..]. :)"
|
23
|
+
],
|
24
|
+
"cases": [
|
25
|
+
{
|
26
|
+
"description": "single bit one to decimal",
|
27
|
+
"property": "rebase",
|
28
|
+
"input_base": 2,
|
29
|
+
"input_digits": [1],
|
30
|
+
"output_base": 10,
|
31
|
+
"expected": [1]
|
32
|
+
},
|
33
|
+
{
|
34
|
+
"description": "binary to single decimal",
|
35
|
+
"property": "rebase",
|
36
|
+
"input_base": 2,
|
37
|
+
"input_digits": [1, 0, 1],
|
38
|
+
"output_base": 10,
|
39
|
+
"expected": [5]
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"description": "single decimal to binary",
|
43
|
+
"property": "rebase",
|
44
|
+
"input_base": 10,
|
45
|
+
"input_digits": [5],
|
46
|
+
"output_base": 2,
|
47
|
+
"expected": [1, 0, 1]
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"description": "binary to multiple decimal",
|
51
|
+
"property": "rebase",
|
52
|
+
"input_base": 2,
|
53
|
+
"input_digits": [1, 0, 1, 0, 1, 0],
|
54
|
+
"output_base": 10,
|
55
|
+
"expected": [4, 2]
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"description": "decimal to binary",
|
59
|
+
"property": "rebase",
|
60
|
+
"input_base": 10,
|
61
|
+
"input_digits": [4, 2],
|
62
|
+
"output_base": 2,
|
63
|
+
"expected": [1, 0, 1, 0, 1, 0]
|
64
|
+
},
|
65
|
+
{
|
66
|
+
"description": "trinary to hexadecimal",
|
67
|
+
"property": "rebase",
|
68
|
+
"input_base": 3,
|
69
|
+
"input_digits": [1, 1, 2, 0],
|
70
|
+
"output_base": 16,
|
71
|
+
"expected": [2, 10]
|
72
|
+
},
|
73
|
+
{
|
74
|
+
"description": "hexadecimal to trinary",
|
75
|
+
"property": "rebase",
|
76
|
+
"input_base": 16,
|
77
|
+
"input_digits": [2, 10],
|
78
|
+
"output_base": 3,
|
79
|
+
"expected": [1, 1, 2, 0]
|
80
|
+
},
|
81
|
+
{
|
82
|
+
"description": "15-bit integer",
|
83
|
+
"property": "rebase",
|
84
|
+
"input_base": 97,
|
85
|
+
"input_digits": [3, 46, 60],
|
86
|
+
"output_base": 73,
|
87
|
+
"expected": [6, 10, 45]
|
88
|
+
},
|
89
|
+
{
|
90
|
+
"description": "empty list",
|
91
|
+
"property": "rebase",
|
92
|
+
"input_base": 2,
|
93
|
+
"input_digits": [],
|
94
|
+
"output_base": 10,
|
95
|
+
"expected": null
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"description": "single zero",
|
99
|
+
"property": "rebase",
|
100
|
+
"input_base": 10,
|
101
|
+
"input_digits": [0],
|
102
|
+
"output_base": 2,
|
103
|
+
"expected": null
|
104
|
+
},
|
105
|
+
{
|
106
|
+
"description": "multiple zeros",
|
107
|
+
"property": "rebase",
|
108
|
+
"input_base": 10,
|
109
|
+
"input_digits": [0, 0, 0],
|
110
|
+
"output_base": 2,
|
111
|
+
"expected": null
|
112
|
+
},
|
113
|
+
{
|
114
|
+
"description": "leading zeros",
|
115
|
+
"property": "rebase",
|
116
|
+
"input_base": 7,
|
117
|
+
"input_digits": [0, 6, 0],
|
118
|
+
"output_base": 10,
|
119
|
+
"expected": null
|
120
|
+
},
|
121
|
+
{
|
122
|
+
"description": "negative digit",
|
123
|
+
"property": "rebase",
|
124
|
+
"input_base": 2,
|
125
|
+
"input_digits": [1, -1, 1, 0, 1, 0],
|
126
|
+
"output_base": 10,
|
127
|
+
"expected": null
|
128
|
+
},
|
129
|
+
{
|
130
|
+
"description": "invalid positive digit",
|
131
|
+
"property": "rebase",
|
132
|
+
"input_base": 2,
|
133
|
+
"input_digits": [1, 2, 1, 0, 1, 0],
|
134
|
+
"output_base": 10,
|
135
|
+
"expected": null
|
136
|
+
},
|
137
|
+
{
|
138
|
+
"description": "first base is one",
|
139
|
+
"property": "rebase",
|
140
|
+
"input_base": 1,
|
141
|
+
"input_digits": [],
|
142
|
+
"output_base": 10,
|
143
|
+
"expected": null
|
144
|
+
},
|
145
|
+
{
|
146
|
+
"description": "second base is one",
|
147
|
+
"property": "rebase",
|
148
|
+
"input_base": 2,
|
149
|
+
"input_digits": [1, 0, 1, 0, 1, 0],
|
150
|
+
"output_base": 1,
|
151
|
+
"expected": null
|
152
|
+
},
|
153
|
+
{
|
154
|
+
"description": "first base is zero",
|
155
|
+
"property": "rebase",
|
156
|
+
"input_base": 0,
|
157
|
+
"input_digits": [],
|
158
|
+
"output_base": 10,
|
159
|
+
"expected": null
|
160
|
+
},
|
161
|
+
{
|
162
|
+
"description": "second base is zero",
|
163
|
+
"property": "rebase",
|
164
|
+
"input_base": 10,
|
165
|
+
"input_digits": [7],
|
166
|
+
"output_base": 0,
|
167
|
+
"expected": null
|
168
|
+
},
|
169
|
+
{
|
170
|
+
"description": "first base is negative",
|
171
|
+
"property": "rebase",
|
172
|
+
"input_base": -2,
|
173
|
+
"input_digits": [1],
|
174
|
+
"output_base": 10,
|
175
|
+
"expected": null
|
176
|
+
},
|
177
|
+
{
|
178
|
+
"description": "second base is negative",
|
179
|
+
"property": "rebase",
|
180
|
+
"input_base": 2,
|
181
|
+
"input_digits": [1],
|
182
|
+
"output_base": -7,
|
183
|
+
"expected": null
|
184
|
+
},
|
185
|
+
{
|
186
|
+
"description": "both bases are negative",
|
187
|
+
"property": "rebase",
|
188
|
+
"input_base": -2,
|
189
|
+
"input_digits": [1],
|
190
|
+
"output_base": -7,
|
191
|
+
"expected": null
|
192
|
+
}
|
193
|
+
]
|
148
194
|
}
|
@@ -1,109 +1,149 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
"cases"
|
2
|
+
"exercise": "allergies",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"cases": [
|
5
|
+
{
|
6
|
+
"description": "allergicTo",
|
7
|
+
"comments": [
|
8
|
+
"Given a number and a substance, indicate whether Tom is allergic ",
|
9
|
+
"to that substance.",
|
10
|
+
"Test cases for this method involve more than one assertion.",
|
11
|
+
"Each case in 'expected' specifies what the method should return for",
|
12
|
+
"the given substance."
|
13
|
+
],
|
14
|
+
"cases": [
|
15
|
+
{
|
16
|
+
"description": "no allergies means not allergic",
|
17
|
+
"property": "allergicTo",
|
18
|
+
"score": 0,
|
19
|
+
"expected": [
|
11
20
|
{
|
12
|
-
|
13
|
-
|
14
|
-
"expected": [
|
15
|
-
{
|
16
|
-
"substance": "peanuts",
|
17
|
-
"result": false
|
18
|
-
},
|
19
|
-
{
|
20
|
-
"substance": "cats",
|
21
|
-
"result": false
|
22
|
-
},
|
23
|
-
{
|
24
|
-
"substance": "strawberries",
|
25
|
-
"result": false
|
26
|
-
}
|
27
|
-
]
|
21
|
+
"substance": "peanuts",
|
22
|
+
"result": false
|
28
23
|
},
|
29
24
|
{
|
30
|
-
|
31
|
-
|
32
|
-
"expected": [
|
33
|
-
{
|
34
|
-
"substance": "eggs",
|
35
|
-
"result": true
|
36
|
-
}
|
37
|
-
]
|
25
|
+
"substance": "cats",
|
26
|
+
"result": false
|
38
27
|
},
|
39
28
|
{
|
40
|
-
|
41
|
-
|
42
|
-
"expected": [
|
43
|
-
{
|
44
|
-
"substance": "eggs",
|
45
|
-
"result": true
|
46
|
-
},
|
47
|
-
{
|
48
|
-
"substance": "shellfish",
|
49
|
-
"result": true
|
50
|
-
},
|
51
|
-
{
|
52
|
-
"substance": "strawberries",
|
53
|
-
"result": false
|
54
|
-
}
|
55
|
-
]
|
29
|
+
"substance": "strawberries",
|
30
|
+
"result": false
|
56
31
|
}
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
"score": 0,
|
65
|
-
"expected": []
|
66
|
-
},
|
67
|
-
{
|
68
|
-
"description": "allergic to just eggs",
|
69
|
-
"score": 1,
|
70
|
-
"expected": ["eggs"]
|
71
|
-
},
|
72
|
-
{
|
73
|
-
"description": "allergic to just peanuts",
|
74
|
-
"score": 2,
|
75
|
-
"expected": ["peanuts"]
|
76
|
-
},
|
32
|
+
]
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"description": "is allergic to eggs",
|
36
|
+
"property": "allergicTo",
|
37
|
+
"score": 1,
|
38
|
+
"expected": [
|
77
39
|
{
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
"description": "allergic to more than eggs but not peanuts",
|
89
|
-
"score": 5,
|
90
|
-
"expected": ["eggs", "shellfish"]
|
91
|
-
},
|
40
|
+
"substance": "eggs",
|
41
|
+
"result": true
|
42
|
+
}
|
43
|
+
]
|
44
|
+
},
|
45
|
+
{
|
46
|
+
"description": "allergic to eggs in addition to other stuff",
|
47
|
+
"property": "allergicTo",
|
48
|
+
"score": 5,
|
49
|
+
"expected": [
|
92
50
|
{
|
93
|
-
|
94
|
-
|
95
|
-
"expected": ["strawberries", "tomatoes", "chocolate", "pollen", "cats"]
|
51
|
+
"substance": "eggs",
|
52
|
+
"result": true
|
96
53
|
},
|
97
54
|
{
|
98
|
-
|
99
|
-
|
100
|
-
"expected": ["eggs", "peanuts", "shellfish", "strawberries", "tomatoes", "chocolate", "pollen", "cats"]
|
55
|
+
"substance": "shellfish",
|
56
|
+
"result": true
|
101
57
|
},
|
102
58
|
{
|
103
|
-
|
104
|
-
|
105
|
-
"expected": ["eggs", "shellfish", "strawberries", "tomatoes", "chocolate", "pollen", "cats"]
|
59
|
+
"substance": "strawberries",
|
60
|
+
"result": false
|
106
61
|
}
|
107
|
-
|
62
|
+
]
|
63
|
+
}
|
64
|
+
]
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"description": "list",
|
68
|
+
"comments": [
|
69
|
+
"Given a number, list all things Tom is allergic to"
|
70
|
+
],
|
71
|
+
"cases": [
|
72
|
+
{
|
73
|
+
"description": "no allergies at all",
|
74
|
+
"property": "list",
|
75
|
+
"score": 0,
|
76
|
+
"expected": []
|
77
|
+
},
|
78
|
+
{
|
79
|
+
"description": "allergic to just eggs",
|
80
|
+
"property": "list",
|
81
|
+
"score": 1,
|
82
|
+
"expected": ["eggs"]
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"description": "allergic to just peanuts",
|
86
|
+
"property": "list",
|
87
|
+
"score": 2,
|
88
|
+
"expected": ["peanuts"]
|
89
|
+
},
|
90
|
+
{
|
91
|
+
"description": "allergic to just strawberries",
|
92
|
+
"property": "list",
|
93
|
+
"score": 8,
|
94
|
+
"expected": ["strawberries"]
|
95
|
+
},
|
96
|
+
{
|
97
|
+
"description": "allergic to eggs and peanuts",
|
98
|
+
"property": "list",
|
99
|
+
"score": 3,
|
100
|
+
"expected": ["eggs", "peanuts"]
|
101
|
+
},
|
102
|
+
{
|
103
|
+
"description": "allergic to more than eggs but not peanuts",
|
104
|
+
"property": "list",
|
105
|
+
"score": 5,
|
106
|
+
"expected": ["eggs", "shellfish"]
|
107
|
+
},
|
108
|
+
{
|
109
|
+
"description": "allergic to lots of stuff",
|
110
|
+
"property": "list",
|
111
|
+
"score": 248,
|
112
|
+
"expected": [ "strawberries",
|
113
|
+
"tomatoes",
|
114
|
+
"chocolate",
|
115
|
+
"pollen",
|
116
|
+
"cats"
|
117
|
+
]
|
118
|
+
},
|
119
|
+
{
|
120
|
+
"description": "allergic to everything",
|
121
|
+
"property": "list",
|
122
|
+
"score": 255,
|
123
|
+
"expected": [ "eggs",
|
124
|
+
"peanuts",
|
125
|
+
"shellfish",
|
126
|
+
"strawberries",
|
127
|
+
"tomatoes",
|
128
|
+
"chocolate",
|
129
|
+
"pollen",
|
130
|
+
"cats"
|
131
|
+
]
|
132
|
+
},
|
133
|
+
{
|
134
|
+
"description": "ignore non allergen score parts",
|
135
|
+
"property": "list",
|
136
|
+
"score": 509,
|
137
|
+
"expected": [ "eggs",
|
138
|
+
"shellfish",
|
139
|
+
"strawberries",
|
140
|
+
"tomatoes",
|
141
|
+
"chocolate",
|
142
|
+
"pollen",
|
143
|
+
"cats"
|
144
|
+
]
|
145
|
+
}
|
146
|
+
]
|
108
147
|
}
|
148
|
+
]
|
109
149
|
}
|