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,108 +1,130 @@
1
1
  {
2
- "#": [
3
- "The string argument cases possible matches are passed in as",
4
- "individual arguments rather than arrays. Languages can include",
5
- "these string argument cases if passing individual arguments is",
6
- "idiomatic in that language.",
7
- "Some tests have a \"comment\" property, which provides more",
8
- "information that could be added to the test case as a code comment."
9
- ],
10
- "cases": [
11
- {
12
- "description": "no matches",
13
- "subject": "diaper",
14
- "candidates": [ "hello", "world", "zombies", "pants"],
15
- "expected": []
16
- },
17
- {
18
- "description": "detects simple anagram",
19
- "subject": "ant",
20
- "candidates": ["tan", "stand", "at"],
21
- "expected": ["tan"]
22
- },
23
- {
24
- "description": "does not detect false positives",
25
- "subject": "galea",
26
- "candidates": ["eagle"],
27
- "expected": []
28
- },
29
- {
30
- "description": "detects multiple anagrams",
31
- "subject": "master",
32
- "candidates": ["stream", "pigeon", "maters"],
33
- "expected": ["stream", "maters"]
34
- },
35
- {
36
- "description": "does not detect anagram subsets",
37
- "subject": "good",
38
- "candidates": ["dog", "goody"],
39
- "expected": []
40
- },
41
- {
42
- "description": "detects anagram",
43
- "subject": "listen",
44
- "candidates": ["enlists", "google", "inlets", "banana"],
45
- "expected": ["inlets"]
46
- },
47
- {
48
- "description": "detects multiple anagrams",
49
- "subject": "allergy",
50
- "candidates": ["gallery", "ballerina", "regally", "clergy", "largely", "leading"],
51
- "expected": ["gallery", "regally", "largely"]
52
- },
53
- {
54
- "description": "does not detect identical words",
55
- "subject": "corn",
56
- "candidates": ["corn", "dark", "Corn", "rank", "CORN", "cron", "park"],
57
- "expected": ["cron"]
58
- },
59
- {
60
- "description": "does not detect non-anagrams with identical checksum",
61
- "subject": "mass",
62
- "candidates": ["last"],
63
- "expected": []
64
- },
65
- {
66
- "description": "detects anagrams case-insensitively",
67
- "subject": "Orchestra",
68
- "candidates": ["cashregister", "Carthorse", "radishes"],
69
- "expected": ["Carthorse"]
70
- },
71
- {
72
- "description": "detects anagrams using case-insensitive subject",
73
- "subject": "Orchestra",
74
- "candidates": ["cashregister", "carthorse", "radishes"],
75
- "expected": ["carthorse"]
76
- },
77
- {
78
- "description": "detects anagrams using case-insensitive possible matches",
79
- "subject": "orchestra",
80
- "candidates": ["cashregister", "Carthorse", "radishes"],
81
- "expected": ["Carthorse"]
82
- },
83
- {
84
- "description": "does not detect a word as its own anagram",
85
- "subject": "banana",
86
- "candidates": ["Banana"],
87
- "expected": []
88
- },
89
- {
90
- "description": "does not detect a anagram if the original word is repeated",
91
- "subject": "go",
92
- "candidates": ["go Go GO"],
93
- "expected": []
94
- },
95
- {
96
- "description": "anagrams must use all letters exactly once",
97
- "subject": "tapper",
98
- "candidates": ["patter"],
99
- "expected": []
100
- },
101
- {
102
- "description": "capital word is not own anagram",
103
- "subject": "BANANA",
104
- "candidates": ["Banana"],
105
- "expected": []
106
- }
107
- ]
2
+ "exercise": "anagram",
3
+ "version": "1.0.0",
4
+ "comments": [
5
+ "The string argument cases possible matches are passed in as",
6
+ "individual arguments rather than arrays. Languages can include",
7
+ "these string argument cases if passing individual arguments is",
8
+ "idiomatic in that language."
9
+ ],
10
+ "cases": [
11
+ {
12
+ "description": "no matches",
13
+ "property": "anagrams",
14
+ "subject": "diaper",
15
+ "candidates": ["hello", "world", "zombies", "pants"],
16
+ "expected": []
17
+ },
18
+ {
19
+ "description": "detects simple anagram",
20
+ "property": "anagrams",
21
+ "subject": "ant",
22
+ "candidates": ["tan", "stand", "at"],
23
+ "expected": ["tan"]
24
+ },
25
+ {
26
+ "description": "does not detect false positives",
27
+ "property": "anagrams",
28
+ "subject": "galea",
29
+ "candidates": ["eagle"],
30
+ "expected": []
31
+ },
32
+ {
33
+ "description": "detects multiple anagrams",
34
+ "property": "anagrams",
35
+ "subject": "master",
36
+ "candidates": ["stream", "pigeon", "maters"],
37
+ "expected": ["stream", "maters"]
38
+ },
39
+ {
40
+ "description": "does not detect anagram subsets",
41
+ "property": "anagrams",
42
+ "subject": "good",
43
+ "candidates": ["dog", "goody"],
44
+ "expected": []
45
+ },
46
+ {
47
+ "description": "detects anagram",
48
+ "property": "anagrams",
49
+ "subject": "listen",
50
+ "candidates": ["enlists", "google", "inlets", "banana"],
51
+ "expected": ["inlets"]
52
+ },
53
+ {
54
+ "description": "detects multiple anagrams",
55
+ "property": "anagrams",
56
+ "subject": "allergy",
57
+ "candidates": [ "gallery",
58
+ "ballerina",
59
+ "regally",
60
+ "clergy",
61
+ "largely",
62
+ "leading"
63
+ ],
64
+ "expected": ["gallery", "regally", "largely"]
65
+ },
66
+ {
67
+ "description": "does not detect identical words",
68
+ "property": "anagrams",
69
+ "subject": "corn",
70
+ "candidates": ["corn", "dark", "Corn", "rank", "CORN", "cron", "park"],
71
+ "expected": ["cron"]
72
+ },
73
+ {
74
+ "description": "does not detect non-anagrams with identical checksum",
75
+ "property": "anagrams",
76
+ "subject": "mass",
77
+ "candidates": ["last"],
78
+ "expected": []
79
+ },
80
+ {
81
+ "description": "detects anagrams case-insensitively",
82
+ "property": "anagrams",
83
+ "subject": "Orchestra",
84
+ "candidates": ["cashregister", "Carthorse", "radishes"],
85
+ "expected": ["Carthorse"]
86
+ },
87
+ {
88
+ "description": "detects anagrams using case-insensitive subject",
89
+ "property": "anagrams",
90
+ "subject": "Orchestra",
91
+ "candidates": ["cashregister", "carthorse", "radishes"],
92
+ "expected": ["carthorse"]
93
+ },
94
+ {
95
+ "description": "detects anagrams using case-insensitive possible matches",
96
+ "property": "anagrams",
97
+ "subject": "orchestra",
98
+ "candidates": ["cashregister", "Carthorse", "radishes"],
99
+ "expected": ["Carthorse"]
100
+ },
101
+ {
102
+ "description": "does not detect a word as its own anagram",
103
+ "property": "anagrams",
104
+ "subject": "banana",
105
+ "candidates": ["Banana"],
106
+ "expected": []
107
+ },
108
+ {
109
+ "description": "does not detect a anagram if the original word is repeated",
110
+ "property": "anagrams",
111
+ "subject": "go",
112
+ "candidates": ["go Go GO"],
113
+ "expected": []
114
+ },
115
+ {
116
+ "description": "anagrams must use all letters exactly once",
117
+ "property": "anagrams",
118
+ "subject": "tapper",
119
+ "candidates": ["patter"],
120
+ "expected": []
121
+ },
122
+ {
123
+ "description": "capital word is not own anagram",
124
+ "property": "anagrams",
125
+ "subject": "BANANA",
126
+ "candidates": ["Banana"],
127
+ "expected": []
128
+ }
129
+ ]
108
130
  }
