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.
Files changed (240) hide show
  1. checksums.yaml +4 -4
  2. data/.gitmodules +3 -0
  3. data/lib/trackler/version.rb +1 -1
  4. data/problem-specifications/CONTRIBUTING.md +1 -1
  5. data/problem-specifications/TOPICS.txt +1 -0
  6. data/problem-specifications/exercises/accumulate/description.md +0 -3
  7. data/problem-specifications/exercises/hamming/canonical-data.json +3 -3
  8. data/problem-specifications/exercises/house/canonical-data.json +322 -0
  9. data/problem-specifications/exercises/palindrome-products/description.md +2 -2
  10. data/problem-specifications/exercises/simple-cipher/description.md +1 -1
  11. data/tracks/bash/config.json +0 -11
  12. data/tracks/cpp/docs/ABOUT.md +12 -37
  13. data/tracks/csharp/config.json +37 -0
  14. data/tracks/csharp/config/maintainers.json +10 -0
  15. data/tracks/csharp/docs/ABOUT.md +1 -1
  16. data/tracks/csharp/docs/RESOURCES.md +2 -2
  17. data/tracks/csharp/exercises/Exercises.All.sln +50 -8
  18. data/tracks/csharp/exercises/Exercises.Default.sln +50 -8
  19. data/tracks/csharp/exercises/collatz-conjecture/CollatzConjecture.cs +9 -0
  20. data/tracks/csharp/exercises/collatz-conjecture/CollatzConjecture.csproj +18 -0
  21. data/tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs +43 -0
  22. data/tracks/csharp/exercises/collatz-conjecture/Example.cs +30 -0
  23. data/tracks/csharp/exercises/collatz-conjecture/README.md +38 -0
  24. data/tracks/csharp/exercises/diamond/Diamond.cs +1 -1
  25. data/tracks/csharp/exercises/diamond/Diamond.csproj +3 -1
  26. data/tracks/csharp/exercises/diamond/DiamondTest.cs +39 -21
  27. data/tracks/csharp/exercises/diamond/Example.cs +2 -2
  28. data/tracks/csharp/exercises/diamond/HINTS.md +3 -1
  29. data/tracks/csharp/exercises/spiral-matrix/Example.cs +40 -0
  30. data/tracks/csharp/exercises/spiral-matrix/README.md +36 -0
  31. data/tracks/csharp/exercises/spiral-matrix/SpiralMatrix.cs +9 -0
  32. data/tracks/csharp/exercises/spiral-matrix/SpiralMatrix.csproj +18 -0
  33. data/tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs +78 -0
  34. data/tracks/csharp/exercises/two-fer/Example.cs +16 -0
  35. data/tracks/csharp/exercises/two-fer/README.md +25 -0
  36. data/tracks/csharp/exercises/two-fer/TwoFer.cs +9 -0
  37. data/tracks/csharp/exercises/two-fer/TwoFer.csproj +18 -0
  38. data/tracks/csharp/exercises/two-fer/TwoFerTest.cs +24 -0
  39. data/tracks/dart/README.md +1 -1
  40. data/tracks/dart/docs/EXERCISE_README_INSERT.md +9 -0
  41. data/tracks/dart/docs/INSTALLATION.md +13 -0
  42. data/tracks/dart/docs/LEARNING.md +6 -0
  43. data/tracks/dart/docs/RESOURCES.md +7 -0
  44. data/tracks/dart/docs/TESTS.md +133 -0
  45. data/tracks/delphi/docs/ABOUT.md +18 -5
  46. data/tracks/delphi/docs/Getting_Started_Guide.md +930 -0
  47. data/tracks/delphi/exercises/hamming/uHammingExample.pas +1 -1
  48. data/tracks/delphi/exercises/hamming/uHammingTests.pas +15 -15
  49. data/tracks/ecmascript/.travis.yml +2 -1
  50. data/tracks/ecmascript/Makefile +19 -8
  51. data/tracks/ecmascript/config.json +16 -0
  52. data/tracks/ecmascript/exercises/accumulate/package.json +5 -5
  53. data/tracks/ecmascript/exercises/acronym/package.json +5 -5
  54. data/tracks/ecmascript/exercises/all-your-base/package.json +5 -5
  55. data/tracks/ecmascript/exercises/allergies/package.json +5 -5
  56. data/tracks/ecmascript/exercises/alphametics/package.json +5 -5
  57. data/tracks/ecmascript/exercises/anagram/package.json +5 -5
  58. data/tracks/ecmascript/exercises/atbash-cipher/package.json +5 -5
  59. data/tracks/ecmascript/exercises/beer-song/package.json +5 -5
  60. data/tracks/ecmascript/exercises/binary-search-tree/package.json +5 -5
  61. data/tracks/ecmascript/exercises/binary-search/package.json +5 -5
  62. data/tracks/ecmascript/exercises/binary/package.json +5 -5
  63. data/tracks/ecmascript/exercises/bob/package.json +5 -5
  64. data/tracks/ecmascript/exercises/bracket-push/package.json +5 -5
  65. data/tracks/ecmascript/exercises/circular-buffer/package.json +5 -5
  66. data/tracks/ecmascript/exercises/clock/package.json +5 -5
  67. data/tracks/ecmascript/exercises/connect/package.json +5 -5
  68. data/tracks/ecmascript/exercises/crypto-square/package.json +5 -5
  69. data/tracks/ecmascript/exercises/custom-set/package.json +5 -5
  70. data/tracks/ecmascript/exercises/diamond/package.json +5 -5
  71. data/tracks/ecmascript/exercises/difference-of-squares/package.json +5 -5
  72. data/tracks/ecmascript/exercises/diffie-hellman/package.json +5 -5
  73. data/tracks/ecmascript/exercises/etl/package.json +5 -5
  74. data/tracks/ecmascript/exercises/flatten-array/package.json +5 -5
  75. data/tracks/ecmascript/exercises/food-chain/package.json +5 -5
  76. data/tracks/ecmascript/exercises/gigasecond/package.json +5 -5
  77. data/tracks/ecmascript/exercises/grade-school/package.json +5 -5
  78. data/tracks/ecmascript/exercises/grains/package.json +5 -5
  79. data/tracks/ecmascript/exercises/hamming/package.json +5 -5
  80. data/tracks/ecmascript/exercises/hello-world/package.json +5 -5
  81. data/tracks/ecmascript/exercises/hexadecimal/package.json +5 -5
  82. data/tracks/ecmascript/exercises/isogram/package.json +5 -5
  83. data/tracks/ecmascript/exercises/kindergarten-garden/package.json +5 -5
  84. data/tracks/ecmascript/exercises/largest-series-product/package.json +5 -5
  85. data/tracks/ecmascript/exercises/leap/package.json +5 -5
  86. data/tracks/ecmascript/exercises/linked-list/package.json +5 -5
  87. data/tracks/ecmascript/exercises/list-ops/package.json +5 -5
  88. data/tracks/ecmascript/exercises/luhn/package.json +5 -5
  89. data/tracks/ecmascript/exercises/matrix/package.json +5 -5
  90. data/tracks/ecmascript/exercises/meetup/package.json +5 -5
  91. data/tracks/ecmascript/exercises/minesweeper/package.json +5 -5
  92. data/tracks/ecmascript/exercises/nth-prime/package.json +5 -5
  93. data/tracks/ecmascript/exercises/ocr-numbers/package.json +5 -5
  94. data/tracks/ecmascript/exercises/octal/package.json +5 -5
  95. data/tracks/ecmascript/exercises/palindrome-products/package.json +5 -5
  96. data/tracks/ecmascript/exercises/pangram/package.json +5 -5
  97. data/tracks/ecmascript/exercises/pascals-triangle/package.json +5 -5
  98. data/tracks/ecmascript/exercises/perfect-numbers/package.json +5 -5
  99. data/tracks/ecmascript/exercises/phone-number/package.json +5 -5
  100. data/tracks/ecmascript/exercises/pig-latin/package.json +5 -5
  101. data/tracks/ecmascript/exercises/prime-factors/package.json +5 -5
  102. data/tracks/ecmascript/exercises/pythagorean-triplet/package.json +5 -5
  103. data/tracks/ecmascript/exercises/queen-attack/package.json +5 -5
  104. data/tracks/ecmascript/exercises/raindrops/package.json +5 -5
  105. data/tracks/ecmascript/exercises/rna-transcription/package.json +5 -5
  106. data/tracks/ecmascript/exercises/robot-name/package.json +5 -5
  107. data/tracks/ecmascript/exercises/robot-simulator/package.json +5 -5
  108. data/tracks/ecmascript/exercises/roman-numerals/package.json +5 -5
  109. data/tracks/ecmascript/exercises/run-length-encoding/README.md +59 -0
  110. data/tracks/ecmascript/exercises/run-length-encoding/example.js +13 -0
  111. data/tracks/ecmascript/exercises/run-length-encoding/package.json +69 -0
  112. data/tracks/ecmascript/exercises/run-length-encoding/run-length-encoding.spec.js +59 -0
  113. data/tracks/ecmascript/exercises/saddle-points/package.json +5 -5
  114. data/tracks/ecmascript/exercises/say/package.json +5 -5
  115. data/tracks/ecmascript/exercises/scrabble-score/package.json +5 -5
  116. data/tracks/ecmascript/exercises/secret-handshake/package.json +5 -5
  117. data/tracks/ecmascript/exercises/series/package.json +5 -5
  118. data/tracks/ecmascript/exercises/sieve/package.json +5 -5
  119. data/tracks/ecmascript/exercises/simple-cipher/package.json +5 -5
  120. data/tracks/ecmascript/exercises/space-age/package.json +5 -5
  121. data/tracks/ecmascript/exercises/strain/package.json +5 -5
  122. data/tracks/ecmascript/exercises/sublist/package.json +5 -5
  123. data/tracks/ecmascript/exercises/sum-of-multiples/package.json +5 -5
  124. data/tracks/ecmascript/exercises/triangle/package.json +5 -5
  125. data/tracks/ecmascript/exercises/trinary/package.json +5 -5
  126. data/tracks/ecmascript/exercises/twelve-days/package.json +6 -5
  127. data/tracks/ecmascript/exercises/two-bucket/package.json +5 -5
  128. data/tracks/ecmascript/exercises/word-count/package.json +5 -5
  129. data/tracks/ecmascript/exercises/wordy/package.json +5 -5
  130. data/tracks/ecmascript/package.json +5 -5
  131. data/tracks/ecmascript/yarn.lock +403 -152
  132. data/tracks/elixir/docs/ABOUT.md +7 -20
  133. data/tracks/erlang/docs/ABOUT.md +4 -6
  134. data/tracks/fsharp/config.json +2 -1
  135. data/tracks/fsharp/docs/ABOUT.md +6 -2
  136. data/tracks/gnu-apl/.gitignore +4 -0
  137. data/tracks/gnu-apl/.travis.yml +5 -0
  138. data/tracks/gnu-apl/LICENSE +21 -0
  139. data/tracks/gnu-apl/README.md +67 -0
  140. data/tracks/gnu-apl/bin/fetch-configlet +32 -0
  141. data/tracks/gnu-apl/config.json +15 -0
  142. data/tracks/{scala/exercises/binary-search/src/main/scala/BinarySearch.scala → gnu-apl/config/exercise-readme-insert.md} +0 -0
  143. data/tracks/gnu-apl/config/exercise-readme.go.tmpl +16 -0
  144. data/tracks/gnu-apl/config/maintainers.json +6 -0
  145. data/tracks/gnu-apl/docs/ABOUT.md +0 -0
  146. data/tracks/gnu-apl/docs/INSTALLATION.md +0 -0
  147. data/tracks/gnu-apl/docs/LEARNING.md +0 -0
  148. data/tracks/gnu-apl/docs/RESOURCES.md +0 -0
  149. data/tracks/gnu-apl/docs/TESTS.md +0 -0
  150. data/tracks/gnu-apl/img/.keep +0 -0
  151. data/tracks/go/docs/ABOUT.md +4 -2
  152. data/tracks/go/exercises/pangram/example.go +1 -1
  153. data/tracks/go/exercises/pangram/pangram.go +1 -1
  154. data/tracks/go/exercises/pangram/pangram_test.go +1 -3
  155. data/tracks/groovy/README.md +2 -0
  156. data/tracks/groovy/config.json +25 -20
  157. data/tracks/groovy/docs/ABOUT.md +10 -3
  158. data/tracks/groovy/exercises/difference-of-squares/DifferenceOfSquares.groovy +19 -0
  159. data/tracks/groovy/exercises/difference-of-squares/{SquaresSpec.groovy → DifferenceOfSquaresSpec.groovy} +3 -3
  160. data/tracks/groovy/exercises/difference-of-squares/Example.groovy +1 -1
  161. data/tracks/groovy/exercises/hamming/Hamming.groovy +7 -0
  162. data/tracks/groovy/exercises/leap/Example.groovy +2 -2
  163. data/tracks/groovy/exercises/leap/Leap.groovy +11 -0
  164. data/tracks/groovy/exercises/leap/LeapSpec.groovy +4 -4
  165. data/tracks/groovy/exercises/nth-prime/Example.groovy +1 -1
  166. data/tracks/groovy/exercises/nth-prime/NthPrime.groovy +7 -0
  167. data/tracks/groovy/exercises/nth-prime/{PrimeSpec.groovy → NthPrimeSpec.groovy} +6 -6
  168. data/tracks/groovy/exercises/phone-number/PhoneNumber.groovy +17 -0
  169. data/tracks/groovy/exercises/raindrops/Raindrops.groovy +7 -0
  170. data/tracks/groovy/exercises/rna-transcription/Example.groovy +1 -1
  171. data/tracks/groovy/exercises/rna-transcription/RnaTranscription.groovy +7 -0
  172. data/tracks/groovy/exercises/rna-transcription/{ComplementSpec.groovy → RnaTranscriptionSpec.groovy} +2 -2
  173. data/tracks/groovy/exercises/robot-name/Example.groovy +2 -2
  174. data/tracks/groovy/exercises/robot-name/RobotName.groovy +9 -0
  175. data/tracks/groovy/exercises/robot-name/{RobotSpec.groovy → RobotNameSpec.groovy} +6 -6
  176. data/tracks/groovy/exercises/roman-numerals/Example.groovy +2 -2
  177. data/tracks/groovy/exercises/roman-numerals/RomanNumerals.groovy +7 -0
  178. data/tracks/groovy/exercises/roman-numerals/{RomanSpec.groovy → RomanNumeralsSpec.groovy} +2 -2
  179. data/tracks/groovy/exercises/word-count/Example.groovy +2 -2
  180. data/tracks/groovy/exercises/word-count/{Phrase.groovy → WordCount.groovy} +2 -2
  181. data/tracks/groovy/exercises/word-count/WordCountSpec.groovy +47 -0
  182. data/tracks/java/config.json +84 -74
  183. data/tracks/java/docs/ABOUT.md +11 -5
  184. data/tracks/java/exercises/house/README.md +124 -0
  185. data/tracks/java/exercises/house/build.gradle +18 -0
  186. data/tracks/java/exercises/house/src/example/java/House.java +55 -0
  187. data/tracks/java/exercises/house/src/main/java/.keep +0 -0
  188. data/tracks/java/exercises/house/src/test/java/HouseTest.java +341 -0
  189. data/tracks/java/exercises/minesweeper/src/example/java/MinesweeperBoard.java +3 -3
  190. data/tracks/java/exercises/series/src/test/java/SeriesTest.java +6 -5
  191. data/tracks/java/exercises/settings.gradle +1 -0
  192. data/tracks/java/exercises/two-fer/src/test/java/TwoferTest.java +9 -0
  193. data/tracks/javascript/exercises/circular-buffer/circular-buffer.spec.js +8 -0
  194. data/tracks/javascript/exercises/simple-cipher/README.md +1 -1
  195. data/tracks/kotlin/docs/ABOUT.md +7 -10
  196. data/tracks/lisp/.travis.yml +26 -11
  197. data/tracks/purescript/docs/ABOUT.md +16 -0
  198. data/tracks/r/config.json +1 -1
  199. data/tracks/r/config/maintainers.json +9 -9
  200. data/tracks/r/docs/ABOUT.md +9 -11
  201. data/tracks/r/docs/snippet.txt +10 -0
  202. data/tracks/ruby/docs/ABOUT.md +5 -5
  203. data/tracks/ruby/exercises/collatz-conjecture/.meta/generator/collatz_conjecture_case.rb +1 -2
  204. data/tracks/ruby/exercises/space-age/.meta/generator/space_age_case.rb +1 -2
  205. data/tracks/ruby/exercises/sum-of-multiples/.meta/generator/sum_of_multiples_case.rb +1 -1
  206. data/tracks/ruby/lib/generator/exercise_case.rb +15 -0
  207. data/tracks/scala/exercises/alphametics/src/test/scala/AlphameticsTest.scala +42 -28
  208. data/tracks/scala/exercises/binary-search/example.scala +1 -1
  209. data/tracks/scala/exercises/binary-search/src/main/scala/.keep +0 -0
  210. data/tracks/scala/exercises/binary-search/src/test/scala/BinarySearchTest.scala +13 -22
  211. data/tracks/scala/exercises/bowling/src/main/scala/.keep +0 -0
  212. data/tracks/scala/exercises/bowling/src/test/scala/BowlingSuite.scala +30 -17
  213. data/tracks/scala/exercises/change/src/test/scala/ChangeTest.scala +14 -4
  214. data/tracks/scala/exercises/custom-set/src/test/scala/CustomSetTest.scala +6 -4
  215. data/tracks/scala/exercises/food-chain/example.scala +4 -2
  216. data/tracks/scala/exercises/food-chain/src/test/scala/FoodChainTest.scala +170 -59
  217. data/tracks/scala/exercises/luhn/example.scala +9 -21
  218. data/tracks/scala/exercises/luhn/src/test/scala/LuhnTest.scala +46 -10
  219. data/tracks/scala/testgen/src/main/scala/AlphametricsTestGenerator.scala +42 -0
  220. data/tracks/scala/testgen/src/main/scala/BinarySearchTestGenerator.scala +32 -42
  221. data/tracks/scala/testgen/src/main/scala/BowlingTestGenerator.scala +22 -7
  222. data/tracks/scala/testgen/src/main/scala/ChangeTestGenerator.scala +37 -0
  223. data/tracks/scala/testgen/src/main/scala/CustomSetTestGenerator.scala +25 -20
  224. data/tracks/scala/testgen/src/main/scala/FoodChainTestGenerator.scala +13 -2
  225. data/tracks/scala/testgen/src/main/scala/LuhnTestGenerator.scala +15 -0
  226. data/tracks/scala/testgen/src/main/scala/TestBuilder.scala +10 -0
  227. data/tracks/sml/.travis.yml +9 -2
  228. data/tracks/sml/Makefile +42 -0
  229. data/tracks/sml/docs/EXERCISE_README_INSERT.md +21 -5
  230. data/tracks/sml/docs/RESOURCES.md +1 -1
  231. data/tracks/sml/docs/TESTS.md +2 -2
  232. metadata +67 -17
  233. data/tracks/bash/exercises/word-count/README.md +0 -24
  234. data/tracks/bash/exercises/word-count/example.awk +0 -12
  235. data/tracks/bash/exercises/word-count/example.sh +0 -21
  236. data/tracks/dart/.github/PULL_REQUEST_TEMPLATE.md +0 -23
  237. data/tracks/ecmascript/.babelrc +0 -3
  238. data/tracks/groovy/exercises/roman-numerals/Roman.groovy +0 -33
  239. data/tracks/groovy/exercises/word-count/PhraseSpec.groovy +0 -47
  240. 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('Arguments are not same length');
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
- assert.AreEqual(0,THamming.Distance('',''));
78
+ Assert.AreEqual(0,THamming.Distance('',''));
79
79
  end;
