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,54 +1,116 @@
1
- {
2
- "cases": [
3
- {
4
- "description": "count one word",
5
- "input": "word",
6
- "expected": {"word": 1}
7
- },
8
- {
9
- "description": "count one of each word",
10
- "input": "one of each",
11
- "expected": { "one": 1, "of": 1, "each": 1 }
12
- },
13
- {
14
- "description": "multiple occurrences of a word",
15
- "input": "one fish two fish red fish blue fish",
16
- "expected": { "one": 1, "fish": 4, "two": 1, "red": 1, "blue": 1 }
17
- },
18
- {
19
- "description": "handles cramped lists",
20
- "input": "one,two,three",
21
- "expected": { "one": 1, "two": 1, "three": 1 }
22
- },
23
- {
24
- "description": "handles expanded lists",
25
- "input": "one,\ntwo,\nthree",
26
- "expected": { "one": 1, "two": 1, "three": 1 }
27
- },
28
- {
29
- "description": "ignore punctuation",
30
- "input": "car: carpet as java: javascript!!&@$%^&",
31
- "expected": { "car": 1, "carpet": 1, "as": 1, "java": 1, "javascript": 1 }
32
- },
33
- {
34
- "description": "include numbers",
35
- "input": "testing, 1, 2 testing",
36
- "expected": { "testing": 2, "1": 1, "2": 1 }
37
- },
38
- {
39
- "description": "normalize case",
40
- "input": "go Go GO Stop stop",
41
- "expected": { "go": 3, "stop": 2 }
42
- },
43
- {
44
- "description": "with apostrophes",
45
- "input": "First: don't laugh. Then: don't cry.",
46
- "expected": { "first": 1, "don't": 2, "laugh": 1, "then": 1, "cry": 1 }
47
- },
48
- {
49
- "description": "with quotations",
50
- "input": "Joe can't tell between 'large' and large.",
51
- "expected": { "joe": 1, "can't": 1, "tell": 1, "between": 1, "large": 2, "and": 1 }
52
- }
53
- ]
54
- }
1
+ {
2
+ "exercise": "word-count",
3
+ "version": "1.0.0",
4
+ "comments": [
5
+ "For each word in the input, count the number of times it appears in the",
6
+ "entire sentence."
7
+ ],
8
+ "cases": [
9
+ {
10
+ "description": "count one word",
11
+ "property": "countwords",
12
+ "input": "word",
13
+ "expected": {
14
+ "word": 1
15
+ }
16
+ },
17
+ {
18
+ "description": "count one of each word",
19
+ "property": "countwords",
20
+ "input": "one of each",
21
+ "expected": {
22
+ "one": 1,
23
+ "of": 1,
24
+ "each": 1
25
+ }
26
+ },
27
+ {
28
+ "description": "multiple occurrences of a word",
29
+ "property": "countwords",
30
+ "input": "one fish two fish red fish blue fish",
31
+ "expected": {
32
+ "one": 1,
33
+ "fish": 4,
34
+ "two": 1,
35
+ "red": 1,
36
+ "blue": 1
37
+ }
38
+ },
39
+ {
40
+ "description": "handles cramped lists",
41
+ "property": "countwords",
42
+ "input": "one,two,three",
43
+ "expected": {
44
+ "one": 1,
45
+ "two": 1,
46
+ "three": 1
47
+ }
48
+ },
49
+ {
50
+ "description": "handles expanded lists",
51
+ "property": "countwords",
52
+ "input": "one,\ntwo,\nthree",
53
+ "expected": {
54
+ "one": 1,
55
+ "two": 1,
56
+ "three": 1
57
+ }
58
+ },
59
+ {
60
+ "description": "ignore punctuation",
61
+ "property": "countwords",
62
+ "input": "car: carpet as java: javascript!!&@$%^&",
63
+ "expected": {
64
+ "car": 1,
65
+ "carpet": 1,
66
+ "as": 1,
67
+ "java": 1,
68
+ "javascript": 1
69
+ }
70
+ },
71
+ {
72
+ "description": "include numbers",
73
+ "property": "countwords",
74
+ "input": "testing, 1, 2 testing",
75
+ "expected": {
76
+ "testing": 2,
77
+ "1": 1,
78
+ "2": 1
79
+ }
80
+ },
81
+ {
82
+ "description": "normalize case",
83
+ "property": "countwords",
84
+ "input": "go Go GO Stop stop",
85
+ "expected": {
86
+ "go": 3,
87
+ "stop": 2
88
+ }
89
+ },
90
+ {
91
+ "description": "with apostrophes",
92
+ "property": "countwords",
93
+ "input": "First: don't laugh. Then: don't cry.",
94
+ "expected": {
95
+ "first": 1,
96
+ "don't": 2,
97
+ "laugh": 1,
98
+ "then": 1,
99
+ "cry": 1
100
+ }
101
+ },
102
+ {
103
+ "description": "with quotations",
104
+ "property": "countwords",
105
+ "input": "Joe can't tell between 'large' and large.",
106
+ "expected": {
107
+ "joe": 1,
108
+ "can't": 1,
109
+ "tell": 1,
110
+ "between": 1,
111
+ "large": 2,
112
+ "and": 1
113
+ }
114
+ }
115
+ ]
116
+ }
@@ -1,89 +1,107 @@
1
1
  {
2
- "#": [
2
+ "exercise": "wordy",
3
+ "version": "1.0.0",
4
+ "comments": [
3
5
  "The tests that expect 'false' should be implemented to raise",
4
6
  "an error, or indicate a failure. Implement this in a way that",
5
7
  "makes sense for your language."
6
8
  ],
7
- "cases": [
8
- {
9
- "description": "addition",
10
- "input": "What is 1 plus 1?",
11
- "expected": 2
12
- },
13
- {
14
- "description": "more addition",
15
- "input": "What is 53 plus 2?",
16
- "expected": 55
17
- },
18
- {
19
- "description": "addition with negative numbers",
20
- "input": "What is -1 plus -10?",
21
- "expected": -11
22
- },
23
- {
24
- "description": "large addition",
25
- "input": "What is 123 plus 45678?",
26
- "expected": 45801
27
- },
28
- {
29
- "description": "subtraction",
30
- "input": "What is 4 minus -12?",
31
- "expected": 16
32
- },
33
- {
34
- "description": "multiplication",
35
- "input": "What is -3 multiplied by 25?",
36
- "expected": -75
37
- },
38
- {
39
- "description": "division",
40
- "input": "What is 33 divided by -3?",
41
- "expected": -11
42
- },
43
- {
44
- "description": "multiple additions",
45
- "input": "What is 1 plus 1 plus 1?",
46
- "expected": 3
47
- },
48
- {
49
- "description": "addition and subtraction",
50
- "input": "What is 1 plus 5 minus -2?",
51
- "expected": 8
52
- },
53
- {
54
- "description": "multiple subtraction",
55
- "input": "What is 20 minus 4 minus 13?",
56
- "expected": 3
57
- },
58
- {
59
- "description": "subtraction then addition",
60
- "input": "What is 17 minus 6 plus 3?",
61
- "expected": 14
62
- },
63
- {
64
- "description": "multiple multiplication",
65
- "input": "What is 2 multiplied by -2 multiplied by 3?",
66
- "expected": -12
67
- },
68
- {
69
- "description": "addition and multiplication",
70
- "input": "What is -3 plus 7 multiplied by -2?",
71
- "expected": -8
72
- },
73
- {
74
- "description": "multiple division",
75
- "input": "What is -12 divided by 2 divided by -3?",
76
- "expected": 2
77
- },
78
- {
79
- "description": "unknown operation",
80
- "input": "What is 52 cubed?",
81
- "expected": false
82
- },
83
- {
84
- "description": "Non math question",
85
- "input": "Who is the President of the United States?",
86
- "expected": false
87
- }
88
- ]
9
+ "cases": [
10
+ {
11
+ "description": "addition",
12
+ "property": "answer",
13
+ "input": "What is 1 plus 1?",
14
+ "expected": 2
15
+ },
16
+ {
17
+ "description": "more addition",
18
+ "property": "answer",
19
+ "input": "What is 53 plus 2?",
20
+ "expected": 55
21
+ },
22
+ {
23
+ "description": "addition with negative numbers",
24
+ "property": "answer",
25
+ "input": "What is -1 plus -10?",
26
+ "expected": -11
27
+ },
28
+ {
29
+ "description": "large addition",
30
+ "property": "answer",
31
+ "input": "What is 123 plus 45678?",
32
+ "expected": 45801
33
+ },
34
+ {
35
+ "description": "subtraction",
36
+ "property": "answer",
37
+ "input": "What is 4 minus -12?",
38
+ "expected": 16
39
+ },
40
+ {
41
+ "description": "multiplication",
42
+ "property": "answer",
43
+ "input": "What is -3 multiplied by 25?",
44
+ "expected": -75
45
+ },
46
+ {
47
+ "description": "division",
48
+ "property": "answer",
49
+ "input": "What is 33 divided by -3?",
50
+ "expected": -11
51
+ },
52
+ {
53
+ "description": "multiple additions",
54
+ "property": "answer",
55
+ "input": "What is 1 plus 1 plus 1?",
56
+ "expected": 3
57
+ },
58
+ {
59
+ "description": "addition and subtraction",
60
+ "property": "answer",
61
+ "input": "What is 1 plus 5 minus -2?",
62
+ "expected": 8
63
+ },
64
+ {
65
+ "description": "multiple subtraction",
66
+ "property": "answer",
67
+ "input": "What is 20 minus 4 minus 13?",
68
+ "expected": 3
69
+ },
70
+ {
71
+ "description": "subtraction then addition",
72
+ "property": "answer",
73
+ "input": "What is 17 minus 6 plus 3?",
74
+ "expected": 14
75
+ },
76
+ {
77
+ "description": "multiple multiplication",
78
+ "property": "answer",
79
+ "input": "What is 2 multiplied by -2 multiplied by 3?",
80
+ "expected": -12
81
+ },
82
+ {
83
+ "description": "addition and multiplication",
84
+ "property": "answer",
85
+ "input": "What is -3 plus 7 multiplied by -2?",
86
+ "expected": -8
87
+ },
88
+ {
89
+ "description": "multiple division",
90
+ "property": "answer",
91
+ "input": "What is -12 divided by 2 divided by -3?",
92
+ "expected": 2
93
+ },
94
+ {
95
+ "description": "unknown operation",
96
+ "property": "answer",
97
+ "input": "What is 52 cubed?",
98
+ "expected": false
99
+ },
100
+ {
101
+ "description": "Non math question",
102
+ "property": "answer",
103
+ "input": "Who is the President of the United States?",
104
+ "expected": false
105
+ }
106
+ ]
89
107
  }
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.0.8.13"
2
+ VERSION = "2.0.8.14"
3
3
  end
@@ -1,8 +1,17 @@
1
- # Testing
1
+ ## Testing
2
2
 
3
3
  In order to run the tests for this track, you will need to install
4
4
  DUnitX. Please see [installation](http://www.exercism.io/languages/delphi/installing) instructions for more information.
5
5
 
6
+ ### Loading Exercises into Delphi
7
+
8
+ If Delphi is properly installed, and `*.dpr` file types have been associated with Delphi, then double clicking the supplied `*.dpr` file will start Delphi and load the exercise/project. `control + F9` is the keyboard shortcut to compile the project or pressing `F9` will compile and run the project.
9
+
10
+ Alternatively you may opt to start Delphi and load your project via. the `File` drop down menu.
11
+
12
+ ### When Questions Come Up
13
+ We monitor the [Pascal-Delphi](https://gitter.im/exercism/Pascal-Delphi) support room on [gitter.im](https://gitter.im) to help you with any questions that might arise.
14
+
6
15
  ### Submitting Exercises
7
16
 
8
17
  Note that, when trying to submit an exercise, make sure the exercise file you're submitting is in the `exercism/delphi/<exerciseName>` directory.
@@ -123,6 +123,14 @@
123
123
  "Structural equality"
124
124
  ]
125
125
  },
126
+ {
127
+ "slug": "triangle",
128
+ "difficulty": 3,
129
+ "topics": [
130
+ "Integers",
131
+ "Enumerations"
132
+ ]
133
+ },
126
134
  {
127
135
  "slug": "allergies",
128
136
  "difficulty": 4,
@@ -1,3 +1,7 @@
1
+ ## Running The Tests
2
+
3
+ Exercises that have been fetched using the Exercism.io client are delivered with a minimum of three files: a `readme.md` file, a `.dpr` file, and a `.pas` file. The `.dpr` file is the Delphi project file and the `.pas` file is the test runner. Load the Delphi project by either double clicking on the `.dpr` file or by opening the project from with in Delphi. You will be responsible for creating a new `.pas` file that will contain your solution code that the tests will be run against. Refer to the `readme.md` file for instruction on how to compiles and execute your code.
4
+
1
5
  All tests have been ignored except the first one for you to work on. To continue, just comment the ```[Ignore]``` attribute on the test to start working on it.
2
6
 
3
7
  Make sure [DUnitX](https://github.com/VSoftTechnologies/DUnitX) is installed, if not already installed from the setup above.
@@ -1,30 +1,52 @@
1
- //*****************************************************************************
2
- // You got an error, which is exactly as it should be.
3
- // This is the first step in the Test-Driven Development
4
- // (TDD) process.
5
- //
6
- // The most important part of the error is
7
- //
8
- // "cannot compile"
9
- //
10
- // It's looking for a file named uHelloWorld.pas that doesn't exist.
11
- //
12
- // To fix the error, create a unit file named uHelloWorld.pas
13
- // in the same directory as the file uTestHelloWorld.pas.
14
- //
15
- // The beginning of the new unit file should contain a unit statement:
16
- //
17
- // unit uHelloWorld;
18
- //
19
- // The new unit should contain Interface, Implementation, and End. statements.
20
- //
21
- // Hint: Delphi will take care of all this if you instruct it to add a new unit
22
- // to your project. Be sure to save the new unit as uHelloWorld.pas before
23
- // trying to compile again.
24
- //
25
- // For more guidance as you work on this exercise, see
26
- // GETTING_STARTED.md.
27
- //*****************************************************************************
1
+ (******************************************************************************
2
+ You got an error, which is exactly as it should be.
3
+ This is the first step in the Test-Driven Development
4
+ (TDD) process.
5
+
6
+ The most important part of the error is
7
+
8
+ "cannot compile"
9
+
10
+ It's looking for a file named uHelloWorld.pas that doesn't exist.
11
+
12
+ To fix the error, create a unit file named uHelloWorld.pas
13
+ in the same directory as the file uTestHelloWorld.pas.
14
+
15
+ The beginning of the new unit file should contain a unit statement:
16
+
17
+ unit uHelloWorld;
18
+
19
+ The new unit should contain Interface, Implementation, and End. statements.
20
+
21
+ The primary focus of this exercise is to provide you with a very simple
22
+ exercise that you can use to test the tools necessary for this language track,
23
+ are working correctly. To that end we are providing you with code that you may
24
+ use as the solution to this exercise:
25
+
26
+ {------------------< start solution >------------------}
27
+ unit uHelloWorld;
28
+
29
+ interface
30
+
31
+ function Hello: string;
32
+
33
+ implementation
34
+
35
+ function Hello: string;
36
+ begin
37
+ result := 'Hello, World!';
38
+ end;
39
+
40
+ end.
41
+ {------------------< end solution >------------------}
42
+
43
+ Hint: Delphi will take care of all this if you instruct it to add a new unit
44
+ to your project. Be sure to save the new unit as uHelloWorld.pas before
45
+ trying to compile again.
46
+
47
+ For more guidance as you work on this exercise, see
48
+ GETTING_STARTED.md.
49
+ ******************************************************************************)
28
50
  unit uTestHelloWorld;
29
51
 
30
52
  interface