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
@@ -21,6 +21,16 @@
21
21
  "description": "single characters mixed with repeated characters",
22
22
  "input": "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB",
23
23
  "expected": "12WB12W3B24WB"
24
+ },
25
+ {
26
+ "description": "multiple whitespace mixed in string",
27
+ "input": " hsqq qww ",
28
+ "expected": "2 hs2q q2w2 "
29
+ },
30
+ {
31
+ "description": "lowercase characters",
32
+ "input": "aabbbcccc",
33
+ "expected": "2a3b4c"
24
34
  }
25
35
  ]
26
36
  },
@@ -46,6 +56,16 @@
46
56
  "description": "single characters with repeated characters",
47
57
  "input": "12WB12W3B24WB",
48
58
  "expected": "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB"
59
+ },
60
+ {
61
+ "description": "multiple whitespace mixed in string",
62
+ "input": "2 hs2q q2w2 ",
63
+ "expected": " hsqq qww "
64
+ },
65
+ {
66
+ "description": "lower case string",
67
+ "input": "2a3b4c",
68
+ "expected": "aabbbcccc"
49
69
  }
50
70
  ]
51
71
  },
@@ -14,11 +14,7 @@ the compressed data, which makes it a lossless data compression.
14
14
  "AABCCCDEEEE" -> "2AB3CD4E" -> "AABCCCDEEEE"
