trackler 2.2.1.100 → 2.2.1.101

Sign up to get free protection for your applications and to get access to all the features.
Files changed (204) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/exercises/kindergarten-garden/canonical-data.json +37 -19
  4. data/problem-specifications/exercises/ocr-numbers/canonical-data.json +144 -110
  5. data/problem-specifications/exercises/palindrome-products/canonical-data.json +49 -25
  6. data/problem-specifications/exercises/poker/canonical-data.json +171 -115
  7. data/problem-specifications/exercises/prime-factors/canonical-data.json +22 -8
  8. data/problem-specifications/exercises/protein-translation/canonical-data.json +70 -24
  9. data/problem-specifications/exercises/proverb/canonical-data.json +24 -12
  10. data/problem-specifications/exercises/queen-attack/canonical-data.json +115 -91
  11. data/problem-specifications/exercises/rail-fence-cipher/canonical-data.json +25 -13
  12. data/problem-specifications/exercises/raindrops/canonical-data.json +55 -19
  13. data/problem-specifications/exercises/rational-numbers/canonical-data.json +374 -0
  14. data/problem-specifications/exercises/rational-numbers/description.md +27 -0
  15. data/problem-specifications/exercises/rational-numbers/metadata.yml +4 -0
  16. data/problem-specifications/exercises/rectangles/canonical-data.json +93 -67
  17. data/problem-specifications/exercises/reverse-string/canonical-data.json +16 -6
  18. data/problem-specifications/exercises/rna-transcription/metadata.yml +3 -3
  19. data/problem-specifications/exercises/roman-numerals/canonical-data.json +10 -2
  20. data/tracks/bash/config.json +11 -11
  21. data/tracks/c/exercises/roman-numerals/test/test_roman_numerals.c +7 -0
  22. data/tracks/clojure/exercises/armstrong-numbers/README.md +1 -1
  23. data/tracks/delphi/config.json +11 -0
  24. data/tracks/delphi/exercises/clock/uClockExample.pas +6 -1
  25. data/tracks/delphi/exercises/clock/uClockTest.pas +22 -19
  26. data/tracks/delphi/exercises/isbn-verifier/README.md +1 -1
  27. data/tracks/delphi/exercises/reverse-string/README.md +1 -1
  28. data/tracks/delphi/exercises/rna-transcription/README.md +1 -1
  29. data/tracks/delphi/exercises/roman-numerals/uRomanNumeralsTest.pas +14 -0
  30. data/tracks/delphi/exercises/space-age/README.md +45 -0
  31. data/tracks/delphi/exercises/space-age/SpaceAge.dpr +60 -0
  32. data/tracks/delphi/exercises/space-age/uSpaceAgeExample.pas +120 -0
  33. data/tracks/delphi/exercises/space-age/uSpaceAgeTests.pas +135 -0
  34. data/tracks/delphi/exercises/two-fer/README.md +1 -1
  35. data/tracks/elixir/exercises/nth-prime/nth_prime.exs +0 -1
  36. data/tracks/fsharp/exercises/pov/PovTest.fs +66 -53
  37. data/tracks/fsharp/exercises/space-age/Example.fs +11 -11
  38. data/tracks/fsharp/exercises/space-age/SpaceAge.fs +1 -1
  39. data/tracks/fsharp/exercises/space-age/SpaceAgeTest.fs +21 -34
  40. data/tracks/fsharp/exercises/triangle/Example.fs +11 -16
  41. data/tracks/fsharp/exercises/triangle/Triangle.fs +4 -5
  42. data/tracks/fsharp/exercises/triangle/TriangleTest.fs +44 -31
  43. data/tracks/fsharp/generators/Generators.fs +121 -0
  44. data/tracks/go/config.json +12 -0
  45. data/tracks/go/exercises/clock/.meta/gen.go +37 -13
  46. data/tracks/go/exercises/clock/cases_test.go +10 -10
  47. data/tracks/go/exercises/clock/clock_test.go +16 -2
  48. data/tracks/go/exercises/clock/example.go +4 -0
  49. data/tracks/go/exercises/clock/example_clock_test.go +3 -3
  50. data/tracks/go/exercises/parallel-letter-frequency/.meta/hints.md +33 -0
  51. data/tracks/go/exercises/parallel-letter-frequency/README.md +35 -0
  52. data/tracks/go/exercises/raindrops/.meta/hints.md +7 -4
  53. data/tracks/go/exercises/raindrops/README.md +12 -0
  54. data/tracks/go/exercises/roman-numerals/.meta/gen.go +4 -2
  55. data/tracks/go/exercises/roman-numerals/cases_test.go +3 -2
  56. data/tracks/go/exercises/space-age/.meta/hints.md +10 -0
  57. data/tracks/go/exercises/space-age/README.md +14 -1
  58. data/tracks/go/exercises/twelve-days/README.md +2 -5
  59. data/tracks/go/exercises/two-bucket/.meta/gen.go +62 -0
  60. data/tracks/go/exercises/two-bucket/.meta/hints.md +16 -0
  61. data/tracks/go/exercises/two-bucket/README.md +72 -0
  62. data/tracks/go/exercises/two-bucket/cases_test.go +44 -0
  63. data/tracks/go/exercises/two-bucket/example.go +198 -0
  64. data/tracks/go/exercises/two-bucket/two_bucket_test.go +61 -0
  65. data/tracks/idris/.travis.yml +3 -2
  66. data/tracks/idris/bin/fetch-idris-testing.sh +11 -0
  67. data/tracks/idris/bin/solve_exercises.sh +2 -2
  68. data/tracks/idris/config.json +11 -0
  69. data/tracks/idris/config/exercise_readme.go.tmpl +0 -3
  70. data/tracks/idris/docs/INSTALLATION.md +22 -0
  71. data/tracks/idris/docs/TESTS.md +12 -4
  72. data/tracks/idris/exercises/accumulate/src/Accumulate.idr +5 -0
  73. data/tracks/idris/exercises/hamming/Hamming.ipkg +2 -0
  74. data/tracks/idris/exercises/hamming/src/{example.idr → Example.idr} +5 -1
  75. data/tracks/idris/exercises/hamming/src/Hamming.idr +13 -5
  76. data/tracks/idris/exercises/hamming/src/Test/Hamming.idr +31 -58
  77. data/tracks/idris/exercises/hello-world/HelloWorld.ipkg +2 -0
  78. data/tracks/idris/exercises/hello-world/src/Example.idr +9 -0
  79. data/tracks/idris/exercises/hello-world/src/HelloWorld.idr +6 -1
  80. data/tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr +18 -18
  81. data/tracks/idris/exercises/leap/Leap.ipkg +2 -0
  82. data/tracks/idris/exercises/leap/src/{example.idr → Example.idr} +4 -0
  83. data/tracks/idris/exercises/leap/src/Leap.idr +5 -1
  84. data/tracks/idris/exercises/leap/src/Test/Leap.idr +21 -30
  85. data/tracks/idris/exercises/rna-transcription/Makefile +23 -0
  86. data/tracks/idris/exercises/rna-transcription/README.md +27 -0
  87. data/tracks/idris/exercises/rna-transcription/RnaTranscription.ipkg +5 -0
  88. data/tracks/idris/exercises/rna-transcription/src/RnaTranscription.idr +17 -0
  89. data/tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr +27 -0
  90. data/tracks/idris/exercises/rna-transcription/src/example.idr +35 -0
  91. data/tracks/java/exercises/etl/.meta/version +1 -0
  92. data/tracks/java/exercises/gigasecond/.meta/version +1 -0
  93. data/tracks/java/exercises/isbn-verifier/README.md +1 -1
  94. data/tracks/java/exercises/nucleotide-count/.meta/src/reference/java/NucleotideCounter.java +7 -1
  95. data/tracks/java/exercises/nucleotide-count/.meta/version +1 -0
  96. data/tracks/java/exercises/nucleotide-count/src/test/java/NucleotideCounterTest.java +19 -54
  97. data/tracks/java/exercises/proverb/.meta/version +1 -0
  98. data/tracks/java/exercises/reverse-string/README.md +1 -1
  99. data/tracks/java/exercises/rna-transcription/README.md +1 -1
  100. data/tracks/java/exercises/sum-of-multiples/.meta/version +1 -0
  101. data/tracks/java/exercises/sum-of-multiples/src/test/java/SumOfMultiplesTest.java +13 -1
  102. data/tracks/kotlin/config/exercise_readme.go.tmpl +0 -3
  103. data/tracks/kotlin/docs/TESTS.md +1 -1
  104. data/tracks/objective-c/config.json +11 -0
  105. data/tracks/objective-c/exercises/collatz-conjecture/CollatzConjectureExample.h +7 -0
  106. data/tracks/objective-c/exercises/collatz-conjecture/CollatzConjectureExample.m +26 -0
  107. data/tracks/objective-c/exercises/collatz-conjecture/CollatzConjectureTest.m +39 -0
  108. data/tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/project.pbxproj +31 -1
  109. data/tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/xcshareddata/xcschemes/OCLint.xcscheme +3 -1
  110. data/tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/xcshareddata/xcschemes/xobjectivecTest.xcscheme +3 -1
  111. data/tracks/ocaml/exercises/forth/example.ml +9 -9
  112. data/tracks/ocaml/tools/test-generator/Makefile +3 -9
  113. data/tracks/ocaml/tools/test-generator/src/test_gen.ml +18 -16
  114. data/tracks/perl6/exercises/acronym/.meta/exercise-data.yaml +1 -1
  115. data/tracks/perl6/exercises/acronym/acronym.t +4 -14
  116. data/tracks/perl6/exercises/all-your-base/all-your-base.t +0 -2
  117. data/tracks/perl6/exercises/allergies/allergies.t +0 -2
  118. data/tracks/perl6/exercises/anagram/.meta/exercise-data.yaml +1 -1
  119. data/tracks/perl6/exercises/anagram/anagram.t +2 -40
  120. data/tracks/perl6/exercises/atbash-cipher/atbash-cipher.t +0 -1
  121. data/tracks/perl6/exercises/bob/bob.t +0 -2
  122. data/tracks/perl6/exercises/clock/.meta/exercise-data.yaml +15 -11
  123. data/tracks/perl6/exercises/clock/.meta/solutions/Clock.pm6 +5 -1
  124. data/tracks/perl6/exercises/clock/Clock.pm6 +1 -1
  125. data/tracks/perl6/exercises/clock/clock.t +314 -217
  126. data/tracks/perl6/exercises/etl/etl.t +0 -2
  127. data/tracks/perl6/exercises/flatten-array/flatten-array.t +0 -2
  128. data/tracks/perl6/exercises/grains/grains.t +0 -2
  129. data/tracks/perl6/exercises/hamming/.meta/exercise-data.yaml +2 -2
  130. data/tracks/perl6/exercises/hamming/hamming.t +63 -35
  131. data/tracks/perl6/exercises/hello-world/hello-world.t +2 -3
  132. data/tracks/perl6/exercises/leap/.meta/exercise-data.yaml +1 -1
  133. data/tracks/perl6/exercises/leap/leap.t +14 -8
  134. data/tracks/perl6/exercises/luhn/luhn.t +0 -2
  135. data/tracks/perl6/exercises/nucleotide-count/.meta/exercise-data.yaml +2 -2
  136. data/tracks/perl6/exercises/nucleotide-count/nucleotide-count.t +18 -10
  137. data/tracks/perl6/exercises/pangram/.meta/exercise-data.yaml +1 -1
  138. data/tracks/perl6/exercises/pangram/pangram.t +32 -14
  139. data/tracks/perl6/exercises/phone-number/.meta/exercise-data.yaml +4 -4
  140. data/tracks/perl6/exercises/phone-number/.meta/solutions/Phone.pm6 +1 -1
  141. data/tracks/perl6/exercises/phone-number/Phone.pm6 +1 -1
  142. data/tracks/perl6/exercises/phone-number/phone-number.t +59 -21
  143. data/tracks/perl6/exercises/raindrops/raindrops.t +0 -2
  144. data/tracks/perl6/exercises/rna-transcription/.meta/exercise-data.yaml +1 -1
  145. data/tracks/perl6/exercises/rna-transcription/README.md +1 -1
  146. data/tracks/perl6/exercises/rna-transcription/rna-transcription.t +17 -9
  147. data/tracks/perl6/exercises/roman-numerals/.meta/exercise-data.yaml +3 -3
  148. data/tracks/perl6/exercises/roman-numerals/.meta/solutions/RomanNumerals.pm6 +1 -1
  149. data/tracks/perl6/exercises/roman-numerals/RomanNumerals.pm6 +1 -1
  150. data/tracks/perl6/exercises/roman-numerals/roman-numerals.t +66 -24
  151. data/tracks/perl6/exercises/scrabble-score/.meta/exercise-data.yaml +1 -1
  152. data/tracks/perl6/exercises/scrabble-score/scrabble-score.t +35 -15
  153. data/tracks/perl6/exercises/space-age/.meta/exercise-data.yaml +1 -1
  154. data/tracks/perl6/exercises/space-age/space-age.t +34 -20
  155. data/tracks/perl6/exercises/two-fer/.meta/exercise-data.yaml +2 -2
  156. data/tracks/perl6/exercises/two-fer/two-fer.t +15 -11
  157. data/tracks/perl6/exercises/word-count/.meta/exercise-data.yaml +1 -1
  158. data/tracks/perl6/exercises/word-count/word-count.t +46 -26
  159. data/tracks/perl6/exercises/wordy/.meta/exercise-data.yaml +2 -2
  160. data/tracks/perl6/exercises/wordy/wordy.t +51 -21
  161. data/tracks/perl6/lib/Exercism/Generator.pm6 +1 -1
  162. data/tracks/perl6/t/generated-tests.t +1 -1
  163. data/tracks/perl6/templates/test.mustache +0 -1
  164. data/tracks/python/config.json +12 -0
  165. data/tracks/python/exercises/forth/example.py +1 -1
  166. data/tracks/python/exercises/forth/forth_test.py +43 -38
  167. data/tracks/python/exercises/spiral-matrix/README.md +42 -0
  168. data/tracks/python/exercises/spiral-matrix/example.py +11 -0
  169. data/tracks/python/exercises/spiral-matrix/spiral_matrix.py +2 -0
  170. data/tracks/python/exercises/spiral-matrix/spiral_matrix_test.py +40 -0
  171. data/tracks/racket/config/exercise_readme.go.tmpl +24 -4
  172. data/tracks/racket/exercises/accumulate/README.md +3 -6
  173. data/tracks/racket/exercises/acronym/README.md +3 -4
  174. data/tracks/racket/exercises/allergies/README.md +3 -4
  175. data/tracks/racket/exercises/anagram/README.md +3 -3
  176. data/tracks/racket/exercises/bob/README.md +5 -3
  177. data/tracks/racket/exercises/collatz-conjecture/README.md +3 -3
  178. data/tracks/racket/exercises/difference-of-squares/README.md +3 -3
  179. data/tracks/racket/exercises/etl/README.md +6 -4
  180. data/tracks/racket/exercises/gigasecond/README.md +3 -3
  181. data/tracks/racket/exercises/grains/README.md +3 -4
  182. data/tracks/racket/exercises/grep/README.md +15 -15
  183. data/tracks/racket/exercises/hamming/README.md +3 -3
  184. data/tracks/racket/exercises/hello-world/README.md +1 -1
  185. data/tracks/racket/exercises/leap/README.md +4 -4
  186. data/tracks/racket/exercises/list-ops/README.md +3 -4
  187. data/tracks/racket/exercises/meetup/README.md +19 -15
  188. data/tracks/racket/exercises/nucleotide-count/README.md +11 -25
  189. data/tracks/racket/exercises/perfect-numbers/README.md +5 -5
  190. data/tracks/racket/exercises/phone-number/README.md +7 -6
  191. data/tracks/racket/exercises/raindrops/README.md +3 -3
  192. data/tracks/racket/exercises/rna-transcription/README.md +4 -4
  193. data/tracks/racket/exercises/roman-numerals/README.md +4 -4
  194. data/tracks/racket/exercises/say/README.md +3 -3
  195. data/tracks/racket/exercises/scrabble-score/README.md +6 -4
  196. data/tracks/racket/exercises/word-count/README.md +4 -5
  197. data/tracks/scheme/config/exercise_readme.go.tmpl +0 -3
  198. data/tracks/scheme/docs/INSTALLATION.md +23 -14
  199. metadata +40 -9
  200. data/tracks/idris/docs/EXERCISE_README_INSERT.md +0 -0
  201. data/tracks/idris/exercises/hello-world/src/example.idr +0 -5
  202. data/tracks/kotlin/config/exercise-readme-insert.md +0 -1
  203. data/tracks/racket/docs/EXERCISE_README_INSERT.md +0 -23
  204. data/tracks/scheme/docs/EXERCISE_README_INSERT.md +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d0139492d80a929dd82a2c17d9a2630d26ea631b
