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.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/common/exercises/acronym/canonical-data.json +50 -39
  3. data/common/exercises/all-your-base/canonical-data.json +192 -146
  4. data/common/exercises/allergies/canonical-data.json +133 -93
  5. data/common/exercises/anagram/canonical-data.json +128 -106
  6. data/common/exercises/atbash-cipher/canonical-data.json +92 -74
  7. data/common/exercises/binary/canonical-data.json +94 -77
  8. data/common/exercises/bob/canonical-data.json +154 -127
  9. data/common/exercises/book-store/canonical-data.json +106 -92
  10. data/common/exercises/change/canonical-data.json +80 -68
  11. data/common/exercises/grains/canonical-data.json +75 -60
  12. data/common/exercises/hello-world/canonical-data.json +6 -6
  13. data/common/exercises/leap/canonical-data.json +28 -22
  14. data/common/exercises/luhn/canonical-data.json +16 -1
  15. data/common/exercises/pig-latin/canonical-data.json +93 -75
  16. data/common/exercises/raindrops/canonical-data.json +112 -92
  17. data/common/exercises/rna-transcription/canonical-data.json +64 -54
  18. data/common/exercises/run-length-encoding/canonical-data.json +20 -0
  19. data/common/exercises/run-length-encoding/description.md +3 -7
  20. data/common/exercises/say/canonical-data.json +98 -81
  21. data/common/exercises/scrabble-score/canonical-data.json +13 -0
  22. data/common/exercises/sieve/canonical-data.json +48 -42
  23. data/common/exercises/trinary/canonical-data.json +75 -60
  24. data/common/exercises/word-count/canonical-data.json +116 -54
  25. data/common/exercises/wordy/canonical-data.json +101 -83
  26. data/lib/trackler/version.rb +1 -1
  27. data/tracks/delphi/SETUP.md +10 -1
  28. data/tracks/delphi/config.json +8 -0
  29. data/tracks/delphi/docs/TESTS.md +4 -0
  30. data/tracks/delphi/exercises/hello-world/uTestHelloWorld.pas +49 -27
  31. data/tracks/delphi/exercises/triangle/Triangle.dpr +60 -0
  32. data/tracks/delphi/exercises/triangle/uTestTriangle.pas +186 -0
  33. data/tracks/delphi/exercises/triangle/uTriangleExample.pas +64 -0
  34. data/tracks/go/exercises/poker/poker_test.go +6 -6
  35. data/tracks/java/exercises/atbash-cipher/src/test/java/AtbashTest.java +2 -1
  36. data/tracks/scala/config.json +10 -0
  37. data/tracks/scala/exercises/variable-length-quantity/HINTS.md +2 -0
  38. data/tracks/scala/exercises/variable-length-quantity/build.sbt +3 -0
  39. data/tracks/scala/exercises/variable-length-quantity/example.scala +56 -0
  40. data/tracks/scala/exercises/variable-length-quantity/src/main/scala/VariableLengthQuantity.scala +0 -0
  41. data/tracks/scala/exercises/variable-length-quantity/src/test/scala/VariableLengthQuantityTest.scala +162 -0
  42. data/tracks/scala/testgen/src/main/scala/VariableLengthQuantityTestGenerator.scala +80 -0
  43. data/tracks/typescript/common/package.json +6 -7
  44. data/tracks/typescript/common/yarn.lock +422 -380
  45. data/tracks/typescript/config.json +12 -0
  46. data/tracks/typescript/exercises/anagram/package.json +6 -7
  47. data/tracks/typescript/exercises/anagram/yarn.lock +422 -380
  48. data/tracks/typescript/exercises/beer-song/package.json +6 -7
  49. data/tracks/typescript/exercises/beer-song/yarn.lock +422 -380
  50. data/tracks/typescript/exercises/bob/package.json +6 -7
  51. data/tracks/typescript/exercises/bob/yarn.lock +422 -380
  52. data/tracks/typescript/exercises/food-chain/package.json +6 -7
  53. data/tracks/typescript/exercises/food-chain/yarn.lock +422 -380
  54. data/tracks/typescript/exercises/gigasecond/package.json +6 -7
  55. data/tracks/typescript/exercises/gigasecond/yarn.lock +422 -380
  56. data/tracks/typescript/exercises/grade-school/grade-school.example.ts +31 -0
  57. data/tracks/typescript/exercises/grade-school/grade-school.test.ts +81 -0
  58. data/tracks/typescript/exercises/grade-school/package.json +36 -0
  59. data/tracks/typescript/exercises/grade-school/tsconfig.json +21 -0
  60. data/tracks/typescript/exercises/grade-school/tslint.json +127 -0
  61. data/tracks/typescript/exercises/grade-school/yarn.lock +2739 -0
  62. data/tracks/typescript/exercises/hamming/package.json +6 -7
  63. data/tracks/typescript/exercises/hamming/yarn.lock +422 -380
  64. data/tracks/typescript/exercises/hello-world/package.json +6 -7
  65. data/tracks/typescript/exercises/hello-world/yarn.lock +422 -380
  66. data/tracks/typescript/exercises/leap/package.json +6 -7
  67. data/tracks/typescript/exercises/leap/yarn.lock +422 -380
  68. data/tracks/typescript/exercises/pangram/package.json +6 -7
  69. data/tracks/typescript/exercises/pangram/yarn.lock +422 -380
  70. data/tracks/typescript/exercises/phone-number/package.json +6 -7
  71. data/tracks/typescript/exercises/phone-number/yarn.lock +422 -380
  72. data/tracks/typescript/exercises/rna-transcription/package.json +6 -7
  73. data/tracks/typescript/exercises/rna-transcription/yarn.lock +422 -380
  74. data/tracks/typescript/exercises/robot-name/package.json +36 -0
  75. data/tracks/typescript/exercises/robot-name/robot-name.example.ts +36 -0
  76. data/tracks/typescript/exercises/robot-name/robot-name.test.ts +86 -0
  77. data/tracks/typescript/exercises/robot-name/tsconfig.json +21 -0
  78. data/tracks/typescript/exercises/robot-name/tslint.json +127 -0
  79. data/tracks/typescript/exercises/robot-name/yarn.lock +2739 -0
  80. data/tracks/typescript/exercises/say/package.json +6 -7
  81. data/tracks/typescript/exercises/say/yarn.lock +422 -380
  82. data/tracks/typescript/exercises/word-count/package.json +6 -7
  83. data/tracks/typescript/exercises/word-count/yarn.lock +422 -380
  84. data/tracks/typescript/exercises/wordy/package.json +6 -7
  85. data/tracks/typescript/exercises/wordy/yarn.lock +422 -380
  86. metadata +23 -2