@@ -1,77 +1,95 @@
1
- {
2
- "#": [
3
- "The tests are divided into two groups: ",
4
- "* Encoding from English to atbash cipher",
5
- "* Decoding from atbash cipher to all-lowercase-mashed-together English"
6
- ],
7
- "encode": {
8
- "description": ["Test encoding from English to atbash"],
9
- "cases": [
10
- {
11
- "description": "encode yes",
12
- "phrase": "yes",
13
- "expected": "bvh"
14
- },
15
- {
16
- "description": "encode no",
17
- "phrase": "no",
18
- "expected": "ml"
19
- },
20
- {
21
- "description": "encode OMG",
22
- "phrase": "OMG",
23
- "expected": "lnt"
24
- },
25
- {
26
- "description": "encode spaces",
27
- "phrase": "O M G",
28
- "expected": "lnt"
29
- },
30
- {
31
- "description": "encode mindblowingly",
32
- "phrase": "mindblowingly",
33
- "expected": "nrmwy oldrm tob"
34
- },
35
- {
36
- "description": "encode numbers",
37
- "phrase": "Testing,1 2 3, testing.",
38
- "expected": "gvhgr mt123 gvhgr mt"
39
- },
40
- {
41
- "description": "encode deep thought",
42
- "phrase": "Truth is fiction.",
43
- "expected": "gifgs rhurx grlm"
44
- },
45
- {
46
- "description": "encode all the letters",
47
- "phrase": "The quick brown fox jumps over the lazy dog.",
48
- "expected": "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt"
49
- }
50
- ]
1
+ {
2
+ "exercise": "atbash-cipher",
3
+ "version": "1.0.0",
4
+ "comments": [
5
+ "The tests are divided into two groups: ",
6
+ "* Encoding from English to atbash cipher",
7
+ "* Decoding from atbash cipher to all-lowercase-mashed-together English"
8
+ ],
9
+ "cases": [
10
+ {
11
+ "description": "encode",
12
+ "comments": [ "Test encoding from English to atbash" ],
13
+ "cases": [
14
+ {
15
+ "description": "encode yes",
16
+ "property": "encode",
17
+ "phrase": "yes",
18
+ "expected": "bvh"
19
+ },
20
+ {
21
+ "description": "encode no",
22
+ "property": "encode",
23
+ "phrase": "no",
24
+ "expected": "ml"
25
+ },
26
+ {
27
+ "description": "encode OMG",
28
+ "property": "encode",
29
+ "phrase": "OMG",
30
+ "expected": "lnt"
31
+ },
32
+ {
33
+ "description": "encode spaces",
34
+ "property": "encode",
35
+ "phrase": "O M G",
36
+ "expected": "lnt"
37
+ },
38
+ {
39
+ "description": "encode mindblowingly",
40
+ "property": "encode",
41
+ "phrase": "mindblowingly",
42
+ "expected": "nrmwy oldrm tob"
43
+ },
44
+ {
45
+ "description": "encode numbers",
46
+ "property": "encode",
47
+ "phrase": "Testing,1 2 3, testing.",
48
+ "expected": "gvhgr mt123 gvhgr mt"
49
+ },
50
+ {
51
+ "description": "encode deep thought",
52
+ "property": "encode",
53
+ "phrase": "Truth is fiction.",
54
+ "expected": "gifgs rhurx grlm"
55
+ },
56
+ {
57
+ "description": "encode all the letters",
58
+ "property": "encode",
59
+ "phrase": "The quick brown fox jumps over the lazy dog.",
60
+ "expected": "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt"
61
+ }
62
+ ]
51
63
  },
52
- "decode": {
53
- "description": ["Test decoding from atbash to English"],
54
- "cases": [
55
- {
56
- "description": "decode exercism",
57
- "phrase": "vcvix rhn",
58
- "expected": "exercism"
59
- },
60
- {
61
- "description": "decode a sentence",
62
- "phrase": "zmlyh gzxov rhlug vmzhg vkkrm thglm v",
63
- "expected": "anobstacleisoftenasteppingstone"
64
- },
65
- {
66
- "description": "decode numbers",
67
- "phrase": "gvhgr mt123 gvhgr mt",
68
- "expected": "testing123testing"
69
- },
70
- {
71
- "description": "decode all the letters",
72
- "phrase": "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt",
73
- "expected": "thequickbrownfoxjumpsoverthelazydog"
74
- }
75
- ]
64
+ {
65
+ "description": "decode",
66
+ "comments": [ "Test decoding from atbash to English" ],
67
+ "cases": [
68
+ {
69
+ "description": "decode exercism",
70
+ "property": "decode",
71
+ "phrase": "vcvix rhn",
72
+ "expected": "exercism"
73
+ },
74
+ {
75
+ "description": "decode a sentence",
76
+ "property": "decode",
77
+ "phrase": "zmlyh gzxov rhlug vmzhg vkkrm thglm v",
78
+ "expected": "anobstacleisoftenasteppingstone"
79
+ },
80
+ {
81
+ "description": "decode numbers",
82
+ "property": "decode",
83
+ "phrase": "gvhgr mt123 gvhgr mt",
84
+ "expected": "testing123testing"
85
+ },
86
+ {
87
+ "description": "decode all the letters",
88
+ "property": "decode",
89
+ "phrase": "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt",
90
+ "expected": "thequickbrownfoxjumpsoverthelazydog"
91
+ }
92
+ ]
76
93
  }
94
+ ]
77
95
  }
@@ -1,79 +1,96 @@
1
1
  {
2
- "decimal": [
3
- {
4
- "description": "binary 0 is decimal 0",
5
- "binary": "0",
6
- "expected": 0
7
- },
8
- {
9
- "description": "binary 1 is decimal 1",
10
- "binary": "1",
11
- "expected": 1
12
- },
13
- {
14
- "description": "binary 10 is decimal 2",
15
- "binary": "10",
16
- "expected": 2
17
- },
18
- {
19
- "description": "binary 11 is decimal 3",
20
- "binary": "11",
21
- "expected": 3
22
- },
23
- {
24
- "description": "binary 100 is decimal 4",
25
- "binary": "100",
26
- "expected": 4
27
- },
28
- {
29
- "description": "binary 1001 is decimal 9",
30
- "binary": "1001",
31
- "expected": 9
32
- },
33
- {
34
- "description": "binary 11010 is decimal 26",
35
- "binary": "11010",
36
- "expected": 26
37
- },
38
- {
39
- "description": "binary 10001101000 is decimal 1128",
40
- "binary": "10001101000",
41
- "expected": 1128
42
- },
43
- {
44
- "description": "binary ignores leading zeros",
45
- "binary": "000011111",
46
- "expected": 31
47
- },
48
- {
49
- "description": "2 is not a valid binary digit",
50
- "binary": "2",
51
- "expected": null
52
- },
53
- {
54
- "description": "a number containing a non-binary digit is invalid",
55
- "binary": "01201",
56
- "expected": null
57
- },
58
- {
59
- "description": "a number with trailing non-binary characters is invalid",
60
- "binary": "10nope",
61
- "expected": null
62
- },
63
- {
64
- "description": "a number with leading non-binary characters is invalid",
65
- "binary": "nope10",
66
- "expected": null
67
- },
68
- {
69
- "description": "a number with internal non-binary characters is invalid",
70
- "binary": "10nope10",
71
- "expected": null
72
- },
73
- {
74
- "description": "a number and a word whitespace spearated is invalid",
75
- "binary": "001 nope",
76
- "expected": null
77
- }
78
- ]
2
+ "exercise": "binary",
3
+ "version": "1.0.0",
4
+ "cases": [
5
+ {
6
+ "description": "binary 0 is decimal 0",
7
+ "property": "decimal",
8
+ "binary": "0",
9
+ "expected": 0
10
+ },
11
+ {
12
+ "description": "binary 1 is decimal 1",
13
+ "property": "decimal",
14
+ "binary": "1",
15
+ "expected": 1
16
+ },
17
+ {
18
+ "description": "binary 10 is decimal 2",
19
+ "property": "decimal",
20
+ "binary": "10",
21
+ "expected": 2
22
+ },
23
+ {
24
+ "description": "binary 11 is decimal 3",
25
+ "property": "decimal",
26
+ "binary": "11",
27
+ "expected": 3
28
+ },
29
+ {
30
+ "description": "binary 100 is decimal 4",
31
+ "property": "decimal",
32
+ "binary": "100",
33
+ "expected": 4
34
+ },
35
+ {
36
+ "description": "binary 1001 is decimal 9",
37
+ "property": "decimal",
38
+ "binary": "1001",
39
+ "expected": 9
40
+ },
41
+ {
42
+ "description": "binary 11010 is decimal 26",
43
+ "property": "decimal",
44
+ "binary": "11010",
45
+ "expected": 26
46
+ },
47
+ {
48
+ "description": "binary 10001101000 is decimal 1128",
49
+ "property": "decimal",
50
+ "binary": "10001101000",
51
+ "expected": 1128
52
+ },
53
+ {
54
+ "description": "binary ignores leading zeros",
55
+ "property": "decimal",
56
+ "binary": "000011111",
57
+ "expected": 31
58
+ },
59
+ {
60
+ "description": "2 is not a valid binary digit",
61
+ "property": "decimal",
62
+ "binary": "2",
63
+ "expected": null
64
+ },
65
+ {
66
+ "description": "a number containing a non-binary digit is invalid",
67
+ "property": "decimal",
68
+ "binary": "01201",
69
+ "expected": null
70
+ },
71
+ {
72
+ "description": "a number with trailing non-binary characters is invalid",
73
+ "property": "decimal",
74
+ "binary": "10nope",
75
+ "expected": null
76
+ },
77
+ {
78
+ "description": "a number with leading non-binary characters is invalid",
79
+ "property": "decimal",
80
+ "binary": "nope10",
81
+ "expected": null
82
+ },
83
+ {
84
+ "description": "a number with internal non-binary characters is invalid",
85
+ "property": "decimal",
86
+ "binary": "10nope10",
87
+ "expected": null
88
+ },
89
+ {
90
+ "description": "a number and a word whitespace spearated is invalid",
91
+ "property": "decimal",
92
+ "binary": "001 nope",
93
+ "expected": null
94
+ }
95
+ ]
79
96
  }