4
- data.tar.gz: 937fe9cc198cf09749d0edb6bf5d0f32430a63ce
3
+ metadata.gz: 38955198264f18fac652f3d76a421f78c1bf337e
4
+ data.tar.gz: eed248bf069e5ca2af07c9c0defaba6a79f4d099
5
5
  SHA512:
6
- metadata.gz: ce246028cbe65b42575ea7a4171a79a95fb0a0c86edb43970cf5b76345f9d058e3922a2bacc0fc3fe38a29e76391163a62eeeb3d709a3e7c3893327d3a4918ee
7
- data.tar.gz: 59a8ea0ec5f56db2a814f3b8f135566b24e360b81130ed28e8141cd63299fa38e3a69120abcc5150740b0dcd3d4d4ddf494102795a61366a36cb0eb62127030c
6
+ metadata.gz: fdc735a15f40f7fa84e5e5ef1397239a032099d9f25b768ef721d1b4572f7a7c73e02237eaa586b40d5e620fcbc6dbe0ea280b01eeeea89bbce33a906087f144
7
+ data.tar.gz: 5590a9760631b3bc7405bc76564dd23436d9f734c80baf39433bb05d5fd37900273794791d2e9b46a20ccfcaaa50cc5306013a010c2aef1b1dc481d42adfedb9
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.2.1.100"
2
+ VERSION = "2.2.1.101"
3
3
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "exercise": "kindergarten-garden",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "comments": [
5
5
  "Garden can be created with just a diagram or a diagram and students."
6
6
  ],