@@ -1,131 +1,149 @@
1
1
  {
2
- "#" : [
3
- "In languages with parameterized tests, test cases are grouped together into similar cases with",
4
- "test names or comments to describe the group. Other languages just name the individual tests."
5
- ],
6
- "groups" : [
2
+ "exercise": "pig-latin",
3
+ "version": "1.0.0",
4
+ "cases": [
7
5
  {
8
- "description" : "ay is added to words that start with vowels",
9
- "cases" : [
6
+ "description": "ay is added to words that start with vowels",
7
+ "cases": [
10
8
  {
11
- "description" : "word beginning with a",
12
- "input" : "apple",
13
- "expected" : "appleay"
9
+ "description": "word beginning with a",
10
+ "property": "translate",
11
+ "input": "apple",
12
+ "expected": "appleay"
14
13
  },
15
14
  {
16
- "description" : "word beginning with e",
17
- "input" : "ear",
18
- "expected" : "earay"
15
+ "description": "word beginning with e",
16
+ "property": "translate",
17
+ "input": "ear",
18
+ "expected": "earay"
19
19
  },
20
20
  {
21
- "description" : "word beginning with i",
22
- "input" : "igloo",
23
- "expected" : "iglooay"
21
+ "description": "word beginning with i",
22
+ "property": "translate",
23
+ "input": "igloo",
24
+ "expected": "iglooay"
24
25
  },
25
26
  {
26
- "description" : "word beginning with o",
27
- "input" : "object",
28
- "expected" : "objectay"
27
+ "description": "word beginning with o",
28
+ "property": "translate",
29
+ "input": "object",
30
+ "expected": "objectay"
29
31
  },
30
32
  {
31
- "description" : "word beginning with u",
32
- "input" : "under",
33
- "expected" : "underay"
33
+ "description": "word beginning with u",
34
+ "property": "translate",
35
+ "input": "under",
36
+ "expected": "underay"
34
37
  },
35
38
  {
36
- "description" : "word beginning with a vowel and followed by a qu",
37
- "input" : "equal",
38
- "expected" : "equalay"
39
+ "description": "word beginning with a vowel and followed by a qu",
40
+ "property": "translate",
41
+ "input": "equal",
42
+ "expected": "equalay"
39
43
  }
40
44
  ]
41
45
  },
42
46
  {
43
- "description" : "first letter and ay are moved to the end of words that start with consonants",
44
- "cases" : [
47
+ "description": "first letter and ay are moved to the end of words that start with consonants",
48
+ "cases": [
45
49
  {
46
- "description" : "word beginning with p",
47
- "input" : "pig",
48
- "expected" : "igpay"
50
+ "description": "word beginning with p",
51
+ "property": "translate",
52
+ "input": "pig",
53
+ "expected": "igpay"
49
54
  },
50
55
  {
51
- "description" : "word beginning with k",
52
- "input" : "koala",
53
- "expected" : "oalakay"
56
+ "description": "word beginning with k",
57
+ "property": "translate",
58
+ "input": "koala",
59
+ "expected": "oalakay"
54
60
  },
55
61
  {
56
- "description" : "word beginning with y",
57
- "input" : "yellow",
58
- "expected" : "ellowyay"
62
+ "description": "word beginning with y",
63
+ "property": "translate",
64
+ "input": "yellow",
65
+ "expected": "ellowyay"
59
66
  },
60
67
  {
61
- "description" : "word beginning with x",
62
- "input" : "xenon",
63
- "expected" : "enonxay"
68
+ "description": "word beginning with x",
69
+ "property": "translate",
70
+ "input": "xenon",
71
+ "expected": "enonxay"
64
72
  },
65
73
  {
66
- "description" : "word beginning with q without a following u",
67
- "input" : "qat",
68
- "expected" : "atqay"
74
+ "description": "word beginning with q without a following u",
75
+ "property": "translate",
76
+ "input": "qat",
77
+ "expected": "atqay"
69
78
  }
70
79
  ]
71
80
  },
72
81
  {
73
- "description" : "some letter clusters are treated like a single consonant",
74
- "cases" : [
82
+ "description": "some letter clusters are treated like a single consonant",
83
+ "cases": [
75
84
  {
76
- "description" : "word beginning with ch",
77
- "input" : "chair",
78
- "expected" : "airchay"
85
+ "description": "word beginning with ch",
86
+ "property": "translate",
87
+ "input": "chair",
88
+ "expected": "airchay"
79
89
  },
80
90
  {
81
- "description" : "word beginning with qu",
82
- "input" : "queen",
83
- "expected" : "eenquay"
91
+ "description": "word beginning with qu",
92
+ "property": "translate",
93
+ "input": "queen",
94
+ "expected": "eenquay"
84
95
  },
85
96
  {
86
- "description" : "word beginning with qu and a preceding consonant",
87
- "input" : "square",
88
- "expected" : "aresquay"
97
+ "description": "word beginning with qu and a preceding consonant",
98
+ "property": "translate",
99
+ "input": "square",
100
+ "expected": "aresquay"
89
101
  },
90
102
  {
91
- "description" : "word beginning with th",
92
- "input" : "therapy",
93
- "expected" : "erapythay"
103
+ "description": "word beginning with th",
104
+ "property": "translate",
105
+ "input": "therapy",
106
+ "expected": "erapythay"
94
107
  },
95
108
  {
96
- "description" : "word beginning with thr",
97
- "input" : "thrush",
98
- "expected" : "ushthray"
109
+ "description": "word beginning with thr",
110
+ "property": "translate",
111
+ "input": "thrush",
112
+ "expected": "ushthray"
99
113
  },
100
114
  {
101
- "description" : "word beginning with sch",
102
- "input" : "school",
103
- "expected" : "oolschay"
115
+ "description": "word beginning with sch",
116
+ "property": "translate",
117
+ "input": "school",
118
+ "expected": "oolschay"
104
119
  }
105
120
  ]
106
121
  },
107
122
  {
108
- "description" : "some letter clusters are treated like a single vowel",
109
- "cases" : [
123
+ "description": "some letter clusters are treated like a single vowel",
124
+ "cases": [
110
125
  {
111
- "description" : "word beginning with yt",
112
- "input" : "yttria",
113
- "expected" : "yttriaay"
126
+ "description": "word beginning with yt",
127
+ "property": "translate",
128
+ "input": "yttria",
129
+ "expected": "yttriaay"
114
130
  },
115
131
  {
116
- "description" : "word beginning with xr",
117
- "input" : "xray",
118
- "expected" : "xrayay"
132
+ "description": "word beginning with xr",
133
+ "property": "translate",
134
+ "input": "xray",
135
+ "expected": "xrayay"
119
136
  }
120
137
  ]
121
138
  },
122
139
  {
123
- "description" : "phrases are translated",
124
- "cases" : [
140
+ "description": "phrases are translated",
141
+ "cases": [
125
142
  {
126
- "description" : "a whole phrase",
127
- "input" : "quick fast run",
128
- "expected" : "ickquay astfay unray"
143
+ "description": "a whole phrase",
144
+ "property": "translate",
145
+ "input": "quick fast run",
146
+ "expected": "ickquay astfay unray"
129
147
  }
130
148
  ]
131
149
  }
@@ -1,94 +1,114 @@
1
1
  {
2
- "cases": [
3
- {
4
- "description" : "the sound for 1 is 1",
5
- "number" : 1,
6
- "expected": "1"
7
- },
8
- {
9
- "description" : "the sound for 3 is Pling",
10
- "number" : 3,
11
- "expected": "Pling"
12
- },
13
- {
14
- "description" : "the sound for 5 is Plang",
15
- "number" : 5,
16
- "expected": "Plang"
17
- },
18
- {
19
- "description" : "the sound for 7 is Plong",
20
- "number" : 7,
21
- "expected": "Plong"
22
- },
23
- {
24
- "description" : "the sound for 6 is Pling as it has a factor 3",
25
- "number" : 6,
26
- "expected": "Pling"
27
- },
28
- {
29
- "description" : "2 to the power 3 does not make a raindrop sound as 3 is the exponent not the base",
30
- "number" : 8,
31
- "expected": "8"
32
- },
33
- {
34
- "description" : "the sound for 9 is Pling as it has a factor 3",
35
- "number" : 9,
36
- "expected": "Pling"
37
- },
38
- {
39
- "description" : "the sound for 10 is Plang as it has a factor 5",
40
- "number" : 10,
41
- "expected": "Plang"
42
- },
43
- {
44
- "description" : "the sound for 14 is Plong as it has a factor of 7",
45
- "number" : 14,
46
- "expected": "Plong"
47
- },
48
- {
49
- "description" : "the sound for 15 is PlingPlang as it has factors 3 and 5",
50
- "number" : 15,
51
- "expected": "PlingPlang"
52
- },
53
- {
54
- "description" : "the sound for 21 is PlingPlong as it has factors 3 and 7",
55
- "number" : 21,
56
- "expected": "PlingPlong"
57
- },
58
- {
59
- "description" : "the sound for 25 is Plang as it has a factor 5",
60
- "number" : 25,
61
- "expected": "Plang"
62
- },
63
- {
64
- "description" : "the sound for 27 is Pling as it has a factor 3",
65
- "number" : 27,
66
- "expected": "Pling"
67
- },
68
- {
69
- "description" : "the sound for 35 is PlangPlong as it has factors 5 and 7",
70
- "number" : 35,
71
- "expected": "PlangPlong"
72
- },
73
- {
74
- "description" : "the sound for 49 is Plong as it has a factor 7",
75
- "number" : 49,
76
- "expected": "Plong"
77
- },
78
- {
79
- "description" : "the sound for 52 is 52",
80
- "number" : 52,
81
- "expected": "52"
82
- },
83
- {
84
- "description" : "the sound for 105 is PlingPlangPlong as it has factors 3, 5 and 7",
85
- "number" : 105,
86
- "expected": "PlingPlangPlong"
87
- },
88
- {
89
- "description" : "the sound for 3125 is Plang as it has a factor 5",
90
- "number" : 3125,
91
- "expected": "Plang"
92
- }
93
- ]
2
+ "exercise": "raindrops",
3
+ "version": "1.0.0",
4
+ "cases": [
5
+ {
6
+ "description": "the sound for 1 is 1",
7
+ "property": "convert",
8
+ "number": 1,
9
+ "expected": "1"
10
+ },
11
+ {
12
+ "description": "the sound for 3 is Pling",
13
+ "property": "convert",
14
+ "number": 3,
15
+ "expected": "Pling"
16
+ },
17
+ {
18
+ "description": "the sound for 5 is Plang",
19
+ "property": "convert",
20
+ "number": 5,
21
+ "expected": "Plang"
22
+ },
23
+ {
24
+ "description": "the sound for 7 is Plong",
25
+ "property": "convert",
26
+ "number": 7,
27
+ "expected": "Plong"
28
+ },
29
+ {
30
+ "description": "the sound for 6 is Pling as it has a factor 3",
31
+ "property": "convert",
32
+ "number": 6,
33
+ "expected": "Pling"
34
+ },
35
+ {
36
+ "description": "2 to the power 3 does not make a raindrop sound as 3 is the exponent not the base",
37
+ "property": "convert",
38
+ "number": 8,
39
+ "expected": "8"
40
+ },
41
+ {
42
+ "description": "the sound for 9 is Pling as it has a factor 3",
43
+ "property": "convert",
44
+ "number": 9,
45
+ "expected": "Pling"
46
+ },
47
+ {
48
+ "description": "the sound for 10 is Plang as it has a factor 5",
49
+ "property": "convert",
50
+ "number": 10,
51
+ "expected": "Plang"
52
+ },
53
+ {
54
+ "description": "the sound for 14 is Plong as it has a factor of 7",
55
+ "property": "convert",
56
+ "number": 14,
57
+ "expected": "Plong"
58
+ },
59
+ {
60
+ "description": "the sound for 15 is PlingPlang as it has factors 3 and 5",
61
+ "property": "convert",
62
+ "number": 15,
63
+ "expected": "PlingPlang"
64
+ },
65
+ {
66
+ "description": "the sound for 21 is PlingPlong as it has factors 3 and 7",
67
+ "property": "convert",
68
+ "number": 21,
69
+ "expected": "PlingPlong"
70
+ },
71
+ {
72
+ "description": "the sound for 25 is Plang as it has a factor 5",
73
+ "property": "convert",
74
+ "number": 25,
75
+ "expected": "Plang"
76
+ },
77
+ {
78
+ "description": "the sound for 27 is Pling as it has a factor 3",
79
+ "property": "convert",
80
+ "number": 27,
81
+ "expected": "Pling"
82
+ },
83
+ {
84
+ "description": "the sound for 35 is PlangPlong as it has factors 5 and 7",
85
+ "property": "convert",
86
+ "number": 35,
87
+ "expected": "PlangPlong"
88
+ },
89
+ {
90
+ "description": "the sound for 49 is Plong as it has a factor 7",
91
+ "property": "convert",
92
+ "number": 49,
93
+ "expected": "Plong"
94
+ },
95
+ {
96
+ "description": "the sound for 52 is 52",
97
+ "property": "convert",
98
+ "number": 52,
99
+ "expected": "52"
100
+ },
101
+ {
102
+ "description": "the sound for 105 is PlingPlangPlong as it has factors 3, 5 and 7",
103
+ "property": "convert",
104
+ "number": 105,
105
+ "expected": "PlingPlangPlong"
106
+ },
107
+ {
108
+ "description": "the sound for 3125 is Plang as it has a factor 5",
109
+ "property": "convert",
110
+ "number": 3125,
111
+ "expected": "Plang"
112
+ }
113
+ ]
94
114
  }
@@ -1,56 +1,66 @@
1
1
  {
2
- "#": [
3
- "Language implementations vary on the issue of invalid input data.",
4
- "A language may elect to simplify this task by only presenting valid",
5
- "test cases. For languages handling invalid input data as",
6
- "error conditions, invalid test cases are included here and are",
7
- "indicated with an expected value of null. Note however that null is",
8
- "simply an indication here in the JSON. Actually returning null from",
9
- "a rna-transcription function may or may not be idiomatic in a language.",
10
- "Language idioms of errors or exceptions should be followed.",
11
- "Alternative interpretations such as ignoring excess length at the end",
12
- "are not represented here."
13
- ],
14
- "cases": [
15
- {
16
- "description": "rna complement of cytosine is guanine",
17
- "dna" : "C",
18
- "expected": "G"
19
- },
20
- {
21
- "description": "rna complement of guanine is cytosine",
22
- "dna": "G",
23
- "expected": "C"
24
- },
25
- {
26
- "description": "rna complement of thymine is adenine",
27
- "dna": "T",
28
- "expected": "A"
29
- },
30
- {
31
- "description": "rna complement of adenine is uracil",
32
- "dna": "A",
33
- "expected": "U"
34
- },
35
- {
36
- "description": "rna complement",
37
- "dna": "ACGTGGTCTTAA",
38
- "expected": "UGCACCAGAAUU"
39
- },
40
- {
41
- "description": "dna correctly handles invalid input",
42
- "dna": "U",
43
- "expected": null
44
- },
45
- {
46
- "description": "dna correctly handles completely invalid input",
47
- "dna": "XXX",
48
- "expected": null
49
- },
50
- {
51
- "description": "dna correctly handles partially invalid input",
52
- "dna": "ACGTXXXCTTAA",
53
- "expected": null
54
- }
55
- ]
2
+ "exercise": "rna-transcription",
3
+ "version": "1.0.0",
4
+ "comments": [
5
+ "Language implementations vary on the issue of invalid input data.",
6
+ "A language may elect to simplify this task by only presenting valid",
7
+ "test cases. For languages handling invalid input data as",
8
+ "error conditions, invalid test cases are included here and are",
9
+ "indicated with an expected value of null. Note however that null is",
10
+ "simply an indication here in the JSON. Actually returning null from",
11
+ "a rna-transcription function may or may not be idiomatic in a language.",
12
+ "Language idioms of errors or exceptions should be followed.",
13
+ "Alternative interpretations such as ignoring excess length at the end",
14
+ "are not represented here."
15
+ ],
16
+ "cases": [
17
+ {
18
+ "description": "rna complement of cytosine is guanine",
19
+ "property": "toRna",
20
+ "dna": "C",
21
+ "expected": "G"
22
+ },
23
+ {
24
+ "description": "rna complement of guanine is cytosine",
25
+ "property": "toRna",
26
+ "dna": "G",
27
+ "expected": "C"
28
+ },
29
+ {
30
+ "description": "rna complement of thymine is adenine",
31
+ "property": "toRna",
32
+ "dna": "T",
33
+ "expected": "A"
34
+ },
35
+ {
36
+ "description": "rna complement of adenine is uracil",
37
+ "property": "toRna",
38
+ "dna": "A",
39
+ "expected": "U"
40
+ },
41
+ {
42
+ "description": "rna complement",
43
+ "property": "toRna",
44
+ "dna": "ACGTGGTCTTAA",
45
+ "expected": "UGCACCAGAAUU"
46
+ },
47
+ {
48
+ "description": "dna correctly handles invalid input",
49
+ "property": "toRna",
50
+ "dna": "U",
51
+ "expected": null
52
+ },
53
+ {
54
+ "description": "dna correctly handles completely invalid input",
55
+ "property": "toRna",
56
+ "dna": "XXX",
57
+ "expected": null
58
+ },
59
+ {
60
+ "description": "dna correctly handles partially invalid input",
61
+ "property": "toRna",
62
+ "dna": "ACGTXXXCTTAA",
63
+ "expected": null
64
+ }
65
+ ]
56
66
  }