trackler 2.0.8.13 → 2.0.8.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/common/exercises/acronym/canonical-data.json +50 -39
- data/common/exercises/all-your-base/canonical-data.json +192 -146
- data/common/exercises/allergies/canonical-data.json +133 -93
- data/common/exercises/anagram/canonical-data.json +128 -106
- data/common/exercises/atbash-cipher/canonical-data.json +92 -74
- data/common/exercises/binary/canonical-data.json +94 -77
- data/common/exercises/bob/canonical-data.json +154 -127
- data/common/exercises/book-store/canonical-data.json +106 -92
- data/common/exercises/change/canonical-data.json +80 -68
- data/common/exercises/grains/canonical-data.json +75 -60
- data/common/exercises/hello-world/canonical-data.json +6 -6
- data/common/exercises/leap/canonical-data.json +28 -22
- data/common/exercises/luhn/canonical-data.json +16 -1
- data/common/exercises/pig-latin/canonical-data.json +93 -75
- data/common/exercises/raindrops/canonical-data.json +112 -92
- data/common/exercises/rna-transcription/canonical-data.json +64 -54
- data/common/exercises/run-length-encoding/canonical-data.json +20 -0
- data/common/exercises/run-length-encoding/description.md +3 -7
- data/common/exercises/say/canonical-data.json +98 -81
- data/common/exercises/scrabble-score/canonical-data.json +13 -0
- data/common/exercises/sieve/canonical-data.json +48 -42
- data/common/exercises/trinary/canonical-data.json +75 -60
- data/common/exercises/word-count/canonical-data.json +116 -54
- data/common/exercises/wordy/canonical-data.json +101 -83
- data/lib/trackler/version.rb +1 -1
- data/tracks/delphi/SETUP.md +10 -1
- data/tracks/delphi/config.json +8 -0
- data/tracks/delphi/docs/TESTS.md +4 -0
- data/tracks/delphi/exercises/hello-world/uTestHelloWorld.pas +49 -27
- data/tracks/delphi/exercises/triangle/Triangle.dpr +60 -0
- data/tracks/delphi/exercises/triangle/uTestTriangle.pas +186 -0
- data/tracks/delphi/exercises/triangle/uTriangleExample.pas +64 -0
- data/tracks/go/exercises/poker/poker_test.go +6 -6
- data/tracks/java/exercises/atbash-cipher/src/test/java/AtbashTest.java +2 -1
- data/tracks/scala/config.json +10 -0
- data/tracks/scala/exercises/variable-length-quantity/HINTS.md +2 -0
- data/tracks/scala/exercises/variable-length-quantity/build.sbt +3 -0
- data/tracks/scala/exercises/variable-length-quantity/example.scala +56 -0
- data/tracks/scala/exercises/variable-length-quantity/src/main/scala/VariableLengthQuantity.scala +0 -0
- data/tracks/scala/exercises/variable-length-quantity/src/test/scala/VariableLengthQuantityTest.scala +162 -0
- data/tracks/scala/testgen/src/main/scala/VariableLengthQuantityTestGenerator.scala +80 -0
- data/tracks/typescript/common/package.json +6 -7
- data/tracks/typescript/common/yarn.lock +422 -380
- data/tracks/typescript/config.json +12 -0
- data/tracks/typescript/exercises/anagram/package.json +6 -7
- data/tracks/typescript/exercises/anagram/yarn.lock +422 -380
- data/tracks/typescript/exercises/beer-song/package.json +6 -7
- data/tracks/typescript/exercises/beer-song/yarn.lock +422 -380
- data/tracks/typescript/exercises/bob/package.json +6 -7
- data/tracks/typescript/exercises/bob/yarn.lock +422 -380
- data/tracks/typescript/exercises/food-chain/package.json +6 -7
- data/tracks/typescript/exercises/food-chain/yarn.lock +422 -380
- data/tracks/typescript/exercises/gigasecond/package.json +6 -7
- data/tracks/typescript/exercises/gigasecond/yarn.lock +422 -380
- data/tracks/typescript/exercises/grade-school/grade-school.example.ts +31 -0
- data/tracks/typescript/exercises/grade-school/grade-school.test.ts +81 -0
- data/tracks/typescript/exercises/grade-school/package.json +36 -0
- data/tracks/typescript/exercises/grade-school/tsconfig.json +21 -0
- data/tracks/typescript/exercises/grade-school/tslint.json +127 -0
- data/tracks/typescript/exercises/grade-school/yarn.lock +2739 -0
- data/tracks/typescript/exercises/hamming/package.json +6 -7
- data/tracks/typescript/exercises/hamming/yarn.lock +422 -380
- data/tracks/typescript/exercises/hello-world/package.json +6 -7
- data/tracks/typescript/exercises/hello-world/yarn.lock +422 -380
- data/tracks/typescript/exercises/leap/package.json +6 -7
- data/tracks/typescript/exercises/leap/yarn.lock +422 -380
- data/tracks/typescript/exercises/pangram/package.json +6 -7
- data/tracks/typescript/exercises/pangram/yarn.lock +422 -380
- data/tracks/typescript/exercises/phone-number/package.json +6 -7
- data/tracks/typescript/exercises/phone-number/yarn.lock +422 -380
- data/tracks/typescript/exercises/rna-transcription/package.json +6 -7
- data/tracks/typescript/exercises/rna-transcription/yarn.lock +422 -380
- data/tracks/typescript/exercises/robot-name/package.json +36 -0
- data/tracks/typescript/exercises/robot-name/robot-name.example.ts +36 -0
- data/tracks/typescript/exercises/robot-name/robot-name.test.ts +86 -0
- data/tracks/typescript/exercises/robot-name/tsconfig.json +21 -0
- data/tracks/typescript/exercises/robot-name/tslint.json +127 -0
- data/tracks/typescript/exercises/robot-name/yarn.lock +2739 -0
- data/tracks/typescript/exercises/say/package.json +6 -7
- data/tracks/typescript/exercises/say/yarn.lock +422 -380
- data/tracks/typescript/exercises/word-count/package.json +6 -7
- data/tracks/typescript/exercises/word-count/yarn.lock +422 -380
- data/tracks/typescript/exercises/wordy/package.json +6 -7
- data/tracks/typescript/exercises/wordy/yarn.lock +422 -380
- metadata +23 -2
@@ -1,54 +1,116 @@
|
|
1
|
-
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
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
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
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
|
}
|
data/lib/trackler/version.rb
CHANGED
data/tracks/delphi/SETUP.md
CHANGED
@@ -1,8 +1,17 @@
|
|
1
|
-
|
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.
|
data/tracks/delphi/config.json
CHANGED
data/tracks/delphi/docs/TESTS.md
CHANGED
@@ -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
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
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
|