@@ -11,22 +11,28 @@
11
11
  {
12
12
  "description": "garden with single student",
13
13
  "property": "plants",
14
- "diagram": "RC\nGG",
15
- "student": "Alice",
14
+ "input": {
15
+ "diagram": "RC\nGG",
16
+ "student": "Alice"
17
+ },
16
18
  "expected": ["radishes", "clover", "grass", "grass"]
17
19
  },
18
20
  {
19
21
  "description": "different garden with single student",
20
22
  "property": "plants",
21
- "diagram": "VC\nRC",
22
- "student": "Alice",
23
+ "input": {
24
+ "diagram": "VC\nRC",
25
+ "student": "Alice"
26
+ },
23
27
  "expected": ["violets", "clover", "radishes", "clover"]
24
28
  },
25
29
  {
26
30
  "description": "garden with two students",
27
31
  "property": "plants",
28
- "diagram": "VVCG\nVVRC",
29
- "student": "Bob",
32
+ "input": {
33
+ "diagram": "VVCG\nVVRC",
34
+ "student": "Bob"
35
+ },
30
36
  "expected": ["clover", "grass", "radishes", "clover"]
31
37
  },
32
38
  {
@@ -35,15 +41,19 @@
35
41
  {
36
42
  "description": "second student's garden",
37
43
  "property": "plants",
38
- "diagram": "VVCCGG\nVVCCGG",
39
- "student": "Bob",
44
+ "input": {
45
+ "diagram": "VVCCGG\nVVCCGG",
46
+ "student": "Bob"
47
+ },
40
48
  "expected": ["clover", "clover", "clover", "clover"]
41
49
  },
42
50
  {
43
51
  "description": "third student's garden",
44
52
  "property": "plants",
45
- "diagram": "VVCCGG\nVVCCGG",
46
- "student": "Charlie",
53
+ "input": {
54
+ "diagram": "VVCCGG\nVVCCGG",
55
+ "student": "Charlie"
56
+ },
47
57
  "expected": ["grass", "grass", "grass", "grass"]
48
58
  }
49
59
  ]