15
15
  ```
16
16
 
17
- If the string contains any whitespace, it should be passed through unchanged:
18
-
19
- ```
20
- "aabc dddef" -> "2abc 3def"
21
- ```
22
-
23
17
  For simplicity, you can assume that the unencoded string will only contain
24
- the letters A through Z (either lower or uppercase) and whitespace.
18
+ the letters A through Z (either lower or upper case) and whitespace. This way
19
+ data to be encoded will never contain any numbers and numbers inside data to
20
+ be decoded always represent the count for the following character.
@@ -1,83 +1,100 @@
1
1
  {
2
- "#": [
3
- "Here -1 is used as expected value to indicate that the",
4
- "input value is out of the range described in the exercise."
5
- ],
6
- "cases": [
7
- {
8
- "description": "zero",
9
- "input": 0,
10
- "expected": "zero"
11
- },
12
- {
13
- "description": "one",
14
- "input": 1,
15
- "expected": "one"
16
- },
17
- {
18
- "description": "fourteen",
19
- "input": 14,
20
- "expected": "fourteen"
21
- },
22
- {
23
- "description": "twenty",
24
- "input": 20,
25
- "expected": "twenty"
26
- },
27
- {
28
- "description": "twenty-two",
29
- "input": 22,
30
- "expected": "twenty-two"
31
- },
32
- {
33
- "description": "one hundred",
34
- "input": 100,
35
- "expected": "one hundred"
36
- },
37
- {
38
- "description": "one hundred twenty-three",
39
- "input": 123,
40
- "expected": "one hundred twenty-three"
41
- },
42
- {
43
- "description": "one thousand",
44
- "input": 1000,
45
- "expected": "one thousand"
46
- },
47
- {
48
- "description": "one thousand two hundred thirty-four",
49
- "input": 1234,
50
- "expected": "one thousand two hundred thirty-four"
51
- },
52
- {
53
- "description": "one million",
54
- "input": 1000000,
55
- "expected": "one million"
56
- },
57
- {
58
- "description": "one million two thousand three hundred forty-five",
59
- "input": 1002345,
60
- "expected": "one million two thousand three hundred forty-five"
61
- },
62
- {
63
- "description": "one billion",
64
- "input": 1000000000,
65
- "expected": "one billion"
66
- },
67
- {
68
- "description": "a big number",
69
- "input": 987654321123,
70
- "expected": "nine hundred eighty-seven billion six hundred fifty-four million three hundred twenty-one thousand one hundred twenty-three"
71
- },
72
- {
73
- "description": "numbers below zero are out of range",
74
- "input": -1,
75
- "expected": -1
76
- },
77
- {
78
- "description": "numbers above 999,999,999,999 are out of range",
79
- "input": 1000000000000,
80
- "expected": -1
81
- }
82
- ]
2
+ "exercise": "say",
3
+ "version": "1.0.0",
4
+ "comments": [
5
+ "Here -1 is used as expected value to indicate that the",
6
+ "input value is out of the range described in the exercise."
7
+ ],
8
+ "cases": [
9
+ {
10
+ "description": "zero",
11
+ "property": "say",
12
+ "input": 0,
13
+ "expected": "zero"
14
+ },
15
+ {
16
+ "description": "one",
17
+ "property": "say",
18
+ "input": 1,
19
+ "expected": "one"
20
+ },
21
+ {
22
+ "description": "fourteen",
23
+ "property": "say",
24
+ "input": 14,
25
+ "expected": "fourteen"
26
+ },
27
+ {
28
+ "description": "twenty",
29
+ "property": "say",
30
+ "input": 20,
31
+ "expected": "twenty"
32
+ },
33
+ {
34
+ "description": "twenty-two",
35
+ "property": "say",
36
+ "input": 22,
37
+ "expected": "twenty-two"
38
+ },
39
+ {
40
+ "description": "one hundred",
41
+ "property": "say",
42
+ "input": 100,
43
+ "expected": "one hundred"
44
+ },
45
+ {
46
+ "description": "one hundred twenty-three",
47
+ "property": "say",
48
+ "input": 123,
49
+ "expected": "one hundred twenty-three"
50
+ },
51
+ {
52
+ "description": "one thousand",
53
+ "property": "say",
54
+ "input": 1000,
55
+ "expected": "one thousand"
56
+ },
57
+ {
58
+ "description": "one thousand two hundred thirty-four",
59
+ "property": "say",
60
+ "input": 1234,
61
+ "expected": "one thousand two hundred thirty-four"
62
+ },
63
+ {
64
+ "description": "one million",
65
+ "property": "say",
66
+ "input": 1000000,
67
+ "expected": "one million"
68
+ },
69
+ {
70
+ "description": "one million two thousand three hundred forty-five",
71
+ "property": "say",
72
+ "input": 1002345,
73
+ "expected": "one million two thousand three hundred forty-five"
74
+ },
75
+ {
76
+ "description": "one billion",
77
+ "property": "say",
78
+ "input": 1000000000,
79
+ "expected": "one billion"
80
+ },
81
+ {
82
+ "description": "a big number",
83
+ "property": "say",
84
+ "input": 987654321123,
85
+ "expected": "nine hundred eighty-seven billion six hundred fifty-four million three hundred twenty-one thousand one hundred twenty-three"
86
+ },
87
+ {
88
+ "description": "numbers below zero are out of range",
89
+ "property": "say",
90
+ "input": -1,
91
+ "expected": -1
92
+ },
93
+ {
94
+ "description": "numbers above 999,999,999,999 are out of range",
95
+ "property": "say",
96
+ "input": 1000000000000,
97
+ "expected": -1
98
+ }
99
+ ]
83
100
  }
@@ -1,57 +1,70 @@
1
1
  {
2
+ "exercise": "scrabble-score",
3
+ "version": "1.0.0",
2
4
  "cases": [
3
5
  {
4
6
  "description": "lowercase letter",
7
+ "property": "score",
5
8
  "input": "a",
6
9
  "expected": 1
7
10
  },
8
11
  {
9
12
  "description": "uppercase letter",
13
+ "property": "score",
10
14
  "input": "A",
11
15
  "expected": 1
12
16
  },
13
17
  {
14
18
  "description": "valuable letter",
19
+ "property": "score",
15
20
  "input": "f",
16
21
  "expected": 4
17
22
  },
18
23
  {
19
24
  "description": "short word",
25
+ "property": "score",
20
26
  "input": "at",
21
27
  "expected": 2
22
28
  },
23
29
  {
24
30
  "description": "short, valuable word",
31
+ "property": "score",
25
32
  "input": "zoo",
26
33
  "expected": 12
27
34
  },
28
35
  {
29
36
  "description": "medium word",
37
+ "property": "score",
30
38
  "input": "street",
31
39
  "expected": 6
32
40
  },
33
41
  {
34
42
  "description": "medium, valuable word",
43
+ "property": "score",
35
44
  "input": "quirky",
36
45
  "expected": 22
37
46
  },
38
47
  {
39
48
  "description": "long, mixed-case word",
49
+ "property": "score",
40
50
  "input": "OxyphenButazone",
41
51
  "expected": 41
42
52
  },
43
53
  {
44
54
  "description": "english-like word",
55
+ "property": "score",
45
56
  "input": "pinata",
46
57
  "expected": 8
47
58
  },
48
59
  {
49
60
  "description": "empty input",
61
+ "property": "score",
50
62
  "input": "",
51
63
  "expected": 0
52
64
  },
53
65
  {
54
66
  "description": "entire alphabet available",
67
+ "property": "score",
55
68
  "input": "abcdefghijklmnopqrstuvwxyz",
56
69
  "expected": 87
57
70
  }
@@ -1,43 +1,49 @@
1
- {
2
- "cases": [
3
- {
4
- "description": "no primes under two",
5
- "limit": 1,
6
- "expected": []
7
- },
8
- {
9
- "description": "find first prime",
10
- "limit": 2,
11
- "expected": [ 2 ]
12
- },
13
- {
14
- "description": "find primes up to 10",
15
- "limit": 10,
16
- "expected": [ 2, 3, 5, 7 ]
17
- },
18
- {
19
- "description": "limit is prime",
20
- "limit": 13,
21
- "expected": [ 2, 3, 5, 7, 11, 13 ]
22
- },
23
- {
24
- "description": "find primes up to 1000",
25
- "limit": 1000,
26
- "expected": [
27
- 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59,
28
- 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127,
29
- 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193,
30
- 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269,
31
- 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349,
32
- 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431,
33
- 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503,
34
- 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599,
35
- 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673,
36
- 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761,
37
- 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857,
38
- 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947,
39
- 953, 967, 971, 977, 983, 991, 997
40
- ]
41
- }
42
- ]
1
+ {
2
+ "exercise": "sieve",
3
+ "version": "1.0.0",
4
+ "cases": [
5
+ {
6
+ "description": "no primes under two",
7
+ "property": "primes",
8
+ "limit": 1,
9
+ "expected": []
10
+ },
11
+ {
12
+ "description": "find first prime",
13
+ "property": "primes",
14
+ "limit": 2,
15
+ "expected": [2]
16
+ },
17
+ {
18
+ "description": "find primes up to 10",
19
+ "property": "primes",
20
+ "limit": 10,
21
+ "expected": [2, 3, 5, 7]
22
+ },
23
+ {
24
+ "description": "limit is prime",
25
+ "property": "primes",
26
+ "limit": 13,
27
+ "expected": [2, 3, 5, 7, 11, 13]
28
+ },
29
+ {
30
+ "description": "find primes up to 1000",
31
+ "property": "primes",
32
+ "limit": 1000,
33
+ "expected": [
34
+ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43,
35
+ 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107,
36
+ 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181,
37
+ 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263,
38
+ 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349,
39
+ 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433,
40
+ 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521,
41
+ 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613,
42
+ 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701,
43
+ 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809,
44
+ 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887,
45
+ 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997
46
+ ]
47
+ }
48
+ ]
43
49
  }
@@ -1,62 +1,77 @@
1
1
  {
2
- "to_decimal": {
3
- "description": "returns the decimal representation of the input trinary value",
4
- "cases": [
5
- {
6
- "description": "trinary 1 is decimal 1",
7
- "input": 1,
8
- "expected": 1
9
- },
10
- {
11
- "description": "trinary 2 is decimal 2",
12
- "input": 2,
13
- "expected": 2
14
- },
15
- {
16
- "description": "trinary 10 is decimal 3",
17
- "input": 10,
18
- "expected": 3
19
- },
20
- {
21
- "description": "trinary 11 is decimal 4",
22
- "input": 11,
23
- "expected": 4
24
- },
25
- {
26
- "description": "trinary 100 is decimal 9",
27
- "input": 100,
28
- "expected": 9
29
- },
30
- {
31
- "description": "trinary 112 is decimal 14",
32
- "input": 112,
33
- "expected": 14
34
- },
35
- {
36
- "description": "trinary 222 is decimal 26",
37
- "input": 222,
38
- "expected": 26
39
- },
40
- {
41
- "description": "trinary 1122000120 is decimal 32091",
42
- "input": 1122000120,
43
- "expected": 32091
44
- },
45
- {
46
- "description": "invalid trinary digits returns 0",
47
- "input": "1234",
48
- "expected": 0
49
- },
50
- {
51
- "description": "invalid word as input returns 0",
52
- "input": "carrot",
53
- "expected": 0
54
- },
55
- {
56
- "description": "invalid numbers with letters as input returns 0",
57
- "input": "0a1b2c",
58
- "expected": 0
59
- }
60
- ]
61
- }
2
+ "exercise": "trinary",
3
+ "version": "1.0.0",
4
+ "cases": [
5
+ {
6
+ "description": "returns the decimal representation of the input trinary value",
7
+ "cases": [
8
+ {
9
+ "description": "trinary 1 is decimal 1",
10
+ "property": "toDecimal",
11
+ "input": 1,
12
+ "expected": 1
13
+ },
14
+ {
15
+ "description": "trinary 2 is decimal 2",
16
+ "property": "toDecimal",
17
+ "input": 2,
18
+ "expected": 2
19
+ },
20
+ {
21
+ "description": "trinary 10 is decimal 3",
22
+ "property": "toDecimal",
23
+ "input": 10,
24
+ "expected": 3
25
+ },
26
+ {
27
+ "description": "trinary 11 is decimal 4",
28
+ "property": "toDecimal",
29
+ "input": 11,
30
+ "expected": 4
31
+ },
32
+ {
33
+ "description": "trinary 100 is decimal 9",
34
+ "property": "toDecimal",
35
+ "input": 100,
36
+ "expected": 9
37
+ },
38
+ {
39
+ "description": "trinary 112 is decimal 14",
40
+ "property": "toDecimal",
41
+ "input": 112,
42
+ "expected": 14
43
+ },
44
+ {
45
+ "description": "trinary 222 is decimal 26",
46
+ "property": "toDecimal",
47
+ "input": 222,
48
+ "expected": 26
49
+ },
50
+ {
51
+ "description": "trinary 1122000120 is decimal 32091",
52
+ "property": "toDecimal",
53
+ "input": 1122000120,
54
+ "expected": 32091
55
+ },
56
+ {
57
+ "description": "invalid trinary digits returns 0",
58
+ "property": "toDecimal",
59
+ "input": "1234",
60
+ "expected": 0
61
+ },
62
+ {
63
+ "description": "invalid word as input returns 0",
64
+ "property": "toDecimal",
65
+ "input": "carrot",
66
+ "expected": 0
67
+ },
68
+ {
69
+ "description": "invalid numbers with letters as input returns 0",
70
+ "property": "toDecimal",
71
+ "input": "0a1b2c",
72
+ "expected": 0
73
+ }
74
+ ]
75
+ }
76
+ ]
62
77
  }