trackler 2.2.1.10 → 2.2.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitmodules +3 -0
- data/lib/trackler/version.rb +1 -1
- data/problem-specifications/CONTRIBUTING.md +1 -1
- data/problem-specifications/TOPICS.txt +1 -0
- data/problem-specifications/exercises/accumulate/description.md +0 -3
- data/problem-specifications/exercises/hamming/canonical-data.json +3 -3
- data/problem-specifications/exercises/house/canonical-data.json +322 -0
- data/problem-specifications/exercises/palindrome-products/description.md +2 -2
- data/problem-specifications/exercises/simple-cipher/description.md +1 -1
- data/tracks/bash/config.json +0 -11
- data/tracks/cpp/docs/ABOUT.md +12 -37
- data/tracks/csharp/config.json +37 -0
- data/tracks/csharp/config/maintainers.json +10 -0
- data/tracks/csharp/docs/ABOUT.md +1 -1
- data/tracks/csharp/docs/RESOURCES.md +2 -2
- data/tracks/csharp/exercises/Exercises.All.sln +50 -8
- data/tracks/csharp/exercises/Exercises.Default.sln +50 -8
- data/tracks/csharp/exercises/collatz-conjecture/CollatzConjecture.cs +9 -0
- data/tracks/csharp/exercises/collatz-conjecture/CollatzConjecture.csproj +18 -0
- data/tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs +43 -0
- data/tracks/csharp/exercises/collatz-conjecture/Example.cs +30 -0
- data/tracks/csharp/exercises/collatz-conjecture/README.md +38 -0
- data/tracks/csharp/exercises/diamond/Diamond.cs +1 -1
- data/tracks/csharp/exercises/diamond/Diamond.csproj +3 -1
- data/tracks/csharp/exercises/diamond/DiamondTest.cs +39 -21
- data/tracks/csharp/exercises/diamond/Example.cs +2 -2
- data/tracks/csharp/exercises/diamond/HINTS.md +3 -1
- data/tracks/csharp/exercises/spiral-matrix/Example.cs +40 -0
- data/tracks/csharp/exercises/spiral-matrix/README.md +36 -0
- data/tracks/csharp/exercises/spiral-matrix/SpiralMatrix.cs +9 -0
- data/tracks/csharp/exercises/spiral-matrix/SpiralMatrix.csproj +18 -0
- data/tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs +78 -0
- data/tracks/csharp/exercises/two-fer/Example.cs +16 -0
- data/tracks/csharp/exercises/two-fer/README.md +25 -0
- data/tracks/csharp/exercises/two-fer/TwoFer.cs +9 -0
- data/tracks/csharp/exercises/two-fer/TwoFer.csproj +18 -0
- data/tracks/csharp/exercises/two-fer/TwoFerTest.cs +24 -0
- data/tracks/dart/README.md +1 -1
- data/tracks/dart/docs/EXERCISE_README_INSERT.md +9 -0
- data/tracks/dart/docs/INSTALLATION.md +13 -0
- data/tracks/dart/docs/LEARNING.md +6 -0
- data/tracks/dart/docs/RESOURCES.md +7 -0
- data/tracks/dart/docs/TESTS.md +133 -0
- data/tracks/delphi/docs/ABOUT.md +18 -5
- data/tracks/delphi/docs/Getting_Started_Guide.md +930 -0
- data/tracks/delphi/exercises/hamming/uHammingExample.pas +1 -1
- data/tracks/delphi/exercises/hamming/uHammingTests.pas +15 -15
- data/tracks/ecmascript/.travis.yml +2 -1
- data/tracks/ecmascript/Makefile +19 -8
- data/tracks/ecmascript/config.json +16 -0
- data/tracks/ecmascript/exercises/accumulate/package.json +5 -5
- data/tracks/ecmascript/exercises/acronym/package.json +5 -5
- data/tracks/ecmascript/exercises/all-your-base/package.json +5 -5
- data/tracks/ecmascript/exercises/allergies/package.json +5 -5
- data/tracks/ecmascript/exercises/alphametics/package.json +5 -5
- data/tracks/ecmascript/exercises/anagram/package.json +5 -5
- data/tracks/ecmascript/exercises/atbash-cipher/package.json +5 -5
- data/tracks/ecmascript/exercises/beer-song/package.json +5 -5
- data/tracks/ecmascript/exercises/binary-search-tree/package.json +5 -5
- data/tracks/ecmascript/exercises/binary-search/package.json +5 -5
- data/tracks/ecmascript/exercises/binary/package.json +5 -5
- data/tracks/ecmascript/exercises/bob/package.json +5 -5
- data/tracks/ecmascript/exercises/bracket-push/package.json +5 -5
- data/tracks/ecmascript/exercises/circular-buffer/package.json +5 -5
- data/tracks/ecmascript/exercises/clock/package.json +5 -5
- data/tracks/ecmascript/exercises/connect/package.json +5 -5
- data/tracks/ecmascript/exercises/crypto-square/package.json +5 -5
- data/tracks/ecmascript/exercises/custom-set/package.json +5 -5
- data/tracks/ecmascript/exercises/diamond/package.json +5 -5
- data/tracks/ecmascript/exercises/difference-of-squares/package.json +5 -5
- data/tracks/ecmascript/exercises/diffie-hellman/package.json +5 -5
- data/tracks/ecmascript/exercises/etl/package.json +5 -5
- data/tracks/ecmascript/exercises/flatten-array/package.json +5 -5
- data/tracks/ecmascript/exercises/food-chain/package.json +5 -5
- data/tracks/ecmascript/exercises/gigasecond/package.json +5 -5
- data/tracks/ecmascript/exercises/grade-school/package.json +5 -5
- data/tracks/ecmascript/exercises/grains/package.json +5 -5
- data/tracks/ecmascript/exercises/hamming/package.json +5 -5
- data/tracks/ecmascript/exercises/hello-world/package.json +5 -5
- data/tracks/ecmascript/exercises/hexadecimal/package.json +5 -5
- data/tracks/ecmascript/exercises/isogram/package.json +5 -5
- data/tracks/ecmascript/exercises/kindergarten-garden/package.json +5 -5
- data/tracks/ecmascript/exercises/largest-series-product/package.json +5 -5
- data/tracks/ecmascript/exercises/leap/package.json +5 -5
- data/tracks/ecmascript/exercises/linked-list/package.json +5 -5
- data/tracks/ecmascript/exercises/list-ops/package.json +5 -5
- data/tracks/ecmascript/exercises/luhn/package.json +5 -5
- data/tracks/ecmascript/exercises/matrix/package.json +5 -5
- data/tracks/ecmascript/exercises/meetup/package.json +5 -5
- data/tracks/ecmascript/exercises/minesweeper/package.json +5 -5
- data/tracks/ecmascript/exercises/nth-prime/package.json +5 -5
- data/tracks/ecmascript/exercises/ocr-numbers/package.json +5 -5
- data/tracks/ecmascript/exercises/octal/package.json +5 -5
- data/tracks/ecmascript/exercises/palindrome-products/package.json +5 -5
- data/tracks/ecmascript/exercises/pangram/package.json +5 -5
- data/tracks/ecmascript/exercises/pascals-triangle/package.json +5 -5
- data/tracks/ecmascript/exercises/perfect-numbers/package.json +5 -5
- data/tracks/ecmascript/exercises/phone-number/package.json +5 -5
- data/tracks/ecmascript/exercises/pig-latin/package.json +5 -5
- data/tracks/ecmascript/exercises/prime-factors/package.json +5 -5
- data/tracks/ecmascript/exercises/pythagorean-triplet/package.json +5 -5
- data/tracks/ecmascript/exercises/queen-attack/package.json +5 -5
- data/tracks/ecmascript/exercises/raindrops/package.json +5 -5
- data/tracks/ecmascript/exercises/rna-transcription/package.json +5 -5
- data/tracks/ecmascript/exercises/robot-name/package.json +5 -5
- data/tracks/ecmascript/exercises/robot-simulator/package.json +5 -5
- data/tracks/ecmascript/exercises/roman-numerals/package.json +5 -5
- data/tracks/ecmascript/exercises/run-length-encoding/README.md +59 -0
- data/tracks/ecmascript/exercises/run-length-encoding/example.js +13 -0
- data/tracks/ecmascript/exercises/run-length-encoding/package.json +69 -0
- data/tracks/ecmascript/exercises/run-length-encoding/run-length-encoding.spec.js +59 -0
- data/tracks/ecmascript/exercises/saddle-points/package.json +5 -5
- data/tracks/ecmascript/exercises/say/package.json +5 -5
- data/tracks/ecmascript/exercises/scrabble-score/package.json +5 -5
- data/tracks/ecmascript/exercises/secret-handshake/package.json +5 -5
- data/tracks/ecmascript/exercises/series/package.json +5 -5
- data/tracks/ecmascript/exercises/sieve/package.json +5 -5
- data/tracks/ecmascript/exercises/simple-cipher/package.json +5 -5
- data/tracks/ecmascript/exercises/space-age/package.json +5 -5
- data/tracks/ecmascript/exercises/strain/package.json +5 -5
- data/tracks/ecmascript/exercises/sublist/package.json +5 -5
- data/tracks/ecmascript/exercises/sum-of-multiples/package.json +5 -5
- data/tracks/ecmascript/exercises/triangle/package.json +5 -5
- data/tracks/ecmascript/exercises/trinary/package.json +5 -5
- data/tracks/ecmascript/exercises/twelve-days/package.json +6 -5
- data/tracks/ecmascript/exercises/two-bucket/package.json +5 -5
- data/tracks/ecmascript/exercises/word-count/package.json +5 -5
- data/tracks/ecmascript/exercises/wordy/package.json +5 -5
- data/tracks/ecmascript/package.json +5 -5
- data/tracks/ecmascript/yarn.lock +403 -152
- data/tracks/elixir/docs/ABOUT.md +7 -20
- data/tracks/erlang/docs/ABOUT.md +4 -6
- data/tracks/fsharp/config.json +2 -1
- data/tracks/fsharp/docs/ABOUT.md +6 -2
- data/tracks/gnu-apl/.gitignore +4 -0
- data/tracks/gnu-apl/.travis.yml +5 -0
- data/tracks/gnu-apl/LICENSE +21 -0
- data/tracks/gnu-apl/README.md +67 -0
- data/tracks/gnu-apl/bin/fetch-configlet +32 -0
- data/tracks/gnu-apl/config.json +15 -0
- data/tracks/{scala/exercises/binary-search/src/main/scala/BinarySearch.scala → gnu-apl/config/exercise-readme-insert.md} +0 -0
- data/tracks/gnu-apl/config/exercise-readme.go.tmpl +16 -0
- data/tracks/gnu-apl/config/maintainers.json +6 -0
- data/tracks/gnu-apl/docs/ABOUT.md +0 -0
- data/tracks/gnu-apl/docs/INSTALLATION.md +0 -0
- data/tracks/gnu-apl/docs/LEARNING.md +0 -0
- data/tracks/gnu-apl/docs/RESOURCES.md +0 -0
- data/tracks/gnu-apl/docs/TESTS.md +0 -0
- data/tracks/gnu-apl/img/.keep +0 -0
- data/tracks/go/docs/ABOUT.md +4 -2
- data/tracks/go/exercises/pangram/example.go +1 -1
- data/tracks/go/exercises/pangram/pangram.go +1 -1
- data/tracks/go/exercises/pangram/pangram_test.go +1 -3
- data/tracks/groovy/README.md +2 -0
- data/tracks/groovy/config.json +25 -20
- data/tracks/groovy/docs/ABOUT.md +10 -3
- data/tracks/groovy/exercises/difference-of-squares/DifferenceOfSquares.groovy +19 -0
- data/tracks/groovy/exercises/difference-of-squares/{SquaresSpec.groovy → DifferenceOfSquaresSpec.groovy} +3 -3
- data/tracks/groovy/exercises/difference-of-squares/Example.groovy +1 -1
- data/tracks/groovy/exercises/hamming/Hamming.groovy +7 -0
- data/tracks/groovy/exercises/leap/Example.groovy +2 -2
- data/tracks/groovy/exercises/leap/Leap.groovy +11 -0
- data/tracks/groovy/exercises/leap/LeapSpec.groovy +4 -4
- data/tracks/groovy/exercises/nth-prime/Example.groovy +1 -1
- data/tracks/groovy/exercises/nth-prime/NthPrime.groovy +7 -0
- data/tracks/groovy/exercises/nth-prime/{PrimeSpec.groovy → NthPrimeSpec.groovy} +6 -6
- data/tracks/groovy/exercises/phone-number/PhoneNumber.groovy +17 -0
- data/tracks/groovy/exercises/raindrops/Raindrops.groovy +7 -0
- data/tracks/groovy/exercises/rna-transcription/Example.groovy +1 -1
- data/tracks/groovy/exercises/rna-transcription/RnaTranscription.groovy +7 -0
- data/tracks/groovy/exercises/rna-transcription/{ComplementSpec.groovy → RnaTranscriptionSpec.groovy} +2 -2
- data/tracks/groovy/exercises/robot-name/Example.groovy +2 -2
- data/tracks/groovy/exercises/robot-name/RobotName.groovy +9 -0
- data/tracks/groovy/exercises/robot-name/{RobotSpec.groovy → RobotNameSpec.groovy} +6 -6
- data/tracks/groovy/exercises/roman-numerals/Example.groovy +2 -2
- data/tracks/groovy/exercises/roman-numerals/RomanNumerals.groovy +7 -0
- data/tracks/groovy/exercises/roman-numerals/{RomanSpec.groovy → RomanNumeralsSpec.groovy} +2 -2
- data/tracks/groovy/exercises/word-count/Example.groovy +2 -2
- data/tracks/groovy/exercises/word-count/{Phrase.groovy → WordCount.groovy} +2 -2
- data/tracks/groovy/exercises/word-count/WordCountSpec.groovy +47 -0
- data/tracks/java/config.json +84 -74
- data/tracks/java/docs/ABOUT.md +11 -5
- data/tracks/java/exercises/house/README.md +124 -0
- data/tracks/java/exercises/house/build.gradle +18 -0
- data/tracks/java/exercises/house/src/example/java/House.java +55 -0
- data/tracks/java/exercises/house/src/main/java/.keep +0 -0
- data/tracks/java/exercises/house/src/test/java/HouseTest.java +341 -0
- data/tracks/java/exercises/minesweeper/src/example/java/MinesweeperBoard.java +3 -3
- data/tracks/java/exercises/series/src/test/java/SeriesTest.java +6 -5
- data/tracks/java/exercises/settings.gradle +1 -0
- data/tracks/java/exercises/two-fer/src/test/java/TwoferTest.java +9 -0
- data/tracks/javascript/exercises/circular-buffer/circular-buffer.spec.js +8 -0
- data/tracks/javascript/exercises/simple-cipher/README.md +1 -1
- data/tracks/kotlin/docs/ABOUT.md +7 -10
- data/tracks/lisp/.travis.yml +26 -11
- data/tracks/purescript/docs/ABOUT.md +16 -0
- data/tracks/r/config.json +1 -1
- data/tracks/r/config/maintainers.json +9 -9
- data/tracks/r/docs/ABOUT.md +9 -11
- data/tracks/r/docs/snippet.txt +10 -0
- data/tracks/ruby/docs/ABOUT.md +5 -5
- data/tracks/ruby/exercises/collatz-conjecture/.meta/generator/collatz_conjecture_case.rb +1 -2
- data/tracks/ruby/exercises/space-age/.meta/generator/space_age_case.rb +1 -2
- data/tracks/ruby/exercises/sum-of-multiples/.meta/generator/sum_of_multiples_case.rb +1 -1
- data/tracks/ruby/lib/generator/exercise_case.rb +15 -0
- data/tracks/scala/exercises/alphametics/src/test/scala/AlphameticsTest.scala +42 -28
- data/tracks/scala/exercises/binary-search/example.scala +1 -1
- data/tracks/scala/exercises/binary-search/src/main/scala/.keep +0 -0
- data/tracks/scala/exercises/binary-search/src/test/scala/BinarySearchTest.scala +13 -22
- data/tracks/scala/exercises/bowling/src/main/scala/.keep +0 -0
- data/tracks/scala/exercises/bowling/src/test/scala/BowlingSuite.scala +30 -17
- data/tracks/scala/exercises/change/src/test/scala/ChangeTest.scala +14 -4
- data/tracks/scala/exercises/custom-set/src/test/scala/CustomSetTest.scala +6 -4
- data/tracks/scala/exercises/food-chain/example.scala +4 -2
- data/tracks/scala/exercises/food-chain/src/test/scala/FoodChainTest.scala +170 -59
- data/tracks/scala/exercises/luhn/example.scala +9 -21
- data/tracks/scala/exercises/luhn/src/test/scala/LuhnTest.scala +46 -10
- data/tracks/scala/testgen/src/main/scala/AlphametricsTestGenerator.scala +42 -0
- data/tracks/scala/testgen/src/main/scala/BinarySearchTestGenerator.scala +32 -42
- data/tracks/scala/testgen/src/main/scala/BowlingTestGenerator.scala +22 -7
- data/tracks/scala/testgen/src/main/scala/ChangeTestGenerator.scala +37 -0
- data/tracks/scala/testgen/src/main/scala/CustomSetTestGenerator.scala +25 -20
- data/tracks/scala/testgen/src/main/scala/FoodChainTestGenerator.scala +13 -2
- data/tracks/scala/testgen/src/main/scala/LuhnTestGenerator.scala +15 -0
- data/tracks/scala/testgen/src/main/scala/TestBuilder.scala +10 -0
- data/tracks/sml/.travis.yml +9 -2
- data/tracks/sml/Makefile +42 -0
- data/tracks/sml/docs/EXERCISE_README_INSERT.md +21 -5
- data/tracks/sml/docs/RESOURCES.md +1 -1
- data/tracks/sml/docs/TESTS.md +2 -2
- metadata +67 -17
- data/tracks/bash/exercises/word-count/README.md +0 -24
- data/tracks/bash/exercises/word-count/example.awk +0 -12
- data/tracks/bash/exercises/word-count/example.sh +0 -21
- data/tracks/dart/.github/PULL_REQUEST_TEMPLATE.md +0 -23
- data/tracks/ecmascript/.babelrc +0 -3
- data/tracks/groovy/exercises/roman-numerals/Roman.groovy +0 -33
- data/tracks/groovy/exercises/word-count/PhraseSpec.groovy +0 -47
- data/tracks/scala/exercises/bowling/src/main/scala/Bowling.scala +0 -11
@@ -15,7 +15,7 @@ class function THamming.Distance(strand1, strand2: string): integer;
|
|
15
15
|
var i: integer;
|
16
16
|
begin
|
17
17
|
if strand1.Length <> strand2.Length then
|
18
|
-
raise EArgumentException.Create('
|
18
|
+
raise EArgumentException.Create('error: left and right strands must be of equal length');
|
19
19
|
result := 0;
|
20
20
|
for i := Low(strand1) to High(strand1) do
|
21
21
|
result := result + ord(strand1[i] <> strand2[i]);
|
@@ -75,67 +75,67 @@ uses System.SysUtils, uHamming;
|
|
75
75
|
|
76
76
|
procedure HammingTests.empty_strands;
|
77
77
|
begin
|
78
|
-
|
78
|
+
Assert.AreEqual(0,THamming.Distance('',''));
|
79
79
|
end;
|
80
80
|
|
81
81
|
procedure HammingTests.identical_strands;
|
82
82
|
begin
|
83
|
-
|
83
|
+
Assert.AreEqual(0,THamming.Distance('A','A'));
|
84
84
|
end;
|
85
85
|
|
86
86
|
procedure HammingTests.long_identical_strands;
|
87
87
|
begin
|
88
|
-
|
88
|
+
Assert.AreEqual(0, THamming.Distance('GGACTGA', 'GGACTGA'));
|
89
89
|
end;
|
90
90
|
|
91
91
|
procedure HammingTests.complete_distance_in_single_nucleotide_strands;
|
92
92
|
begin
|
93
|
-
|
93
|
+
Assert.AreEqual(1, THamming.Distance('A', 'G'));
|
94
94
|
end;
|
95
95
|
|
96
96
|
procedure HammingTests.complete_distance_in_small_strands;
|
97
97
|
begin
|
98
|
-
|
98
|
+
Assert.AreEqual( 2, THamming.Distance('AG', 'CT'));
|
99
99
|
end;
|
100
100
|
|
101
101
|
procedure HammingTests.small_distance_in_small_strands;
|
102
102
|
begin
|
103
|
-
|
103
|
+
Assert.AreEqual(1, THamming.Distance('AT', 'CT'));
|
104
104
|
end;
|
105
105
|
|
106
106
|
procedure HammingTests.small_distance;
|
107
107
|
begin
|
108
|
-
|
108
|
+
Assert.AreEqual(1, THamming.Distance('GGACG', 'GGTCG'));
|
109
109
|
end;
|
110
110
|
|
111
111
|
procedure HammingTests.small_distance_in_long_strands;
|
112
112
|
begin
|
113
|
-
|
113
|
+
Assert.AreEqual(2, THamming.Distance('ACCAGGG', 'ACTATGG'));
|
114
114
|
end;
|
115
115
|
|
116
116
|
procedure HammingTests.non_unique_character_in_first_strand;
|
117
117
|
begin
|
118
|
-
|
118
|
+
Assert.AreEqual(1, THamming.Distance('AGA', 'AGG'));
|
119
119
|
end;
|
120
120
|
|
121
121
|
procedure HammingTests.non_unique_character_in_second_strand;
|
122
122
|
begin
|
123
|
-
|
123
|
+
Assert.AreEqual(1, THamming.Distance('AGG', 'AGA'));
|
124
124
|
end;
|
125
125
|
|
126
126
|
procedure HammingTests.same_nucleotides_in_different_positions;
|
127
127
|
begin
|
128
|
-
|
128
|
+
Assert.AreEqual(2, THamming.Distance('TAG', 'GAT'));
|
129
129
|
end;
|
130
130
|
|
131
131
|
procedure HammingTests.large_distance;
|
132
132
|
begin
|
133
|
-
|
133
|
+
Assert.AreEqual(4, THamming.Distance('GATACA', 'GCATAA'));
|
134
134
|
end;
|
135
135
|
|
136
136
|
procedure HammingTests.large_distance_in_off_by_one_strand;
|
137
137
|
begin
|
138
|
-
|
138
|
+
Assert.AreEqual(9, THamming.Distance('GGACGGATTCTG', 'AGGACGGATTCT'));
|
139
139
|
end;
|
140
140
|
|
141
141
|
procedure HammingTests.disallow_first_strand_longer;
|
@@ -145,7 +145,7 @@ begin
|
|
145
145
|
begin
|
146
146
|
THamming.Distance('AATG', 'AAA');
|
147
147
|
end;
|
148
|
-
|
148
|
+
Assert.WillRaiseWithMessage(MyProc, EArgumentException, 'error: left and right strands must be of equal length');
|
149
149
|
end;
|
150
150
|
|
151
151
|
procedure HammingTests.disallow_second_strand_longer;
|
@@ -155,7 +155,7 @@ begin
|
|
155
155
|
begin
|
156
156
|
THamming.Distance('ATA', 'AGTG');
|
157
157
|
end;
|
158
|
-
|
158
|
+
Assert.WillRaiseWithMessage(MyProc, EArgumentException, 'error: left and right strands must be of equal length');
|
159
159
|
end;
|
160
160
|
|
161
161
|
initialization
|
data/tracks/ecmascript/Makefile
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
+
.DEFAULT_GOAL := test
|
2
|
+
|
1
3
|
# assignments
|
2
4
|
ASSIGNMENT ?= ""
|
3
5
|
IGNOREDIRS := "^(\.git|docs|bin|node_modules|.idea)$$"
|
4
6
|
ASSIGNMENTS = $(shell find ./exercises -maxdepth 1 -mindepth 1 -type d | cut -d'/' -f3 | sort | grep -Ev $(IGNOREDIRS))
|
5
7
|
|
6
8
|
# output directories
|
7
|
-
OUTDIR ?= "
|
9
|
+
OUTDIR ?= "tmp_exercises/$(ASSIGNMENT)"
|
8
10
|
|
9
11
|
# language specific config (tweakable per language)
|
10
12
|
FILEEXT := "js"
|
@@ -20,17 +22,26 @@ test-package-files:
|
|
20
22
|
! ./bin/md5-hash $$pkg | grep -qv $(SOURCE_PKG_MD5) || { echo "$$pkg does not match main package.json"; exit 1; }; \
|
21
23
|
done
|
22
24
|
|
23
|
-
|
25
|
+
copy-assignment:
|
24
26
|
@cp package.json exercises/$(ASSIGNMENT)
|
25
|
-
@echo "running tests for: $(ASSIGNMENT)"
|
26
27
|
@mkdir -p $(OUTDIR)
|
27
28
|
@cp exercises/grains/lib/big-integer.$(FILEEXT) $(OUTDIR)
|
28
29
|
@cp exercises/$(ASSIGNMENT)/$(TSTFILE) $(OUTDIR)
|
29
30
|
@cp exercises/$(ASSIGNMENT)/$(EXAMPLE) $(OUTDIR)/$(subst _,-,$(ASSIGNMENT)).$(FILEEXT)
|
30
|
-
@sed 's/xtest/test/g' exercises/$(ASSIGNMENT)/$(TSTFILE) >
|
31
|
-
|
32
|
-
|
33
|
-
|
31
|
+
@sed 's/xtest/test/g' exercises/$(ASSIGNMENT)/$(TSTFILE) > tmp_exercises/$(ASSIGNMENT)/$(TSTFILE)
|
32
|
+
|
33
|
+
# To be run as: make test-assignment ASSIGNMENT=hello-world
|
34
|
+
test-assignment:
|
35
|
+
$(MAKE) -s copy-assignment
|
36
|
+
@node_modules/.bin/jest $(OUTDIR)
|
37
|
+
@rm -rf $(OUTDIR)
|
38
|
+
|
39
|
+
test-travis:
|
40
|
+
@echo "Preparing tests..."
|
41
|
+
@for assignment in $(ASSIGNMENTS); do ASSIGNMENT=$$assignment $(MAKE) -s copy-assignment || exit 1; done
|
42
|
+
@node_modules/.bin/jest --bail $(OUTDIR)
|
43
|
+
@rm -rf $(OUTDIR)
|
34
44
|
|
35
45
|
test:
|
36
|
-
@
|
46
|
+
@echo "Preparing tests..."
|
47
|
+
@for assignment in $(ASSIGNMENTS); do ASSIGNMENT=$$assignment $(MAKE) -s copy-assignment || exit 1; node_modules/.bin/jest --bail $(OUTDIR); rm -rf $(OUTDIR); done
|
@@ -394,6 +394,22 @@
|
|
394
394
|
"Regular expressions"
|
395
395
|
]
|
396
396
|
},
|
397
|
+
{
|
398
|
+
"uuid": "6ac4ad5f-a64a-4646-91c5-169d53f289f9",
|
399
|
+
"slug": "run-length-encoding",
|
400
|
+
"core": false,
|
401
|
+
"unlocked_by": null,
|
402
|
+
"difficulty": 2,
|
403
|
+
"topics": [
|
404
|
+
"Control flow (conditionals)",
|
405
|
+
"Exception handling",
|
406
|
+
"Parsing",
|
407
|
+
"Text formatting",
|
408
|
+
"Regular expressions",
|
409
|
+
"Pattern recognition",
|
410
|
+
"Strings"
|
411
|
+
]
|
412
|
+
},
|
397
413
|
{
|
398
414
|
"uuid": "440d78d1-9dea-466f-9bd4-935eed067409",
|
399
415
|
"slug": "acronym",
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"url": "https://github.com/exercism/xecmascript"
|
10
10
|
},
|
11
11
|
"devDependencies": {
|
12
|
-
"babel-jest": "^20.0.
|
12
|
+
"babel-jest": "^20.0.3",
|
13
13
|
"babel-plugin-transform-builtin-extend": "^1.1.2",
|
14
14
|
"babel-preset-env": "^1.4.0",
|
15
15
|
"eslint": "^3.19.0",
|
@@ -17,7 +17,7 @@
|
|
17
17
|
"eslint-plugin-import": "^2.2.0",
|
18
18
|
"eslint-plugin-jsx-a11y": "^5.0.1",
|
19
19
|
"eslint-plugin-react": "^7.0.1",
|
20
|
-
"jest": "^20.0.
|
20
|
+
"jest": "^20.0.4"
|
21
21
|
},
|
22
22
|
"jest": {
|
23
23
|
"modulePathIgnorePatterns": [
|
@@ -36,9 +36,10 @@
|
|
36
36
|
"Error"
|
37
37
|
]
|
38
38
|
}
|
39
|
-
]
|
39
|
+
],
|
40
|
+
["transform-regenerator"]
|
40
41
|
]
|
41
|
-
|
42
|
+
},
|
42
43
|
"scripts": {
|
43
44
|
"test": "jest --no-cache ./*",
|
44
45
|
"watch": "jest --no-cache --watch ./*",
|
@@ -66,4 +67,3 @@
|
|
66
67
|
],
|
67
68
|
"dependencies": {}
|
68
69
|
}
|
69
|
-
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"url": "https://github.com/exercism/xecmascript"
|
10
10
|
},
|
11
11
|
"devDependencies": {
|
12
|
-
"babel-jest": "^20.0.
|
12
|
+
"babel-jest": "^20.0.3",
|
13
13
|
"babel-plugin-transform-builtin-extend": "^1.1.2",
|
14
14
|
"babel-preset-env": "^1.4.0",
|
15
15
|
"eslint": "^3.19.0",
|
@@ -17,7 +17,7 @@
|
|
17
17
|
"eslint-plugin-import": "^2.2.0",
|
18
18
|
"eslint-plugin-jsx-a11y": "^5.0.1",
|
19
19
|
"eslint-plugin-react": "^7.0.1",
|
20
|
-
"jest": "^20.0.
|
20
|
+
"jest": "^20.0.4"
|
21
21
|
},
|
22
22
|
"jest": {
|
23
23
|
"modulePathIgnorePatterns": [
|
@@ -36,9 +36,10 @@
|
|
36
36
|
"Error"
|
37
37
|
]
|
38
38
|
}
|
39
|
-
]
|
39
|
+
],
|
40
|
+
["transform-regenerator"]
|
40
41
|
]
|
41
|
-
|
42
|
+
},
|
42
43
|
"scripts": {
|
43
44
|
"test": "jest --no-cache ./*",
|
44
45
|
"watch": "jest --no-cache --watch ./*",
|
@@ -66,4 +67,3 @@
|
|
66
67
|
],
|
67
68
|
"dependencies": {}
|
68
69
|
}
|
69
|
-
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"url": "https://github.com/exercism/xecmascript"
|
10
10
|
},
|
11
11
|
"devDependencies": {
|
12
|
-
"babel-jest": "^20.0.
|
12
|
+
"babel-jest": "^20.0.3",
|
13
13
|
"babel-plugin-transform-builtin-extend": "^1.1.2",
|
14
14
|
"babel-preset-env": "^1.4.0",
|
15
15
|
"eslint": "^3.19.0",
|
@@ -17,7 +17,7 @@
|
|
17
17
|
"eslint-plugin-import": "^2.2.0",
|
18
18
|
"eslint-plugin-jsx-a11y": "^5.0.1",
|
19
19
|
"eslint-plugin-react": "^7.0.1",
|
20
|
-
"jest": "^20.0.
|
20
|
+
"jest": "^20.0.4"
|
21
21
|
},
|
22
22
|
"jest": {
|
23
23
|
"modulePathIgnorePatterns": [
|
@@ -36,9 +36,10 @@
|
|
36
36
|
"Error"
|
37
37
|
]
|
38
38
|
}
|
39
|
-
]
|
39
|
+
],
|
40
|
+
["transform-regenerator"]
|
40
41
|
]
|
41
|
-
|
42
|
+
},
|
42
43
|
"scripts": {
|
43
44
|
"test": "jest --no-cache ./*",
|
44
45
|
"watch": "jest --no-cache --watch ./*",
|
@@ -66,4 +67,3 @@
|
|
66
67
|
],
|
67
68
|
"dependencies": {}
|
68
69
|
}
|
69
|
-
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"url": "https://github.com/exercism/xecmascript"
|
10
10
|
},
|
11
11
|
"devDependencies": {
|
12
|
-
"babel-jest": "^20.0.
|
12
|
+
"babel-jest": "^20.0.3",
|
13
13
|
"babel-plugin-transform-builtin-extend": "^1.1.2",
|
14
14
|
"babel-preset-env": "^1.4.0",
|
15
15
|
"eslint": "^3.19.0",
|
@@ -17,7 +17,7 @@
|
|
17
17
|
"eslint-plugin-import": "^2.2.0",
|
18
18
|
"eslint-plugin-jsx-a11y": "^5.0.1",
|
19
19
|
"eslint-plugin-react": "^7.0.1",
|
20
|
-
"jest": "^20.0.
|
20
|
+
"jest": "^20.0.4"
|
21
21
|
},
|
22
22
|
"jest": {
|
23
23
|
"modulePathIgnorePatterns": [
|
@@ -36,9 +36,10 @@
|
|
36
36
|
"Error"
|
37
37
|
]
|
38
38
|
}
|
39
|
-
]
|
39
|
+
],
|
40
|
+
["transform-regenerator"]
|
40
41
|
]
|
41
|
-
|
42
|
+
},
|
42
43
|
"scripts": {
|
43
44
|
"test": "jest --no-cache ./*",
|
44
45
|
"watch": "jest --no-cache --watch ./*",
|
@@ -66,4 +67,3 @@
|
|
66
67
|
],
|
67
68
|
"dependencies": {}
|
68
69
|
}
|
69
|
-
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"url": "https://github.com/exercism/xecmascript"
|
10
10
|
},
|
11
11
|
"devDependencies": {
|
12
|
-
"babel-jest": "^20.0.
|
12
|
+
"babel-jest": "^20.0.3",
|
13
13
|
"babel-plugin-transform-builtin-extend": "^1.1.2",
|
14
14
|
"babel-preset-env": "^1.4.0",
|
15
15
|
"eslint": "^3.19.0",
|
@@ -17,7 +17,7 @@
|
|
17
17
|
"eslint-plugin-import": "^2.2.0",
|
18
18
|
"eslint-plugin-jsx-a11y": "^5.0.1",
|
19
19
|
"eslint-plugin-react": "^7.0.1",
|
20
|
-
"jest": "^20.0.
|
20
|
+
"jest": "^20.0.4"
|
21
21
|
},
|
22
22
|
"jest": {
|
23
23
|
"modulePathIgnorePatterns": [
|
@@ -36,9 +36,10 @@
|
|
36
36
|
"Error"
|
37
37
|
]
|
38
38
|
}
|
39
|
-
]
|
39
|
+
],
|
40
|
+
["transform-regenerator"]
|
40
41
|
]
|
41
|
-
|
42
|
+
},
|
42
43
|
"scripts": {
|
43
44
|
"test": "jest --no-cache ./*",
|
44
45
|
"watch": "jest --no-cache --watch ./*",
|
@@ -66,4 +67,3 @@
|
|
66
67
|
],
|
67
68
|
"dependencies": {}
|
68
69
|
}
|
69
|
-
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"url": "https://github.com/exercism/xecmascript"
|
10
10
|
},
|
11
11
|
"devDependencies": {
|
12
|
-
"babel-jest": "^20.0.
|
12
|
+
"babel-jest": "^20.0.3",
|
13
13
|
"babel-plugin-transform-builtin-extend": "^1.1.2",
|
14
14
|
"babel-preset-env": "^1.4.0",
|
15
15
|
"eslint": "^3.19.0",
|
@@ -17,7 +17,7 @@
|
|
17
17
|
"eslint-plugin-import": "^2.2.0",
|
18
18
|
"eslint-plugin-jsx-a11y": "^5.0.1",
|
19
19
|
"eslint-plugin-react": "^7.0.1",
|
20
|
-
"jest": "^20.0.
|
20
|
+
"jest": "^20.0.4"
|
21
21
|
},
|
22
22
|
"jest": {
|
23
23
|
"modulePathIgnorePatterns": [
|
@@ -36,9 +36,10 @@
|
|
36
36
|
"Error"
|
37
37
|
]
|
38
38
|
}
|
39
|
-
]
|
39
|
+
],
|
40
|
+
["transform-regenerator"]
|
40
41
|
]
|
41
|
-
|
42
|
+
},
|
42
43
|
"scripts": {
|
43
44
|
"test": "jest --no-cache ./*",
|
44
45
|
"watch": "jest --no-cache --watch ./*",
|
@@ -66,4 +67,3 @@
|
|
66
67
|
],
|
67
68
|
"dependencies": {}
|
68
69
|
}
|
69
|
-
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"url": "https://github.com/exercism/xecmascript"
|
10
10
|
},
|
11
11
|
"devDependencies": {
|
12
|
-
"babel-jest": "^20.0.
|
12
|
+
"babel-jest": "^20.0.3",
|
13
13
|
"babel-plugin-transform-builtin-extend": "^1.1.2",
|
14
14
|
"babel-preset-env": "^1.4.0",
|
15
15
|
"eslint": "^3.19.0",
|
@@ -17,7 +17,7 @@
|
|
17
17
|
"eslint-plugin-import": "^2.2.0",
|
18
18
|
"eslint-plugin-jsx-a11y": "^5.0.1",
|
19
19
|
"eslint-plugin-react": "^7.0.1",
|
20
|
-
"jest": "^20.0.
|
20
|
+
"jest": "^20.0.4"
|
21
21
|
},
|
22
22
|
"jest": {
|
23
23
|
"modulePathIgnorePatterns": [
|
@@ -36,9 +36,10 @@
|
|
36
36
|
"Error"
|
37
37
|
]
|
38
38
|
}
|
39
|
-
]
|
39
|
+
],
|
40
|
+
["transform-regenerator"]
|
40
41
|
]
|
41
|
-
|
42
|
+
},
|
42
43
|
"scripts": {
|
43
44
|
"test": "jest --no-cache ./*",
|
44
45
|
"watch": "jest --no-cache --watch ./*",
|
@@ -66,4 +67,3 @@
|
|
66
67
|
],
|
67
68
|
"dependencies": {}
|
68
69
|
}
|
69
|
-
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"url": "https://github.com/exercism/xecmascript"
|
10
10
|
},
|
11
11
|
"devDependencies": {
|
12
|
-
"babel-jest": "^20.0.
|
12
|
+
"babel-jest": "^20.0.3",
|
13
13
|
"babel-plugin-transform-builtin-extend": "^1.1.2",
|
14
14
|
"babel-preset-env": "^1.4.0",
|
15
15
|
"eslint": "^3.19.0",
|
@@ -17,7 +17,7 @@
|
|
17
17
|
"eslint-plugin-import": "^2.2.0",
|
18
18
|
"eslint-plugin-jsx-a11y": "^5.0.1",
|
19
19
|
"eslint-plugin-react": "^7.0.1",
|
20
|
-
"jest": "^20.0.
|
20
|
+
"jest": "^20.0.4"
|
21
21
|
},
|
22
22
|
"jest": {
|
23
23
|
"modulePathIgnorePatterns": [
|
@@ -36,9 +36,10 @@
|
|
36
36
|
"Error"
|
37
37
|
]
|
38
38
|
}
|
39
|
-
]
|
39
|
+
],
|
40
|
+
["transform-regenerator"]
|
40
41
|
]
|
41
|
-
|
42
|
+
},
|
42
43
|
"scripts": {
|
43
44
|
"test": "jest --no-cache ./*",
|
44
45
|
"watch": "jest --no-cache --watch ./*",
|
@@ -66,4 +67,3 @@
|
|
66
67
|
],
|
67
68
|
"dependencies": {}
|
68
69
|
}
|
69
|
-
|