@@ -56,29 +66,37 @@
56
66
  {
57
67
  "description": "first student's garden",
58
68
  "property": "plants",
59
- "diagram": "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV",
60
- "student": "Alice",
69
+ "input": {
70
+ "diagram": "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV",
71
+ "student": "Alice"
72
+ },
61
73
  "expected": ["violets", "radishes", "violets", "radishes"]
62
74
  },
63
75
  {
64
76
  "description": "second student's garden",
65
77
  "property": "plants",
66
- "diagram": "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV",
67
- "student": "Bob",
78
+ "input": {
79
+ "diagram": "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV",
80
+ "student": "Bob"
81
+ },
68
82
  "expected": ["clover", "grass", "clover", "clover"]
69
83
  },
70
84
  {
71
85
  "description": "second to last student's garden",
72
86
  "property": "plants",
73
- "diagram": "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV",
74
- "student": "Kincaid",
87
+ "input": {
88
+ "diagram": "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV",
89
+ "student": "Kincaid"
90
+ },
75
91
  "expected": ["grass", "clover", "clover", "grass"]
76
92
  },
77
93
  {
78
94
  "description": "last student's garden",
79
95
  "property": "plants",
80
- "diagram": "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV",
81
- "student": "Larry",
96
+ "input": {
97
+ "diagram": "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV",
98
+ "student": "Larry"
99
+ },
82
100
  "expected": ["grass", "violets", "clover", "violets"]
83
101
  }
