trackler 2.2.1.49 → 2.2.1.50
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/bin/verify-configs +1 -1
- data/lib/trackler/version.rb +1 -1
- data/problem-specifications/exercises/kindergarten-garden/canonical-data.json +0 -37
- data/tracks/c/exercises/allergies/test/test_allergies.c +41 -41
- data/tracks/common-lisp/config.json +266 -252
- data/tracks/common-lisp/config/maintainers.json +23 -23
- data/tracks/common-lisp/exercises/allergies/README.md +0 -1
- data/tracks/common-lisp/exercises/atbash-cipher/README.md +2 -1
- data/tracks/common-lisp/exercises/beer-song/README.md +1 -1
- data/tracks/common-lisp/exercises/binary/README.md +2 -0
- data/tracks/common-lisp/exercises/collatz-conjecture/README.md +4 -8
- data/tracks/common-lisp/exercises/crypto-square/README.md +4 -4
- data/tracks/common-lisp/exercises/etl/README.md +2 -0
- data/tracks/common-lisp/exercises/grade-school/README.md +0 -1
- data/tracks/common-lisp/exercises/grains/README.md +0 -1
- data/tracks/common-lisp/exercises/leap/README.md +1 -1
- data/tracks/common-lisp/exercises/meetup/README.md +1 -2
- data/tracks/common-lisp/exercises/nucleotide-count/README.md +8 -22
- data/tracks/common-lisp/exercises/pascals-triangle/README.md +1 -1
- data/tracks/common-lisp/exercises/perfect-numbers/README.md +3 -4
- data/tracks/common-lisp/exercises/phone-number/README.md +3 -2
- data/tracks/common-lisp/exercises/roman-numerals/README.md +1 -1
- data/tracks/common-lisp/exercises/scrabble-score/README.md +3 -1
- data/tracks/common-lisp/exercises/space-age/README.md +2 -1
- data/tracks/common-lisp/exercises/sublist/README.md +65 -0
- data/tracks/common-lisp/exercises/sublist/example.lisp +24 -0
- data/tracks/common-lisp/exercises/sublist/sublist-test.lisp +87 -0
- data/tracks/common-lisp/exercises/sublist/sublist.lisp +8 -0
- data/tracks/common-lisp/exercises/triangle/README.md +9 -6
- data/tracks/common-lisp/exercises/trinary/README.md +1 -1
- data/tracks/common-lisp/exercises/word-count/README.md +1 -2
- data/tracks/ecmascript/config.json +30 -0
- data/tracks/ecmascript/exercises/bowling/README.md +80 -0
- data/tracks/ecmascript/exercises/bowling/bowling.spec.js +159 -0
- data/tracks/ecmascript/exercises/bowling/example.js +67 -0
- data/tracks/ecmascript/exercises/bowling/package.json +71 -0
- data/tracks/ecmascript/exercises/two-fer/README.md +47 -0
- data/tracks/ecmascript/exercises/two-fer/example.js +4 -0
- data/tracks/ecmascript/exercises/two-fer/package.json +69 -0
- data/tracks/ecmascript/exercises/two-fer/two-fer.spec.js +18 -0
- data/tracks/fsharp/exercises/pascals-triangle/Example.fs +12 -8
- data/tracks/fsharp/exercises/pascals-triangle/PascalsTriangle.fs +2 -2
- data/tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs +15 -12
- data/tracks/fsharp/generators/Generators.fs +19 -0
- data/tracks/fsharp/generators/Templates/_AssertThrows.liquid +1 -0
- data/tracks/java/docs/ABOUT.md +13 -31
- data/tracks/java/exercises/bracket-push/.meta/version +1 -1
- data/tracks/java/exercises/bracket-push/src/test/java/BracketCheckerTest.java +7 -1
- data/tracks/java/exercises/collatz-conjecture/.meta/version +1 -1
- data/tracks/java/exercises/etl/README.md +1 -1
- data/tracks/java/exercises/ocr-numbers/README.md +1 -1
- data/tracks/java/exercises/pascals-triangle/README.md +1 -1
- data/tracks/java/exercises/perfect-numbers/.meta/version +1 -1
- data/tracks/java/exercises/rna-transcription/README.md +1 -1
- data/tracks/java/exercises/secret-handshake/.meta/version +1 -1
- data/tracks/java/exercises/secret-handshake/src/test/java/HandshakeCalculatorTest.java +1 -9
- data/tracks/java/scripts/canonical_data_check.sh +104 -0
- data/tracks/javascript/exercises/twelve-days/example.js +23 -25
- data/tracks/julia/.travis.yml +1 -0
- data/tracks/kotlin/exercises/all-your-base/.meta/version +1 -0
- data/tracks/kotlin/exercises/all-your-base/src/test/kotlin/BaseConverterTest.kt +0 -3
- data/tracks/kotlin/exercises/change/.meta/version +1 -0
- data/tracks/kotlin/exercises/change/src/test/kotlin/ChangeCalculatorTest.kt +0 -3
- data/tracks/kotlin/exercises/clock/.meta/version +1 -0
- data/tracks/kotlin/exercises/clock/src/test/kotlin/ClockAddTest.kt +1 -4
- data/tracks/kotlin/exercises/clock/src/test/kotlin/ClockCreationTest.kt +1 -4
- data/tracks/kotlin/exercises/clock/src/test/kotlin/ClockEqualTest.kt +1 -4
- data/tracks/kotlin/exercises/collatz-conjecture/.meta/version +1 -0
- data/tracks/kotlin/exercises/collatz-conjecture/src/test/kotlin/CollatzCalculatorTest.kt +0 -3
- data/tracks/kotlin/exercises/complex-numbers/.meta/version +1 -0
- data/tracks/kotlin/exercises/complex-numbers/src/test/kotlin/ComplexNumberTest.kt +0 -3
- data/tracks/kotlin/exercises/diamond/.meta/version +1 -0
- data/tracks/kotlin/exercises/diamond/src/test/kotlin/DiamondPrinterTest.kt +0 -3
- data/tracks/kotlin/exercises/etl/README.md +1 -1
- data/tracks/kotlin/exercises/forth/.meta/version +1 -0
- data/tracks/kotlin/exercises/forth/src/test/kotlin/ForthEvaluatorTest.kt +0 -3
- data/tracks/kotlin/exercises/grains/.meta/version +1 -0
- data/tracks/kotlin/exercises/grains/src/test/kotlin/BoardTest.kt +0 -3
- data/tracks/kotlin/exercises/hamming/.meta/version +1 -0
- data/tracks/kotlin/exercises/hamming/src/test/kotlin/HammingTest.kt +0 -3
- data/tracks/kotlin/exercises/list-ops/.meta/version +1 -0
- data/tracks/kotlin/exercises/list-ops/src/test/kotlin/ListExtensionsTest.kt +0 -3
- data/tracks/kotlin/exercises/meetup/.meta/version +1 -0
- data/tracks/kotlin/exercises/meetup/src/test/kotlin/MeetupTest.kt +0 -3
- data/tracks/kotlin/exercises/minesweeper/.meta/version +1 -0
- data/tracks/kotlin/exercises/minesweeper/src/test/kotlin/MinesweeperBoardTest.kt +0 -3
- data/tracks/kotlin/exercises/pangram/.meta/version +1 -0
- data/tracks/kotlin/exercises/pangram/src/test/kotlin/PangramTest.kt +0 -3
- data/tracks/kotlin/exercises/pascals-triangle/README.md +1 -1
- data/tracks/kotlin/exercises/prime-factors/.meta/version +1 -0
- data/tracks/kotlin/exercises/prime-factors/src/test/kotlin/PrimeFactorCalculatorTest.kt +0 -3
- data/tracks/kotlin/exercises/rna-transcription/.meta/version +1 -0
- data/tracks/kotlin/exercises/rna-transcription/README.md +1 -1
- data/tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt +0 -3
- data/tracks/kotlin/exercises/robot-simulator/.meta/version +1 -0
- data/tracks/kotlin/exercises/robot-simulator/src/test/kotlin/RobotTest.kt +0 -3
- data/tracks/kotlin/exercises/rotational-cipher/.meta/version +1 -0
- data/tracks/kotlin/exercises/rotational-cipher/src/test/kotlin/RotationalCipherTest.kt +0 -3
- data/tracks/kotlin/exercises/saddle-points/.meta/version +1 -0
- data/tracks/kotlin/exercises/saddle-points/src/test/kotlin/MatrixTest.kt +0 -3
- data/tracks/kotlin/exercises/say/.meta/version +1 -0
- data/tracks/kotlin/exercises/say/src/test/kotlin/NumberSpellerTest.kt +0 -3
- data/tracks/kotlin/exercises/secret-handshake/.meta/version +1 -0
- data/tracks/kotlin/exercises/secret-handshake/src/test/kotlin/HandshakeCalculatorTest.kt +0 -3
- data/tracks/kotlin/exercises/spiral-matrix/.meta/version +1 -0
- data/tracks/kotlin/exercises/spiral-matrix/src/test/kotlin/SpiralMatrixTest.kt +0 -3
- data/tracks/kotlin/exercises/sublist/.meta/version +1 -0
- data/tracks/kotlin/exercises/sublist/src/test/kotlin/SublistTest.kt +0 -3
- data/tracks/kotlin/scripts/canonical_data_check.sh +104 -0
- data/tracks/perl6/exercises/accumulate/accumulate.t +2 -3
- data/tracks/perl6/exercises/all-your-base/all-your-base.t +17 -18
- data/tracks/perl6/exercises/allergies/allergies.t +17 -18
- data/tracks/perl6/exercises/anagram/anagram.t +17 -18
- data/tracks/perl6/exercises/atbash-cipher/atbash-cipher.t +17 -18
- data/tracks/perl6/exercises/bob/bob.t +20 -22
- data/tracks/perl6/exercises/bob/example.yaml +1 -2
- data/tracks/perl6/exercises/clock/clock.t +17 -18
- data/tracks/perl6/exercises/flatten-array/flatten-array.t +17 -18
- data/tracks/perl6/exercises/grade-school/grade-school.t +2 -3
- data/tracks/perl6/exercises/grains/grains.t +17 -18
- data/tracks/perl6/exercises/hello-world/example.yaml +1 -2
- data/tracks/perl6/exercises/hello-world/hello-world.t +20 -22
- data/tracks/perl6/exercises/leap/leap.t +17 -18
- data/tracks/perl6/exercises/linked-list/linked-list.t +2 -3
- data/tracks/perl6/exercises/luhn/luhn.t +17 -18
- data/tracks/perl6/exercises/phone-number/phone-number.t +17 -18
- data/tracks/perl6/exercises/raindrops/raindrops.t +17 -18
- data/tracks/perl6/exercises/rna-transcription/rna-transcription.t +17 -18
- data/tracks/perl6/exercises/robot-name/robot-name.t +2 -3
- data/tracks/perl6/exercises/scrabble-score/scrabble-score.t +17 -18
- data/tracks/perl6/exercises/space-age/space-age.t +17 -18
- data/tracks/perl6/exercises/word-count/word-count.t +17 -18
- data/tracks/perl6/exercises/wordy/wordy.t +17 -18
- data/tracks/perl6/templates/test.mustache +9 -10
- data/tracks/purescript/config.json +11 -0
- data/tracks/purescript/exercises/rna-transcription/README.md +25 -0
- data/tracks/purescript/exercises/rna-transcription/bower.json +26 -0
- data/tracks/purescript/exercises/rna-transcription/examples/src/RNATranscription.purs +18 -0
- data/tracks/purescript/exercises/rna-transcription/src/RNATranscription.purs +3 -0
- data/tracks/purescript/exercises/rna-transcription/test/Main.purs +48 -0
- data/tracks/python/exercises/variable-length-quantity/example.py +6 -6
- data/tracks/python/exercises/variable-length-quantity/variable_length_quantity.py +2 -2
- data/tracks/ruby/config.json +6 -0
- data/tracks/ruby/exercises/complex-numbers/.meta/.version +1 -0
- data/tracks/ruby/exercises/complex-numbers/.meta/generator/complex_numbers_case.rb +44 -0
- data/tracks/ruby/exercises/complex-numbers/.meta/solutions/complex_numbers.rb +49 -0
- data/tracks/ruby/exercises/complex-numbers/README.md +64 -0
- data/tracks/ruby/exercises/complex-numbers/complex_numbers_test.rb +207 -0
- data/tracks/ruby/exercises/crypto-square/.meta/.version +1 -0
- data/tracks/ruby/exercises/crypto-square/.meta/generator/crypto_square_case.rb +19 -0
- data/tracks/ruby/exercises/crypto-square/.meta/solutions/crypto_square.rb +20 -15
- data/tracks/ruby/exercises/crypto-square/README.md +10 -8
- data/tracks/ruby/exercises/crypto-square/crypto_square_test.rb +45 -81
- data/tracks/ruby/exercises/flatten-array/.meta/.version +1 -0
- data/tracks/ruby/exercises/flatten-array/.meta/generator/flatten_array_case.rb +11 -0
- data/tracks/ruby/exercises/flatten-array/.meta/solutions/flatten_array.rb +5 -2
- data/tracks/ruby/exercises/flatten-array/flatten_array_test.rb +32 -7
- data/tracks/ruby/exercises/hamming/hamming_test.rb +3 -3
- data/tracks/ruby/exercises/isogram/isogram_test.rb +4 -4
- data/tracks/ruby/exercises/leap/leap_test.rb +2 -2
- data/tracks/ruby/exercises/pig-latin/.meta/.version +1 -1
- data/tracks/ruby/exercises/pig-latin/.meta/solutions/pig_latin.rb +2 -2
- data/tracks/ruby/exercises/pig-latin/pig_latin_test.rb +17 -7
- data/tracks/ruby/exercises/queen-attack/.meta/generator/queen_attack_case.rb +1 -1
- data/tracks/ruby/exercises/queen-attack/queen_attack_test.rb +7 -7
- data/tracks/ruby/exercises/sum-of-multiples/.meta/.version +1 -1
- data/tracks/ruby/exercises/sum-of-multiples/.meta/solutions/sum_of_multiples.rb +1 -1
- data/tracks/ruby/exercises/sum-of-multiples/sum_of_multiples_test.rb +7 -2
- metadata +53 -2
|
@@ -21,7 +21,7 @@ if ::($exercise).^ver !~~ $version {
|
|
|
21
21
|
|
|
22
22
|
require ::($module) <&clean-number>;
|
|
23
23
|
|
|
24
|
-
my $c-data;
|
|
24
|
+
my $c-data = from-json $=pod.pop.contents;
|
|
25
25
|
for @($c-data<cases>[0]<cases>) {
|
|
26
26
|
if .<expected> {
|
|
27
27
|
is clean-number(.<phrase>), |.<expected description>;
|
|
@@ -30,21 +30,8 @@ for @($c-data<cases>[0]<cases>) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
exit;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
subtest 'canonical-data' => {
|
|
39
|
-
(my $c-data-file = "$dir/../../problem-specifications/exercises/{
|
|
40
|
-
$dir.IO.resolve.basename
|
|
41
|
-
}/canonical-data.json".IO.resolve) ~~ :f ??
|
|
42
|
-
is-deeply $c-data, EVAL('from-json $c-data-file.slurp'), 'match problem-specifications' !!
|
|
43
|
-
flunk 'problem-specifications file not found';
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
INIT {
|
|
47
|
-
$c-data := from-json q:to/END/;
|
|
33
|
+
=head2 Canonical Data
|
|
34
|
+
=begin code
|
|
48
35
|
|
|
49
36
|
{
|
|
50
37
|
"exercise": "phone-number",
|
|
@@ -135,7 +122,19 @@ $c-data := from-json q:to/END/;
|
|
|
135
122
|
]
|
|
136
123
|
}
|
|
137
124
|
|
|
138
|
-
|
|
125
|
+
=end code
|
|
139
126
|
|
|
140
|
-
|
|
127
|
+
unless %*ENV<EXERCISM> {
|
|
128
|
+
skip-rest 'exercism tests';
|
|
129
|
+
exit;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
subtest 'canonical-data' => {
|
|
133
|
+
(my $c-data-file = "$dir/../../problem-specifications/exercises/{
|
|
134
|
+
$dir.IO.resolve.basename
|
|
135
|
+
}/canonical-data.json".IO.resolve) ~~ :f ??
|
|
136
|
+
is-deeply $c-data, EVAL('from-json $c-data-file.slurp'), 'match problem-specifications' !!
|
|
137
|
+
flunk 'problem-specifications file not found';
|
|
141
138
|
}
|
|
139
|
+
|
|
140
|
+
INIT { $module = 'Example' if %*ENV<EXERCISM> }
|
|
@@ -21,7 +21,7 @@ if ::($exercise).^ver !~~ $version {
|
|
|
21
21
|
|
|
22
22
|
require ::($module) <&convert>;
|
|
23
23
|
|
|
24
|
-
my $c-data;
|
|
24
|
+
my $c-data = from-json $=pod.pop.contents;
|
|
25
25
|
for @($c-data<cases>) {
|
|
26
26
|
subtest {
|
|
27
27
|
plan 2;
|
|
@@ -30,21 +30,8 @@ for @($c-data<cases>) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
exit;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
subtest 'canonical-data' => {
|
|
39
|
-
(my $c-data-file = "$dir/../../problem-specifications/exercises/{
|
|
40
|
-
$dir.IO.resolve.basename
|
|
41
|
-
}/canonical-data.json".IO.resolve) ~~ :f ??
|
|
42
|
-
is-deeply $c-data, EVAL('from-json $c-data-file.slurp'), 'match problem-specifications' !!
|
|
43
|
-
flunk 'problem-specifications file not found';
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
INIT {
|
|
47
|
-
$c-data := from-json q:to/END/;
|
|
33
|
+
=head2 Canonical Data
|
|
34
|
+
=begin code
|
|
48
35
|
|
|
49
36
|
{
|
|
50
37
|
"exercise": "raindrops",
|
|
@@ -161,7 +148,19 @@ $c-data := from-json q:to/END/;
|
|
|
161
148
|
]
|
|
162
149
|
}
|
|
163
150
|
|
|
164
|
-
|
|
151
|
+
=end code
|
|
165
152
|
|
|
166
|
-
|
|
153
|
+
unless %*ENV<EXERCISM> {
|
|
154
|
+
skip-rest 'exercism tests';
|
|
155
|
+
exit;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
subtest 'canonical-data' => {
|
|
159
|
+
(my $c-data-file = "$dir/../../problem-specifications/exercises/{
|
|
160
|
+
$dir.IO.resolve.basename
|
|
161
|
+
}/canonical-data.json".IO.resolve) ~~ :f ??
|
|
162
|
+
is-deeply $c-data, EVAL('from-json $c-data-file.slurp'), 'match problem-specifications' !!
|
|
163
|
+
flunk 'problem-specifications file not found';
|
|
167
164
|
}
|
|
165
|
+
|
|
166
|
+
INIT { $module = 'Example' if %*ENV<EXERCISM> }
|
|
@@ -21,7 +21,7 @@ if ::($exercise).^ver !~~ $version {
|
|
|
21
21
|
|
|
22
22
|
require ::($module) <&to-rna>;
|
|
23
23
|
|
|
24
|
-
my $c-data;
|
|
24
|
+
my $c-data = from-json $=pod.pop.contents;
|
|
25
25
|
for @($c-data<cases>) {
|
|
26
26
|
if .<expected> {
|
|
27
27
|
is .<dna>.&to-rna, |.<expected description>;
|
|
@@ -30,21 +30,8 @@ for @($c-data<cases>) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
exit;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
subtest 'canonical-data' => {
|
|
39
|
-
(my $c-data-file = "$dir/../../problem-specifications/exercises/{
|
|
40
|
-
$dir.IO.resolve.basename
|
|
41
|
-
}/canonical-data.json".IO.resolve) ~~ :f ??
|
|
42
|
-
is-deeply $c-data, EVAL('from-json $c-data-file.slurp'), 'match problem-specifications' !!
|
|
43
|
-
flunk 'problem-specifications file not found';
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
INIT {
|
|
47
|
-
$c-data := from-json q:to/END/;
|
|
33
|
+
=head2 Canonical Data
|
|
34
|
+
=begin code
|
|
48
35
|
|
|
49
36
|
{
|
|
50
37
|
"exercise": "rna-transcription",
|
|
@@ -113,7 +100,19 @@ $c-data := from-json q:to/END/;
|
|
|
113
100
|
]
|
|
114
101
|
}
|
|
115
102
|
|
|
116
|
-
|
|
103
|
+
=end code
|
|
117
104
|
|
|
118
|
-
|
|
105
|
+
unless %*ENV<EXERCISM> {
|
|
106
|
+
skip-rest 'exercism tests';
|
|
107
|
+
exit;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
subtest 'canonical-data' => {
|
|
111
|
+
(my $c-data-file = "$dir/../../problem-specifications/exercises/{
|
|
112
|
+
$dir.IO.resolve.basename
|
|
113
|
+
}/canonical-data.json".IO.resolve) ~~ :f ??
|
|
114
|
+
is-deeply $c-data, EVAL('from-json $c-data-file.slurp'), 'match problem-specifications' !!
|
|
115
|
+
flunk 'problem-specifications file not found';
|
|
119
116
|
}
|
|
117
|
+
|
|
118
|
+
INIT { $module = 'Example' if %*ENV<EXERCISM> }
|
|
@@ -21,24 +21,11 @@ if ::($exercise).^ver !~~ $version {
|
|
|
21
21
|
|
|
22
22
|
require ::($module) <&score>;
|
|
23
23
|
|
|
24
|
-
my $c-data;
|
|
24
|
+
my $c-data = from-json $=pod.pop.contents;
|
|
25
25
|
is .<input>.&score, |.<expected description> for @($c-data<cases>);
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
exit;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
subtest 'canonical-data' => {
|
|
33
|
-
(my $c-data-file = "$dir/../../problem-specifications/exercises/{
|
|
34
|
-
$dir.IO.resolve.basename
|
|
35
|
-
}/canonical-data.json".IO.resolve) ~~ :f ??
|
|
36
|
-
is-deeply $c-data, EVAL('from-json $c-data-file.slurp'), 'match problem-specifications' !!
|
|
37
|
-
flunk 'problem-specifications file not found';
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
INIT {
|
|
41
|
-
$c-data := from-json q:to/END/;
|
|
27
|
+
=head2 Canonical Data
|
|
28
|
+
=begin code
|
|
42
29
|
|
|
43
30
|
{
|
|
44
31
|
"exercise": "scrabble-score",
|
|
@@ -113,7 +100,19 @@ $c-data := from-json q:to/END/;
|
|
|
113
100
|
]
|
|
114
101
|
}
|
|
115
102
|
|
|
116
|
-
|
|
103
|
+
=end code
|
|
117
104
|
|
|
118
|
-
|
|
105
|
+
unless %*ENV<EXERCISM> {
|
|
106
|
+
skip-rest 'exercism tests';
|
|
107
|
+
exit;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
subtest 'canonical-data' => {
|
|
111
|
+
(my $c-data-file = "$dir/../../problem-specifications/exercises/{
|
|
112
|
+
$dir.IO.resolve.basename
|
|
113
|
+
}/canonical-data.json".IO.resolve) ~~ :f ??
|
|
114
|
+
is-deeply $c-data, EVAL('from-json $c-data-file.slurp'), 'match problem-specifications' !!
|
|
115
|
+
flunk 'problem-specifications file not found';
|
|
119
116
|
}
|
|
117
|
+
|
|
118
|
+
INIT { $module = 'Example' if %*ENV<EXERCISM> }
|
|
@@ -21,24 +21,11 @@ if ::($exercise).^ver !~~ $version {
|
|
|
21
21
|
|
|
22
22
|
require ::($module) <Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune>;
|
|
23
23
|
|
|
24
|
-
my $c-data;
|
|
24
|
+
my $c-data = from-json $=pod.pop.contents;
|
|
25
25
|
is (age-on ::(.<planet>): .<seconds>), |.<expected description> for @($c-data<cases>);
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
exit;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
subtest 'canonical-data' => {
|
|
33
|
-
(my $c-data-file = "$dir/../../problem-specifications/exercises/{
|
|
34
|
-
$dir.IO.resolve.basename
|
|
35
|
-
}/canonical-data.json".IO.resolve) ~~ :f ??
|
|
36
|
-
is-deeply $c-data, EVAL('from-json $c-data-file.slurp'), 'match problem-specifications' !!
|
|
37
|
-
flunk 'problem-specifications file not found';
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
INIT {
|
|
41
|
-
$c-data := from-json q:to/END/;
|
|
27
|
+
=head2 Canonical Data
|
|
28
|
+
=begin code
|
|
42
29
|
|
|
43
30
|
{
|
|
44
31
|
"exercise": "space-age",
|
|
@@ -103,7 +90,19 @@ $c-data := from-json q:to/END/;
|
|
|
103
90
|
]
|
|
104
91
|
}
|
|
105
92
|
|
|
106
|
-
|
|
93
|
+
=end code
|
|
107
94
|
|
|
108
|
-
|
|
95
|
+
unless %*ENV<EXERCISM> {
|
|
96
|
+
skip-rest 'exercism tests';
|
|
97
|
+
exit;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
subtest 'canonical-data' => {
|
|
101
|
+
(my $c-data-file = "$dir/../../problem-specifications/exercises/{
|
|
102
|
+
$dir.IO.resolve.basename
|
|
103
|
+
}/canonical-data.json".IO.resolve) ~~ :f ??
|
|
104
|
+
is-deeply $c-data, EVAL('from-json $c-data-file.slurp'), 'match problem-specifications' !!
|
|
105
|
+
flunk 'problem-specifications file not found';
|
|
109
106
|
}
|
|
107
|
+
|
|
108
|
+
INIT { $module = 'Example' if %*ENV<EXERCISM> }
|
|
@@ -21,24 +21,11 @@ if ::($exercise).^ver !~~ $version {
|
|
|
21
21
|
|
|
22
22
|
require ::($module) <&count-words>;
|
|
23
23
|
|
|
24
|
-
my $c-data;
|
|
24
|
+
my $c-data = from-json $=pod.pop.contents;
|
|
25
25
|
is-deeply (% = .<input>.&count-words), |.<expected description> for @($c-data<cases>);
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
exit;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
subtest 'canonical-data' => {
|
|
33
|
-
(my $c-data-file = "$dir/../../problem-specifications/exercises/{
|
|
34
|
-
$dir.IO.resolve.basename
|
|
35
|
-
}/canonical-data.json".IO.resolve) ~~ :f ??
|
|
36
|
-
is-deeply $c-data, EVAL('from-json $c-data-file.slurp'), 'match problem-specifications' !!
|
|
37
|
-
flunk 'problem-specifications file not found';
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
INIT {
|
|
41
|
-
$c-data := from-json q:to/END/;
|
|
27
|
+
=head2 Canonical Data
|
|
28
|
+
=begin code
|
|
42
29
|
|
|
43
30
|
{
|
|
44
31
|
"exercise": "word-count",
|
|
@@ -157,7 +144,19 @@ $c-data := from-json q:to/END/;
|
|
|
157
144
|
]
|
|
158
145
|
}
|
|
159
146
|
|
|
160
|
-
|
|
147
|
+
=end code
|
|
161
148
|
|
|
162
|
-
|
|
149
|
+
unless %*ENV<EXERCISM> {
|
|
150
|
+
skip-rest 'exercism tests';
|
|
151
|
+
exit;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
subtest 'canonical-data' => {
|
|
155
|
+
(my $c-data-file = "$dir/../../problem-specifications/exercises/{
|
|
156
|
+
$dir.IO.resolve.basename
|
|
157
|
+
}/canonical-data.json".IO.resolve) ~~ :f ??
|
|
158
|
+
is-deeply $c-data, EVAL('from-json $c-data-file.slurp'), 'match problem-specifications' !!
|
|
159
|
+
flunk 'problem-specifications file not found';
|
|
163
160
|
}
|
|
161
|
+
|
|
162
|
+
INIT { $module = 'Example' if %*ENV<EXERCISM> }
|
|
@@ -21,7 +21,7 @@ if ::($exercise).^ver !~~ $version {
|
|
|
21
21
|
|
|
22
22
|
require ::($module) <&answer>;
|
|
23
23
|
|
|
24
|
-
my $c-data;
|
|
24
|
+
my $c-data = from-json $=pod.pop.contents;
|
|
25
25
|
for @($c-data<cases>) {
|
|
26
26
|
if .<expected> === False {
|
|
27
27
|
throws-like {.<input>.&answer}, Exception, .<description>;
|
|
@@ -30,21 +30,8 @@ for @($c-data<cases>) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
exit;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
subtest 'canonical-data' => {
|
|
39
|
-
(my $c-data-file = "$dir/../../problem-specifications/exercises/{
|
|
40
|
-
$dir.IO.resolve.basename
|
|
41
|
-
}/canonical-data.json".IO.resolve) ~~ :f ??
|
|
42
|
-
is-deeply $c-data, EVAL('from-json $c-data-file.slurp'), 'match problem-specifications' !!
|
|
43
|
-
flunk 'problem-specifications file not found';
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
INIT {
|
|
47
|
-
$c-data := from-json q:to/END/;
|
|
33
|
+
=head2 Canonical Data
|
|
34
|
+
=begin code
|
|
48
35
|
|
|
49
36
|
{
|
|
50
37
|
"exercise": "wordy",
|
|
@@ -154,7 +141,19 @@ $c-data := from-json q:to/END/;
|
|
|
154
141
|
]
|
|
155
142
|
}
|
|
156
143
|
|
|
157
|
-
|
|
144
|
+
=end code
|
|
158
145
|
|
|
159
|
-
|
|
146
|
+
unless %*ENV<EXERCISM> {
|
|
147
|
+
skip-rest 'exercism tests';
|
|
148
|
+
exit;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
subtest 'canonical-data' => {
|
|
152
|
+
(my $c-data-file = "$dir/../../problem-specifications/exercises/{
|
|
153
|
+
$dir.IO.resolve.basename
|
|
154
|
+
}/canonical-data.json".IO.resolve) ~~ :f ??
|
|
155
|
+
is-deeply $c-data, EVAL('from-json $c-data-file.slurp'), 'match problem-specifications' !!
|
|
156
|
+
flunk 'problem-specifications file not found';
|
|
160
157
|
}
|
|
158
|
+
|
|
159
|
+
INIT { $module = 'Example' if %*ENV<EXERCISM> }
|
|
@@ -32,8 +32,15 @@ subtest 'Class methods', {
|
|
|
32
32
|
ok ::($exercise).can($_), $_ for <#`{{&methods}}>;
|
|
33
33
|
}
|
|
34
34
|
#`{{/methods}}#`{{#cdata}}
|
|
35
|
-
my $c-data;#`{{/cdata}}
|
|
35
|
+
my $c-data = from-json $=pod.pop.contents;#`{{/cdata}}
|
|
36
36
|
#`{{&tests}}
|
|
37
|
+
#`{{#cdata}}
|
|
38
|
+
|
|
39
|
+
=head2 Canonical Data
|
|
40
|
+
=begin code
|
|
41
|
+
|
|
42
|
+
#`{{&json}}
|
|
43
|
+
=end code#`{{/cdata}}
|
|
37
44
|
#`{{#exercism_comment}}
|
|
38
45
|
|
|
39
46
|
#`[#`{{&exercism_comment}}]#`{{/exercism_comment}}#`{{#cdata}}
|
|
@@ -51,12 +58,4 @@ subtest 'canonical-data' => {
|
|
|
51
58
|
}
|
|
52
59
|
|
|
53
60
|
#`{{/cdata}}
|
|
54
|
-
INIT {
|
|
55
|
-
$c-data := from-json q:to/END/;
|
|
56
|
-
|
|
57
|
-
#`{{&json}}
|
|
58
|
-
END
|
|
59
|
-
#`{{/cdata}}
|
|
60
|
-
|
|
61
|
-
$module = 'Example' if %*ENV<EXERCISM>;
|
|
62
|
-
}
|
|
61
|
+
INIT { $module = 'Example' if %*ENV<EXERCISM> }
|
|
@@ -273,6 +273,17 @@
|
|
|
273
273
|
"arrays",
|
|
274
274
|
"modulo"
|
|
275
275
|
]
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"uuid": "8ebcfe11-0a42-e980-d120-fb3fd581e426e9e237e",
|
|
279
|
+
"slug": "rna-transcription",
|
|
280
|
+
"core": false,
|
|
281
|
+
"unlocked_by": null,
|
|
282
|
+
"difficulty": 1,
|
|
283
|
+
"topics": [
|
|
284
|
+
"maybe",
|
|
285
|
+
"strings"
|
|
286
|
+
]
|
|
276
287
|
}
|
|
277
288
|
],
|
|
278
289
|
"foregone": [
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Rna Transcription
|
|
2
|
+
|
|
3
|
+
Given a DNA strand, return its RNA complement (per RNA transcription).
|
|
4
|
+
|
|
5
|
+
Both DNA and RNA strands are a sequence of nucleotides.
|
|
6
|
+
|
|
7
|
+
The four nucleotides found in DNA are adenine (**A**), cytosine (**C**),
|
|
8
|
+
guanine (**G**) and thymine (**T**).
|
|
9
|
+
|
|
10
|
+
The four nucleotides found in RNA are adenine (**A**), cytosine (**C**),
|
|
11
|
+
guanine (**G**) and uracil (**U**).
|
|
12
|
+
|
|
13
|
+
Given a DNA strand, its transcribed RNA strand is formed by replacing
|
|
14
|
+
each nucleotide with its complement:
|
|
15
|
+
|
|
16
|
+
* `G` -> `C`
|
|
17
|
+
* `C` -> `G`
|
|
18
|
+
* `T` -> `A`
|
|
19
|
+
* `A` -> `U`
|
|
20
|
+
## Source
|
|
21
|
+
|
|
22
|
+
Rosalind [http://rosalind.info/problems/rna](http://rosalind.info/problems/rna)
|
|
23
|
+
|
|
24
|
+
## Submitting Incomplete Solutions
|
|
25
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|