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,71 +1,83 @@
1
1
  {
2
- "find_fewest_coins": {
3
- "description": [
4
- "Given an infinite supply of coins with different values, ",
5
- "find the smallest number of coins needed to make a desired ",
6
- "amount of change."
7
- ],
8
- "cases": [
9
- {
10
- "description": "single coin change",
11
- "coins": [1, 5, 10, 25, 100],
12
- "target": 25,
13
- "expected": [25]
14
- },
15
- {
16
- "description": "multiple coin change",
17
- "coins": [1, 5, 10, 25, 100],
18
- "target": 15,
19
- "expected": [5, 10]
20
- },
21
- {
22
- "description": "change with Lilliputian Coins",
23
- "coins": [1, 4, 15, 20, 50],
24
- "target": 23,
25
- "expected": [4, 4, 15]
26
- },
27
- {
28
- "description": "change with Lower Elbonia Coins",
29
- "coins": [1, 5, 10, 21, 25],
30
- "target": 63,
31
- "expected": [21, 21, 21]
32
- },
33
- {
34
- "description": "large target values",
35
- "coins": [1, 2, 5, 10, 20, 50, 100],
36
- "target": 999,
37
- "expected": [2, 2, 5, 20, 20, 50, 100, 100, 100, 100, 100, 100, 100, 100, 100]
38
- },
39
- {
40
- "description": "possible change without unit coins available",
41
- "coins": [2, 5, 10, 20, 50],
42
- "target": 21,
43
- "expected": [2, 2, 2, 5, 10]
44
- },
45
- {
46
- "description": "no coins make 0 change",
47
- "coins": [1, 5, 10, 21, 25],
48
- "target": 0,
49
- "expected": []
50
- },
51
- {
52
- "description": "error testing for change smaller than the smallest of coins",
53
- "coins": [5, 10],
54
- "target": 3,
55
- "expected": -1
56
- },
57
- {
58
- "description": "error if no combination can add up to target",
59
- "coins": [5, 10],
60
- "target": 94,
61
- "expected": -1
62
- },
63
- {
64
- "description": "cannot find negative change values",
65
- "coins": [1, 2, 5],
66
- "target": -5,
67
- "expected": -1
68
- }
69
- ]
2
+ "exercise": "change",
3
+ "version": "1.0.0",
4
+ "comments": [
5
+ "Given an infinite supply of coins with different values, ",
6
+ "find the smallest number of coins needed to make a desired ",
7
+ "amount of change."
8
+ ],
9
+ "cases": [
10
+ {
11
+ "description": "single coin change",
12
+ "property": "findFewestCoins",
13
+ "coins": [1, 5, 10, 25, 100],
14
+ "target": 25,
15
+ "expected": [25]
16
+ },
17
+ {
18
+ "description": "multiple coin change",
19
+ "property": "findFewestCoins",
20
+ "coins": [1, 5, 10, 25, 100],
21
+ "target": 15,
22
+ "expected": [5, 10]
23
+ },
24
+ {
25
+ "description": "change with Lilliputian Coins",
26
+ "property": "findFewestCoins",
27
+ "coins": [1, 4, 15, 20, 50],
28
+ "target": 23,
29
+ "expected": [4, 4, 15]
30
+ },
31
+ {
32
+ "description": "change with Lower Elbonia Coins",
33
+ "property": "findFewestCoins",
34
+ "coins": [1, 5, 10, 21, 25],
35
+ "target": 63,
36
+ "expected": [21, 21, 21]
37
+ },
38
+ {
39
+ "description": "large target values",
40
+ "property": "findFewestCoins",
41
+ "coins": [1, 2, 5, 10, 20, 50, 100],
42
+ "target": 999,
43
+ "expected": [ 2, 2, 5, 20, 20
44
+ , 50, 100, 100, 100, 100
45
+ , 100, 100, 100, 100, 100 ]
46
+ },
47
+ {
48
+ "description": "possible change without unit coins available",
49
+ "property": "findFewestCoins",
50
+ "coins": [2, 5, 10, 20, 50],
51
+ "target": 21,
52
+ "expected": [2, 2, 2, 5, 10]
53
+ },
54
+ {
55
+ "description": "no coins make 0 change",
56
+ "property": "findFewestCoins",
57
+ "coins": [1, 5, 10, 21, 25],
58
+ "target": 0,
59
+ "expected": []
60
+ },
61
+ {
62
+ "description": "error testing for change smaller than the smallest of coins",
63
+ "property": "findFewestCoins",
64
+ "coins": [5, 10],
65
+ "target": 3,
66
+ "expected": -1
67
+ },
68
+ {
69
+ "description": "error if no combination can add up to target",
70
+ "property": "findFewestCoins",
71
+ "coins": [5, 10],
72
+ "target": 94,
73
+ "expected": -1
74
+ },
75
+ {
76
+ "description": "cannot find negative change values",
77
+ "property": "findFewestCoins",
78
+ "coins": [1, 2, 5],
79
+ "target": -5,
80
+ "expected": -1
70
81
  }
82
+ ]
71
83
  }
@@ -1,66 +1,81 @@
1
1
  {
2
- "#": [
2
+ "exercise": "grains",
3
+ "version": "1.0.0",
4
+ "comments": [
3
5
  "The final tests of square test error conditions",
4
6
  "The expection for these tests is -1, indicating an error",
5
7
  "In these cases you should expect an error as is idiomatic for your language"
6
8
  ],
7
- "square": {
8
- "description": "returns the number of grains on the square",
9
- "cases": [
10
- {
11
- "description": "1",
12
- "input": 1,
13
- "expected": 1
14
- },
15
- {
16
- "description": "2",
17
- "input": 2,
18
- "expected": 2
19
- },
20
- {
21
- "description": "3",
22
- "input": 3,
23
- "expected": 4
24
- },
25
- {
26
- "description": "4",
27
- "input": 4,
28
- "expected": 8
29
- },
30
- {
31
- "description": "16",
32
- "input": 16,
33
- "expected": 32768
34
- },
35
- {
36
- "description": "32",
37
- "input": 32,
38
- "expected": 2147483648
39
- },
40
- {
41
- "description": "64",
42
- "input": 64,
43
- "expected": 9223372036854775808
44
- },
45
- {
46
- "description": "square 0 raises an exception",
47
- "input": 0,
48
- "expected": -1
49
- },
50
- {
51
- "description": "negative square raises an exception",
52
- "input": -1,
53
- "expected": -1
54
- },
55
- {
56
- "description": "square greater than 64 raises an exception",
57
- "input": 65,
58
- "expected": -1
59
- }
60
- ]
61
- },
62
- "total": {
63
- "description": "returns the total number of grains on the board",
64
- "expected": 18446744073709551615
65
- }
9
+ "cases": [
10
+ {
11
+ "description": "returns the number of grains on the square",
12
+ "cases": [
13
+ {
14
+ "description": "1",
15
+ "property": "square",
16
+ "input": 1,
17
+ "expected": 1
18
+ },
19
+ {
20
+ "description": "2",
21
+ "property": "square",
22
+ "input": 2,
23
+ "expected": 2
24
+ },
25
+ {
26
+ "description": "3",
27
+ "property": "square",
28
+ "input": 3,
29
+ "expected": 4
30
+ },
31
+ {
32
+ "description": "4",
33
+ "property": "square",
34
+ "input": 4,
35
+ "expected": 8
36
+ },
37
+ {
38
+ "description": "16",
39
+ "property": "square",
40
+ "input": 16,
41
+ "expected": 32768
42
+ },
43
+ {
44
+ "description": "32",
45
+ "property": "square",
46
+ "input": 32,
47
+ "expected": 2147483648
48
+ },
49
+ {
50
+ "description": "64",
51
+ "property": "square",
52
+ "input": 64,
53
+ "expected": 9223372036854775808
54
+ },
55
+ {
56
+ "description": "square 0 raises an exception",
57
+ "property": "square",
58
+ "input": 0,
59
+ "expected": -1
60
+ },
61
+ {
62
+ "description": "negative square raises an exception",
63
+ "property": "square",
64
+ "input": -1,
65
+ "expected": -1
66
+ },
67
+ {
68
+ "description": "square greater than 64 raises an exception",
69
+ "property": "square",
70
+ "input": 65,
71
+ "expected": -1
72
+ }
73
+ ]
74
+ },
75
+ {
76
+ "description": "returns the total number of grains on the board",
77
+ "property": "total",
78
+ "expected": 18446744073709551615
79
+ }
80
+ ]
66
81
  }
@@ -1,11 +1,11 @@
1
1
  {
2
- "exercise":"hello-world",
3
- "version":"0.1.0",
4
- "cases":[
2
+ "exercise": "hello-world",
3
+ "version": "1.0.0",
4
+ "cases": [
5
5
  {
6
- "description":"Say Hi!",
7
- "property":"hello",
8
- "expected":"Hello, World!"
6
+ "description": "Say Hi!",
7
+ "property": "hello",
8
+ "expected": "Hello, World!"
9
9
  }
10
10
  ]
11
11
  }
@@ -1,24 +1,30 @@
1
1
  {
2
- "cases": [
3
- {
4
- "description": "year not divisible by 4: common year",
5
- "input": 2015,
6
- "expected": false
7
- },
8
- {
9
- "description": "year divisible by 4, not divisible by 100: leap year",
10
- "input": 2016,
11
- "expected": true
12
- },
13
- {
14
- "description": "year divisible by 100, not divisible by 400: common year",
15
- "input": 2100,
16
- "expected": false
17
- },
18
- {
19
- "description": "year divisible by 400: leap year",
20
- "input": 2000,
21
- "expected": true
22
- }
23
- ]
2
+ "exercise": "leap",
3
+ "version": "1.0.0",
4
+ "cases": [
5
+ {
6
+ "description": "year not divisible by 4: common year",
7
+ "property": "leapYear",
8
+ "input": 2015,
9
+ "expected": false
10
+ },
11
+ {
12
+ "description": "year divisible by 4, not divisible by 100: leap year",
13
+ "property": "leapYear",
14
+ "input": 2016,
15
+ "expected": true
16
+ },
17
+ {
18
+ "description": "year divisible by 100, not divisible by 400: common year",
19
+ "property": "leapYear",
20
+ "input": 2100,
21
+ "expected": false
22
+ },
23
+ {
24
+ "description": "year divisible by 400: leap year",
25
+ "property": "leapYear",
26
+ "input": 2000,
27
+ "expected": true
28
+ }
29
+ ]
24
30
  }
@@ -1,67 +1,82 @@
1
1
  {
2
- "valid": [
2
+ "exercise": "luhn",
3
+ "version": "1.0.0",
4
+ "cases": [
3
5
  {
4
6
  "description": "single digit strings can not be valid",
7
+ "property": "valid",
5
8
  "input": "1",
6
9
  "expected": false
7
10
  },
8
11
  {
9
12
  "description": "A single zero is invalid",
13
+ "property": "valid",
10
14
  "input": "0",
11
15
  "expected": false
12
16
  },
13
17
  {
14
18
  "description": "a simple valid SIN that remains valid if reversed",
19
+ "property": "valid",
15
20
  "input": "059",
16
21
  "expected": true
17
22
  },
18
23
  {
19
24
  "description": "a simple valid SIN that becomes invalid if reversed",
25
+ "property": "valid",
20
26
  "input": "59",
21
27
  "expected": true
22
28
  },
23
29
  {
24
30
  "description": "a valid Canadian SIN",
31
+ "property": "valid",
25
32
  "input": "055 444 285",
26
33
  "expected": true
27
34
  },
28
35
  {
29
36
  "description": "invalid Canadian SIN",
37
+ "property": "valid",
30
38
  "input": "055 444 286",
31
39
  "expected": false
32
40
  },
33
41
  {
34
42
  "description": "invalid credit card",
43
+ "property": "valid",
35
44
  "input": "8273 1232 7352 0569",
36
45
  "expected": false
37
46
  },
38
47
  {
39
48
  "description": "valid strings with a non-digit included become invalid",
49
+ "property": "valid",
40
50
  "input": "055a 444 285",
41
51
  "expected": false
42
52
  },
43
53
  {
44
54
  "description": "valid strings with punctuation included become invalid",
55
+ "property": "valid",
45
56
  "input": "055-444-285",
46
57
  "expected": false
47
58
  },
48
59
  {
49
60
  "description": "valid strings with symbols included become invalid",
61
+ "property": "valid",
50
62
  "input": "055£ 444$ 285",
51
63
  "expected": false
52
64
  },
53
65
  {
54
66
  "description": "single zero with space is invalid",
67
+ "property": "valid",
55
68
  "input": " 0",
56
69
  "expected": false
57
70
  },
58
71
  {
59
72
  "description": "more than a single zero is valid",
73
+ "property": "valid",
60
74
  "input": "0000 0",
61
75
  "expected": true
62
76
  },
63
77
  {
64
78
  "description": "input digit 9 is correctly converted to output digit 9",
79
+ "property": "valid",
65
80
  "input": "091",
66
81
  "expected": true
67
82
  }