84
102
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "exercise": "ocr-numbers",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "comments": [
5
5
  "An expectation of -1 indicates that a failure should be raised"
6
6
  ],
@@ -11,195 +11,229 @@
11
11
  {
12
12
  "description": "Recognizes 0",
13
13
  "property": "convert",
14
- "input": [
15
- " _ ",
16
- "| |",
17
- "|_|",
18
- " "
19
- ],
14
+ "input": {
15
+ "rows": [
16
+ " _ ",
17
+ "| |",
18
+ "|_|",
19
+ " "
20
+ ]
21
+ },
20
22
  "expected": "0"
21
23
  },
22
24
  {
23
25
  "description": "Recognizes 1",
24
26
  "property": "convert",
25
- "input": [
26
- " ",
27
- " |",
28
- " |",
29
- " "
30
- ],
27
+ "input": {
28
+ "rows": [
29
+ " ",
30
+ " |",
31
+ " |",
32
+ " "
33
+ ]
34
+ },
31
35
  "expected": "1"
32
36
  },
33
37
  {
34
38
  "description": "Unreadable but correctly sized inputs return ?",
35
39
  "property": "convert",
36
- "input": [
37
- " ",
38
- " _",
39
- " |",
40
- " "
41
- ],
40
+ "input": {
41
+ "rows": [
42
+ " ",
43
+ " _",
44
+ " |",
45
+ " "
46
+ ]
47
+ },
42
48
  "expected": "?"
43
49
  },