80
80
 
81
81
  procedure HammingTests.identical_strands;
82
82
  begin
83
- assert.AreEqual(0,THamming.Distance('A','A'));
83
+ Assert.AreEqual(0,THamming.Distance('A','A'));
84
84
  end;
85
85
 
86
86
  procedure HammingTests.long_identical_strands;
87
87
  begin
88
- assert.AreEqual(0, THamming.Distance('GGACTGA', 'GGACTGA'));
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
- assert.AreEqual(1, THamming.Distance('A', 'G'));
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
- assert.AreEqual( 2, THamming.Distance('AG', 'CT'));
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
- assert.AreEqual(1, THamming.Distance('AT', 'CT'));
103
+ Assert.AreEqual(1, THamming.Distance('AT', 'CT'));
104
104
  end;
105
105
 
106
106
  procedure HammingTests.small_distance;
107
107
  begin
108
- assert.AreEqual(1, THamming.Distance('GGACG', 'GGTCG'));
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
- assert.AreEqual(2, THamming.Distance('ACCAGGG', 'ACTATGG'));
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
- assert.AreEqual(1, THamming.Distance('AGA', 'AGG'));
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
- assert.AreEqual(1, THamming.Distance('AGG', 'AGA'));
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
- assert.AreEqual(2, THamming.Distance('TAG', 'GAT'));
128
+ Assert.AreEqual(2, THamming.Distance('TAG', 'GAT'));
129
129
  end;
