Skip to content

Commit d810bd2

Browse files
authored
Updating Fork (#2)
* prime-factors: add canonical data (exercism#513) * etl: Add canonical data (exercism#507) Add ETL exercise canonical data
1 parent e3e9443 commit d810bd2

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

exercises/etl/canonical-data.json

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"transform": {
3+
"#": [
4+
"Note: The expected input data for these tests should have",
5+
"integer keys (not stringified numbers as shown in the JSON below",
6+
"Unless the language prohibits that, please implement these tests",
7+
"such that keys are integers. e.g. in JavaScript, it might look ",
8+
"like `transform( { 1: ['A'] } );`"
9+
],
10+
"description": "transforms the a set of scrabble data previously indexed by the tile score to a set of data indexed by the tile letter",
11+
"cases": [
12+
{
13+
"description": "a single letter",
14+
"input": {
15+
"1": ["A"]
16+
},
17+
"expected": {
18+
"a" : 1
19+
}
20+
},
21+
{
22+
"description": "single score with multiple letters",
23+
"input": {
24+
"1": ["A", "E", "I", "O", "U" ]
25+
},
26+
"expected": {
27+
"a" : 1,
28+
"e" : 1,
29+
"i" : 1,
30+
"o" : 1,
31+
"u" : 1
32+
}
33+
},
34+
{
35+
"description": "multiple scores with multiple letters",
36+
"input": {
37+
"1": ["A", "E"],
38+
"2": ["D", "G"]
39+
},
40+
"expected": {
41+
"a" : 1,
42+
"e" : 1,
43+
"d" : 2,
44+
"g" : 2
45+
}
46+
},
47+
{
48+
"description": "multiple scores with differing numbers of letters",
49+
"input": {
50+
"1": [ "A", "E", "I", "O", "U", "L", "N", "R", "S", "T" ],
51+
"2": [ "D", "G" ],
52+
"3": [ "B", "C", "M", "P" ],
53+
"4": [ "F", "H", "V", "W", "Y" ],
54+
"5": [ "K" ],
55+
"8": [ "J", "X" ],
56+
"10": [ "Q", "Z" ]
57+
},
58+
"expected": {
59+
"a": 1, "b": 3, "c": 3, "d": 2, "e": 1,
60+
"f": 4, "g": 2, "h": 4, "i": 1, "j": 8,
61+
"k": 5, "l": 1, "m": 3, "n": 1, "o": 1,
62+
"p": 3, "q": 10, "r": 1, "s": 1, "t": 1,
63+
"u": 1, "v": 4, "w": 4, "x": 8, "y": 4,
64+
"z": 10
65+
}
66+
}
67+
]
68+
}
69+
}

0 commit comments

Comments
 (0)