44
50
  {
45
51
  "description": "Input with a number of lines that is not a multiple of four raises an error",
46
52
  "property": "convert",
47
- "input": [
48
- " _ ",
49
- "| |",
50
- " "
51
- ],
53
+ "input": {
54
+ "rows": [
55
+ " _ ",
56
+ "| |",
57
+ " "
58
+ ]
59
+ },
52
60
  "expected": -1
53
61
  },
54
62
  {
55
63
  "description": "Input with a number of columns that is not a multiple of three raises an error",
56
64
  "property": "convert",
57
- "input": [
58
- " ",
59
- " |",
60
- " |",
61
- " "
62
- ],
65
+ "input": {
66
+ "rows": [
67
+ " ",
68
+ " |",
69
+ " |",
70
+ " "
71
+ ]
72
+ },
63
73
  "expected": -1
64
74
  },
65
75
  {
66
76
  "description": "Recognizes 110101100",
67
77
  "property": "convert",
68
- "input": [
69
- " _ _ _ _ ",
70
- " | || | || | | || || |",
71
- " | ||_| ||_| | ||_||_|",
72
- " "
73
- ],
78
+ "input": {
79
+ "rows": [
80
+ " _ _ _ _ ",
81
+ " | || | || | | || || |",
82
+ " | ||_| ||_| | ||_||_|",
83
+ " "
84
+ ]
85
+ },
74
86
  "expected": "110101100"
75
87
  },