130
130
 
131
131
  procedure HammingTests.large_distance;
132
132
  begin
133
- assert.AreEqual(4, THamming.Distance('GATACA', 'GCATAA'));
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
- assert.AreEqual(9, THamming.Distance('GGACGGATTCTG', 'AGGACGGATTCT'));
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
- assert.WillRaise(MyProc, EArgumentException);
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
- assert.WillRaise(MyProc, EArgumentException);
158
+ Assert.WillRaiseWithMessage(MyProc, EArgumentException, 'error: left and right strands must be of equal length');
159
159
  end;
160
160
 
161
161
  initialization
@@ -6,4 +6,5 @@ sudo: false
6
6
  script:
7
7
  - bin/fetch-configlet
8
8
  - bin/configlet lint .
9
- - make test
9
+ - make test-travis
10
+
@@ -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 ?= "exercises/$(ASSIGNMENT)/tmp"
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
- test-assignment:
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) > $(OUTDIR)/temp.$(TSTFILE)
31
- @node_modules/.bin/jest $(OUTDIR)/temp.*.spec.js
32
- @rm $(OUTDIR)/*
33
- @rmdir $(OUTDIR)
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
- @for assignment in $(ASSIGNMENTS); do ASSIGNMENT=$$assignment $(MAKE) -s test-assignment || exit 1; done
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.1",
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.1"
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.1",
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.1"
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.1",
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.1"
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.1",
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.1"
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.1",
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.1"
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.1",
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.1"
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.1",
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.1"
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.1",
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.1"
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
-