76
88
  {
77
89
  "description": "Garbled numbers in a string are replaced with ?",
78
90
  "property": "convert",
79
- "input": [
80
- " _ _ _ ",
81
- " | || | || | || || |",
82
- " | | _| ||_| | ||_||_|",
83
- " "
84
- ],
91
+ "input": {
92
+ "rows": [
93
+ " _ _ _ ",
94
+ " | || | || | || || |",
95
+ " | | _| ||_| | ||_||_|",
96
+ " "
97
+ ]
98
+ },
85
99
  "expected": "11?10?1?0"
86
100
  },
87
101
  {
88
102
  "description": "Recognizes 2",
89
103
  "property": "convert",
90
- "input": [
91
- " _ ",
92
- " _|",
93
- "|_ ",
94
- " "
95
- ],
104
+ "input": {
105
+ "rows": [
106
+ " _ ",
107
+ " _|",
108
+ "|_ ",
109
+ " "
110
+ ]
111
+ },
96
112
  "expected": "2"
97
113
  },
98
114
  {
99
115
  "description": "Recognizes 3",
100
116
  "property": "convert",
101
- "input": [
102
- " _ ",
103
- " _|",
104
- " _|",
105
- " "
106
- ],
117
+ "input": {
118
+ "rows": [
119
+ " _ ",
120
+ " _|",
121
+ " _|",
122
+ " "
123
+ ]
124
+ },
107
125
  "expected": "3"
108
126
  },
109
127
  {
110
128
  "description": "Recognizes 4",
111
129
  "property": "convert",
112
- "input": [
113
- " ",
114
- "|_|",
115
- " |",
116
- " "
117
- ],
130
+ "input": {
131
+ "rows": [
132
+ " ",
133
+ "|_|",
134
+ " |",
135
+ " "
136
+ ]
137
+ },
118
138
  "expected": "4"
119
139
  },
120
140
  {
121
141
  "description": "Recognizes 5",
122
142
  "property": "convert",
123
- "input": [
124
- " _ ",
125
- "|_ ",
126
- " _|",
127
- " "
128
- ],
143
+ "input": {
144
+ "rows": [
145
+ " _ ",
146
+ "|_ ",
147
+ " _|",
148
+ " "
149
+ ]
150
+ },
129
151
  "expected": "5"
130
152
  },
131
153
  {
132
154
  "description": "Recognizes 6",
133
155
  "property": "convert",
134
- "input": [
135
- " _ ",
136
- "|_ ",
137
- "|_|",
138
- " "
139
- ],
156
+ "input": {
157
+ "rows": [
158
+ " _ ",
159
+ "|_ ",
160
+ "|_|",
161
+ " "
162
+ ]
163
+ },
140
164
  "expected": "6"
141
165
  },
142
166
  {
143
167
  "description": "Recognizes 7",
144
168
  "property": "convert",
145
- "input": [
146
- " _ ",
147
- " |",
148
- " |",
149
- " "
150
- ],
169
+ "input": {
170
+ "rows": [
171
+ " _ ",
172
+ " |",
173
+ " |",
174
+ " "
175
+ ]
176
+ },
151
177
  "expected": "7"
152
178
  },
153
179
  {
154
180
  "description": "Recognizes 8",
155
181
  "property": "convert",
156
- "input": [
157
- " _ ",
158
- "|_|",
159
- "|_|",
160
- " "
161
- ],
182
+ "input": {
183
+ "rows": [
184
+ " _ ",
185
+ "|_|",
186
+ "|_|",
187
+ " "
188
+ ]
189
+ },
162
190
  "expected": "8"
163
191
  },
164
192
  {
165
193
  "description": "Recognizes 9",
166
194
  "property": "convert",
167
- "input": [
168
- " _ ",
169
- "|_|",
170
- " _|",
171
- " "
172
- ],
195
+ "input": {
196
+ "rows": [
197
+ " _ ",
198
+ "|_|",
199
+ " _|",
200
+ " "
201
+ ]
202
+ },
173
203
  "expected": "9"
174
204
  },
175
205
  {
176
206
  "description": "Recognizes string of decimal numbers",
177
207
  "property": "convert",
178
- "input": [
179
- " _ _ _ _ _ _ _ _ ",
180
- " | _| _||_||_ |_ ||_||_|| |",
181
- " ||_ _| | _||_| ||_| _||_|",
182
- " "
183
- ],
208
+ "input": {
209
+ "rows": [
210
+ " _ _ _ _ _ _ _ _ ",
211
+ " | _| _||_||_ |_ ||_||_|| |",
212
+ " ||_ _| | _||_| ||_| _||_|",
213
+ " "
214
+ ]
215
+ },
184
216
  "expected": "1234567890"
185
217
  },
186
218
  {
187
219
  "description": "Numbers separated by empty lines are recognized. Lines are joined by commas.",
188
220
  "property": "convert",
189
- "input": [
190
- " _ _ ",
191
- " | _| _|",
192
- " ||_ _|",
193
- " ",
194
- " _ _ ",
195
- "|_||_ |_ ",
196
- " | _||_|",
197
- " ",
198
- " _ _ _ ",
199
- " ||_||_|",
200
- " ||_| _|",
201
- " "
202
- ],
221
+ "input": {
222
+ "rows": [
223
+ " _ _ ",
224
+ " | _| _|",
225
+ " ||_ _|",
226
+ " ",
227
+ " _ _ ",
228
+ "|_||_ |_ ",
229
+ " | _||_|",
230
+ " ",
231
+ " _ _ _ ",
232
+ " ||_||_|",
233
+ " ||_| _|",
234
+ " "
235
+ ]
236
+ },
203
237
  "expected": "123,456,789"
204
238
  }
205
239
  ]