trackler 2.2.1.62 → 2.2.1.63

Sign up to get free protection for your applications and to get access to all the features.
Files changed (247) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/exercises/all-your-base/canonical-data.json +20 -29
  4. data/problem-specifications/exercises/forth/canonical-data.json +52 -5
  5. data/problem-specifications/exercises/isbn-verifier/canonical-data.json +15 -15
  6. data/problem-specifications/exercises/protein-translation/canonical-data.json +153 -0
  7. data/problem-specifications/exercises/reverse-string/canonical-data.json +39 -0
  8. data/problem-specifications/exercises/reverse-string/description.md +5 -0
  9. data/problem-specifications/exercises/reverse-string/metadata.yml +5 -0
  10. data/tracks/c/config.json +42 -41
  11. data/tracks/csharp/config.json +13 -0
  12. data/tracks/csharp/exercises/Exercises.sln +6 -0
  13. data/tracks/csharp/exercises/isbn-verifier/Example.cs +27 -0
  14. data/tracks/csharp/exercises/isbn-verifier/IsbnVerifier.cs +9 -0
  15. data/tracks/csharp/exercises/isbn-verifier/IsbnVerifier.csproj +19 -0
  16. data/tracks/csharp/exercises/isbn-verifier/IsbnVerifierTest.cs +84 -0
  17. data/tracks/csharp/exercises/isbn-verifier/README.md +40 -0
  18. data/tracks/csharp/generators/Exercises/IsbnVerifier.cs +15 -0
  19. data/tracks/delphi/config.json +28 -28
  20. data/tracks/erlang/config.json +10 -0
  21. data/tracks/erlang/exercises/accumulate/rebar.config +1 -1
  22. data/tracks/erlang/exercises/accumulate/test/accumulate_tests.erl +9 -7
  23. data/tracks/erlang/exercises/all-your-base/rebar.config +1 -1
  24. data/tracks/erlang/exercises/all-your-base/test/all_your_base_tests.erl +26 -24
  25. data/tracks/erlang/exercises/allergies/rebar.config +1 -1
  26. data/tracks/erlang/exercises/allergies/test/allergies_tests.erl +19 -17
  27. data/tracks/erlang/exercises/anagram/rebar.config +1 -3
  28. data/tracks/erlang/exercises/anagram/test/anagram_tests.erl +14 -12
  29. data/tracks/erlang/exercises/atbash-cipher/rebar.config +1 -1
  30. data/tracks/erlang/exercises/atbash-cipher/test/atbash_cipher_tests.erl +7 -5
  31. data/tracks/erlang/exercises/bank-account/rebar.config +1 -1
  32. data/tracks/erlang/exercises/bank-account/test/bank_account_tests.erl +52 -51
  33. data/tracks/erlang/exercises/beer-song/rebar.config +30 -0
  34. data/tracks/erlang/exercises/beer-song/test/beer_song_tests.erl +11 -10
  35. data/tracks/erlang/exercises/bob/rebar.config +1 -1
  36. data/tracks/erlang/exercises/bob/test/bob_tests.erl +33 -35
  37. data/tracks/erlang/exercises/circular-buffer/rebar.config +1 -1
  38. data/tracks/erlang/exercises/circular-buffer/test/circular_buffer_tests.erl +33 -32
  39. data/tracks/erlang/exercises/clock/rebar.config +1 -1
  40. data/tracks/erlang/exercises/clock/test/clock_tests.erl +57 -50
  41. data/tracks/erlang/exercises/collatz-conjecture/rebar.config +1 -1
  42. data/tracks/erlang/exercises/collatz-conjecture/test/collatz_conjecture_tests.erl +11 -9
  43. data/tracks/erlang/exercises/complex-numbers/rebar.config +1 -1
  44. data/tracks/erlang/exercises/complex-numbers/test/complex_numbers_tests.erl +102 -76
  45. data/tracks/erlang/exercises/custom-set/rebar.config +1 -1
  46. data/tracks/erlang/exercises/custom-set/test/custom_set_tests.erl +100 -109
  47. data/tracks/erlang/exercises/difference-of-squares/rebar.config +1 -1
  48. data/tracks/erlang/exercises/difference-of-squares/test/difference_of_squares_tests.erl +8 -7
  49. data/tracks/erlang/exercises/etl/rebar.config +1 -1
  50. data/tracks/erlang/exercises/etl/test/etl_tests.erl +6 -5
  51. data/tracks/erlang/exercises/gigasecond/rebar.config +1 -1
  52. data/tracks/erlang/exercises/gigasecond/test/gigasecond_tests.erl +9 -8
  53. data/tracks/erlang/exercises/grade-school/rebar.config +1 -1
  54. data/tracks/erlang/exercises/grade-school/test/grade_school_tests.erl +27 -23
  55. data/tracks/erlang/exercises/grains/rebar.config +1 -1
  56. data/tracks/erlang/exercises/grains/test/grains_tests.erl +7 -6
  57. data/tracks/erlang/exercises/hamming/rebar.config +1 -1
  58. data/tracks/erlang/exercises/hamming/test/hamming_tests.erl +20 -23
  59. data/tracks/erlang/exercises/hello-world/rebar.config +1 -1
  60. data/tracks/erlang/exercises/hello-world/test/hello_world_tests.erl +6 -4
  61. data/tracks/erlang/exercises/isogram/rebar.config +1 -1
  62. data/tracks/erlang/exercises/isogram/test/isogram_tests.erl +14 -12
  63. data/tracks/erlang/exercises/largest-series-product/rebar.config +1 -1
  64. data/tracks/erlang/exercises/largest-series-product/test/largest_series_product_tests.erl +22 -21
  65. data/tracks/erlang/exercises/leap/rebar.config +1 -1
  66. data/tracks/erlang/exercises/leap/test/leap_tests.erl +8 -7
  67. data/tracks/erlang/exercises/luhn/rebar.config +1 -1
  68. data/tracks/erlang/exercises/luhn/test/luhn_tests.erl +18 -16
  69. data/tracks/erlang/exercises/meetup/rebar.config +1 -1
  70. data/tracks/erlang/exercises/meetup/test/meetup_tests.erl +96 -95
  71. data/tracks/erlang/exercises/nucleotide-count/rebar.config +1 -1
  72. data/tracks/erlang/exercises/nucleotide-count/test/nucleotide_count_tests.erl +12 -11
  73. data/tracks/erlang/exercises/pangram/README.md +60 -0
  74. data/tracks/erlang/exercises/{accumulate → pangram}/include/exercism.hrl +0 -0
  75. data/tracks/erlang/exercises/{beer-song/rebar.conf → pangram/rebar.config} +0 -0
  76. data/tracks/erlang/exercises/pangram/src/example.erl +11 -0
  77. data/tracks/erlang/exercises/pangram/src/pangram.app.src +9 -0
  78. data/tracks/erlang/exercises/pangram/src/pangram.erl +8 -0
  79. data/tracks/erlang/exercises/pangram/test/pangram_tests.erl +38 -0
  80. data/tracks/erlang/exercises/parallel-letter-frequency/rebar.config +1 -1
  81. data/tracks/erlang/exercises/parallel-letter-frequency/test/parallel_letter_frequency_tests.erl +7 -6
  82. data/tracks/erlang/exercises/phone-number/rebar.config +1 -1
  83. data/tracks/erlang/exercises/phone-number/test/phone_number_tests.erl +13 -12
  84. data/tracks/erlang/exercises/rna-transcription/rebar.config +1 -1
  85. data/tracks/erlang/exercises/rna-transcription/test/rna_transcription_tests.erl +13 -11
  86. data/tracks/erlang/exercises/robot-simulator/rebar.config +1 -1
  87. data/tracks/erlang/exercises/robot-simulator/test/robot_simulator_tests.erl +70 -69
  88. data/tracks/erlang/exercises/roman-numerals/rebar.config +1 -1
  89. data/tracks/erlang/exercises/roman-numerals/test/roman_numerals_tests.erl +6 -5
  90. data/tracks/erlang/exercises/rotational-cipher/rebar.config +1 -8
  91. data/tracks/erlang/exercises/rotational-cipher/test/rotational_cipher_tests.erl +29 -27
  92. data/tracks/erlang/exercises/scrabble-score/rebar.config +1 -1
  93. data/tracks/erlang/exercises/scrabble-score/test/scrabble_score_tests.erl +6 -5
  94. data/tracks/erlang/exercises/series/rebar.config +1 -1
  95. data/tracks/erlang/exercises/series/test/series_tests.erl +6 -5
  96. data/tracks/erlang/exercises/sieve/rebar.config +1 -1
  97. data/tracks/erlang/exercises/sieve/test/sieve_tests.erl +10 -8
  98. data/tracks/erlang/exercises/space-age/rebar.config +1 -1
  99. data/tracks/erlang/exercises/space-age/test/space_age_tests.erl +20 -19
  100. data/tracks/erlang/exercises/spiral-matrix/rebar.config +1 -1
  101. data/tracks/erlang/exercises/spiral-matrix/test/spiral_matrix_tests.erl +12 -10
  102. data/tracks/erlang/exercises/strain/rebar.config +1 -1
  103. data/tracks/erlang/exercises/strain/test/strain_tests.erl +17 -16
  104. data/tracks/erlang/exercises/sum-of-multiples/rebar.config +1 -1
  105. data/tracks/erlang/exercises/sum-of-multiples/test/sum_of_multiples_tests.erl +16 -15
  106. data/tracks/erlang/exercises/triangle/rebar.config +1 -1
  107. data/tracks/erlang/exercises/triangle/test/triangle_tests.erl +20 -19
  108. data/tracks/erlang/exercises/two-fer/rebar.config +1 -1
  109. data/tracks/erlang/exercises/two-fer/test/two_fer_tests.erl +8 -7
  110. data/tracks/erlang/exercises/word-count/rebar.config +1 -1
  111. data/tracks/erlang/exercises/word-count/test/word_count_tests.erl +6 -5
  112. data/tracks/erlang/exercises/zipper/rebar.config +1 -1
  113. data/tracks/erlang/exercises/zipper/test/zipper_tests.erl +47 -46
  114. data/tracks/erlang/testgen/src/tgen.erl +8 -6
  115. data/tracks/erlang/testgen/src/tgen_bob.erl +1 -1
  116. data/tracks/erlang/testgen/src/tgen_collatz-conjecture.erl +2 -2
  117. data/tracks/erlang/testgen/src/tgen_complex-numbers.erl +11 -11
  118. data/tracks/erlang/testgen/src/tgen_custom-set.erl +14 -14
  119. data/tracks/erlang/testgen/src/tgen_hamming.erl +2 -2
  120. data/tracks/erlang/testgen/src/tgen_hello-world.erl +1 -1
  121. data/tracks/erlang/testgen/src/tgen_leap.erl +1 -1
  122. data/tracks/erlang/testgen/src/tgen_rna-transcription.erl +2 -2
  123. data/tracks/erlang/testgen/src/tgs.erl +6 -0
  124. data/tracks/fsharp/exercises/beer-song/BeerSong.fs +1 -5
  125. data/tracks/fsharp/exercises/beer-song/BeerSongTest.fs +342 -20
  126. data/tracks/fsharp/exercises/beer-song/Example.fs +16 -10
  127. data/tracks/fsharp/exercises/food-chain/Example.fs +1 -1
  128. data/tracks/fsharp/exercises/food-chain/FoodChain.fs +1 -3
  129. data/tracks/fsharp/exercises/food-chain/FoodChainTest.fs +11 -11
  130. data/tracks/fsharp/exercises/house/Example.fs +1 -1
  131. data/tracks/fsharp/exercises/house/House.fs +1 -3
  132. data/tracks/fsharp/exercises/house/HouseTest.fs +202 -202
  133. data/tracks/fsharp/exercises/proverb/Example.fs +9 -9
  134. data/tracks/fsharp/exercises/proverb/Proverb.fs +1 -3
  135. data/tracks/fsharp/exercises/proverb/ProverbTest.fs +50 -21
  136. data/tracks/fsharp/exercises/twelve-days/Example.fs +4 -4
  137. data/tracks/fsharp/exercises/twelve-days/TwelveDays.fs +2 -6
  138. data/tracks/fsharp/exercises/twelve-days/TwelveDaysTest.fs +81 -57
  139. data/tracks/fsharp/generators/Generators.fs +39 -15
  140. data/tracks/go/bin/run-generators +5 -1
  141. data/tracks/go/config.json +14 -2
  142. data/tracks/go/exercises/accumulate/example.go +2 -1
  143. data/tracks/go/exercises/zebra-puzzle/.meta/hints.md +24 -0
  144. data/tracks/go/exercises/zebra-puzzle/README.md +76 -0
  145. data/tracks/go/exercises/zebra-puzzle/example.go +256 -0
  146. data/tracks/go/exercises/zebra-puzzle/zebra_puzzle_test.go +18 -0
  147. data/tracks/haskell/exercises/forth/package.yaml +1 -1
  148. data/tracks/haskell/exercises/forth/test/Tests.hs +1 -4
  149. data/tracks/haskell/exercises/pascals-triangle/package.yaml +1 -1
  150. data/tracks/haskell/exercises/pascals-triangle/test/Tests.hs +22 -1
  151. data/tracks/java/POLICIES.md +3 -3
  152. data/tracks/java/config.json +21 -2
  153. data/tracks/java/exercises/atbash-cipher/.meta/src/reference/java/Atbash.java +12 -12
  154. data/tracks/java/exercises/protein-translation/.meta/src/reference/java/ProteinTranslator.java +47 -0
  155. data/tracks/java/exercises/protein-translation/.meta/version +1 -0
  156. data/tracks/java/exercises/protein-translation/README.md +58 -0
  157. data/tracks/java/exercises/protein-translation/build.gradle +18 -0
  158. data/tracks/java/exercises/protein-translation/src/main/java/ProteinTranslator.java +8 -0
  159. data/tracks/java/exercises/protein-translation/src/test/java/ProteinTranslatorTest.java +179 -0
  160. data/tracks/java/exercises/settings.gradle +1 -0
  161. data/tracks/javascript/.eslintignore +2 -2
  162. data/tracks/javascript/exercises/accumulate/example.js +1 -2
  163. data/tracks/javascript/exercises/grains/example.js +6 -3
  164. data/tracks/kotlin/exercises/beer-song/.meta/src/reference/kotlin/BeerSong.kt +3 -3
  165. data/tracks/kotlin/exercises/beer-song/.meta/version +1 -1
  166. data/tracks/kotlin/exercises/beer-song/README.md +1 -1
  167. data/tracks/kotlin/exercises/beer-song/src/test/kotlin/BeerSongTest.kt +6 -6
  168. data/tracks/kotlin/exercises/forth/.meta/version +1 -1
  169. data/tracks/kotlin/exercises/forth/src/test/kotlin/ForthEvaluatorTest.kt +0 -7
  170. data/tracks/kotlin/exercises/meetup/README.md +16 -12
  171. data/tracks/kotlin/exercises/nth-prime/.meta/src/reference/kotlin/Prime.kt +7 -2
  172. data/tracks/kotlin/exercises/nth-prime/.meta/version +1 -1
  173. data/tracks/kotlin/exercises/nth-prime/src/test/kotlin/PrimeTest.kt +10 -1
  174. data/tracks/kotlin/exercises/nucleotide-count/README.md +2 -2
  175. data/tracks/kotlin/exercises/pascals-triangle/.meta/src/reference/kotlin/PascalsTriangle.kt +1 -1
  176. data/tracks/kotlin/exercises/pascals-triangle/.meta/version +1 -1
  177. data/tracks/kotlin/exercises/pascals-triangle/src/test/kotlin/PascalsTriangleTest.kt +58 -1
  178. data/tracks/kotlin/exercises/sum-of-multiples/README.md +3 -3
  179. data/tracks/ocaml/exercises/forth/test.ml +1 -3
  180. data/tracks/ocaml/exercises/rectangles/example.ml +11 -11
  181. data/tracks/php/exercises/bob/example.php +2 -2
  182. data/tracks/purescript/config.json +3 -3
  183. data/tracks/python/config.json +34 -22
  184. data/tracks/python/exercises/alphametics/example.py +90 -34
  185. data/tracks/python/exercises/ocr-numbers/example.py +18 -21
  186. data/tracks/python/exercises/ocr-numbers/ocr_numbers.py +1 -5
  187. data/tracks/python/exercises/ocr-numbers/ocr_numbers_test.py +124 -106
  188. data/tracks/python/exercises/simple-linked-list/README.md +49 -0
  189. data/tracks/python/exercises/simple-linked-list/example.py +67 -0
  190. data/tracks/python/exercises/simple-linked-list/hints.md +10 -0
  191. data/tracks/python/exercises/simple-linked-list/simple_linked_list.py +33 -0
  192. data/tracks/python/exercises/simple-linked-list/simple_linked_list_test.py +112 -0
  193. data/tracks/rust/README.md +2 -0
  194. data/tracks/rust/bin/init_exercise.py +586 -0
  195. data/tracks/rust/config.json +20 -10
  196. data/tracks/rust/exercises/book-store/.gitignore +3 -0
  197. data/tracks/rust/exercises/book-store/Cargo-example.toml +7 -0
  198. data/tracks/rust/exercises/book-store/Cargo.toml +6 -0
  199. data/tracks/rust/exercises/book-store/README.md +107 -0
  200. data/tracks/rust/exercises/book-store/example.rs +187 -0
  201. data/tracks/rust/exercises/book-store/src/lib.rs +3 -0
  202. data/tracks/rust/exercises/book-store/tests/book-store.rs +130 -0
  203. data/tracks/sml/config.json +8 -8
  204. data/tracks/typescript/config.json +6 -6
  205. metadata +43 -46
  206. data/tracks/erlang/exercises/all-your-base/include/exercism.hrl +0 -11
  207. data/tracks/erlang/exercises/allergies/include/exercism.hrl +0 -11
  208. data/tracks/erlang/exercises/anagram/include/exercism.hrl +0 -11
  209. data/tracks/erlang/exercises/atbash-cipher/include/exercism.hrl +0 -11
  210. data/tracks/erlang/exercises/bank-account/include/exercism.hrl +0 -11
  211. data/tracks/erlang/exercises/beer-song/include/exercism.hrl +0 -11
  212. data/tracks/erlang/exercises/bob/include/exercism.hrl +0 -11
  213. data/tracks/erlang/exercises/circular-buffer/include/exercism.hrl +0 -11
  214. data/tracks/erlang/exercises/clock/include/exercism.hrl +0 -11
  215. data/tracks/erlang/exercises/collatz-conjecture/include/exercism.hrl +0 -11
  216. data/tracks/erlang/exercises/complex-numbers/include/exercism.hrl +0 -11
  217. data/tracks/erlang/exercises/custom-set/include/exercism.hrl +0 -11
  218. data/tracks/erlang/exercises/difference-of-squares/include/exercism.hrl +0 -11
  219. data/tracks/erlang/exercises/etl/include/exercism.hrl +0 -11
  220. data/tracks/erlang/exercises/gigasecond/include/exercism.hrl +0 -11
  221. data/tracks/erlang/exercises/grade-school/include/exercism.hrl +0 -11
  222. data/tracks/erlang/exercises/grains/include/exercism.hrl +0 -11
  223. data/tracks/erlang/exercises/hamming/include/exercism.hrl +0 -11
  224. data/tracks/erlang/exercises/hello-world/include/exercism.hrl +0 -11
  225. data/tracks/erlang/exercises/isogram/include/exercism.hrl +0 -11
  226. data/tracks/erlang/exercises/largest-series-product/include/exercism.hrl +0 -11
  227. data/tracks/erlang/exercises/leap/include/exercism.hrl +0 -11
  228. data/tracks/erlang/exercises/luhn/include/exercism.hrl +0 -11
  229. data/tracks/erlang/exercises/meetup/include/exercism.hrl +0 -11
  230. data/tracks/erlang/exercises/nucleotide-count/include/exercism.hrl +0 -11
  231. data/tracks/erlang/exercises/parallel-letter-frequency/include/exercism.hrl +0 -11
  232. data/tracks/erlang/exercises/phone-number/include/exercism.hrl +0 -11
  233. data/tracks/erlang/exercises/rna-transcription/include/exercism.hrl +0 -11
  234. data/tracks/erlang/exercises/robot-simulator/include/exercism.hrl +0 -11
  235. data/tracks/erlang/exercises/roman-numerals/include/exercism.hrl +0 -11
  236. data/tracks/erlang/exercises/rotational-cipher/include/exercism.hrl +0 -11
  237. data/tracks/erlang/exercises/scrabble-score/include/exercism.hrl +0 -11
  238. data/tracks/erlang/exercises/series/include/exercism.hrl +0 -11
  239. data/tracks/erlang/exercises/sieve/include/exercism.hrl +0 -11
  240. data/tracks/erlang/exercises/space-age/include/exercism.hrl +0 -11
  241. data/tracks/erlang/exercises/spiral-matrix/include/exercism.hrl +0 -11
  242. data/tracks/erlang/exercises/strain/include/exercism.hrl +0 -11
  243. data/tracks/erlang/exercises/sum-of-multiples/include/exercism.hrl +0 -11
  244. data/tracks/erlang/exercises/triangle/include/exercism.hrl +0 -11
  245. data/tracks/erlang/exercises/two-fer/include/exercism.hrl +0 -11
  246. data/tracks/erlang/exercises/word-count/include/exercism.hrl +0 -11
  247. data/tracks/erlang/exercises/zipper/include/exercism.hrl +0 -11
@@ -27,8 +27,8 @@ generate_test(#{description := Desc, expected := Exp, property := Prop, input :=
27
27
  erl_syntax:infix_expr(
28
28
  tgs:value(Exp),
29
29
  erl_syntax:operator("=="),
30
- tgs:call_macro("TESTED_MODULE:" ++ Property, [
31
- tgs:call_macro("TESTED_MODULE:new", lists:map(fun tgs:value/1, Cplx))]))])]),
30
+ tgs:call_fun("complex_numbers:" ++ Property, [
31
+ tgs:call_fun("complex_numbers:new", lists:map(fun tgs:value/1, Cplx))]))])]),
32
32
 
33
33
  {ok, Fn, [{Property, ["Z"]}]};
34
34
  generate_test(#{description := Desc, expected := Exp, property := Prop, input := Z}) ->
@@ -40,10 +40,10 @@ generate_test(#{description := Desc, expected := Exp, property := Prop, input :=
40
40
 
41
41
  Fn = tgs:simple_fun(TestName, [
42
42
  tgs:call_macro("assert", [
43
- tgs:call_macro("TESTED_MODULE:equal", [
44
- tgs:call_macro("TESTED_MODULE:new", lists:map(fun tgs:value/1, Expected)),
45
- tgs:call_macro("TESTED_MODULE:" ++ Property, [
46
- tgs:call_macro("TESTED_MODULE:new", lists:map(fun tgs:value/1, Cplx))])])])]),
43
+ tgs:call_fun("complex_numbers:equal", [
44
+ tgs:call_fun("complex_numbers:new", lists:map(fun tgs:value/1, Expected)),
45
+ tgs:call_fun("complex_numbers:" ++ Property, [
46
+ tgs:call_fun("complex_numbers:new", lists:map(fun tgs:value/1, Cplx))])])])]),
47
47
 
48
48
  {ok, Fn, [{Property, ["Z"]}]};
49
49
  generate_test(#{description := Desc, expected := Exp, property := <<"div">>, z1 := Z1, z2 := Z2}) ->
@@ -58,11 +58,11 @@ generate_test(#{description := Desc, expected := Exp, property := Prop, z1 := Z1
58
58
 
59
59
  Fn = tgs:simple_fun(TestName, [
60
60
  tgs:call_macro("assert", [
61
- tgs:call_macro("TESTED_MODULE:equal", [
62
- tgs:call_macro("TESTED_MODULE:new", lists:map(fun tgs:value/1, Expected)),
63
- tgs:call_macro("TESTED_MODULE:" ++ Property, [
64
- tgs:call_macro("TESTED_MODULE:new", lists:map(fun tgs:value/1, Cplx1)),
65
- tgs:call_macro("TESTED_MODULE:new", lists:map(fun tgs:value/1, Cplx2))])])])]),
61
+ tgs:call_fun("complex_numbers:equal", [
62
+ tgs:call_fun("complex_numbers:new", lists:map(fun tgs:value/1, Expected)),
63
+ tgs:call_fun("complex_numbers:" ++ Property, [
64
+ tgs:call_fun("complex_numbers:new", lists:map(fun tgs:value/1, Cplx1)),
65
+ tgs:call_fun("complex_numbers:new", lists:map(fun tgs:value/1, Cplx2))])])])]),
66
66
 
67
67
  {ok, Fn, [{Property, ["Z1", "Z2"]}, {"equal", ["Z1", "Z2"]}, {"new", ["R", "I"]}]}.
68
68
 
@@ -22,11 +22,11 @@ generate_test(F=#{description := Desc, expected := Exp, property := Prop, set1 :
22
22
 
23
23
  Fn = tgs:simple_fun(TestName, [
24
24
  tgs:call_macro("assertEqual", [
25
- tgs:call_macro("TESTED_MODULE:from_list", [
25
+ tgs:call_fun("custom_set:from_list", [
26
26
  tgs:value(Exp)]),
27
- tgs:call_macro("TESTED_MODULE:" ++ Property, [
28
- tgs:call_macro("TESTED_MODULE:from_list", [tgs:value(Set1)]),
29
- tgs:call_macro("TESTED_MODULE:from_list", [tgs:value(Set2)])])])]),
27
+ tgs:call_fun("custom_set:" ++ Property, [
28
+ tgs:call_fun("custom_set:from_list", [tgs:value(Set1)]),
29
+ tgs:call_fun("custom_set:from_list", [tgs:value(Set2)])])])]),
30
30
 
31
31
  {ok, Fn, [{Property, ["Set1", "Set2"]}]};
32
32
  generate_test(F=#{description := Desc, expected := Exp, property := Prop, set1 := Set1, set2 := Set2}) when Exp =:= true; Exp =:= false ->
@@ -40,9 +40,9 @@ generate_test(F=#{description := Desc, expected := Exp, property := Prop, set1 :
40
40
 
41
41
  Fn = tgs:simple_fun(TestName, [
42
42
  tgs:call_macro(Assert, [
43
- tgs:call_macro("TESTED_MODULE:" ++ Property, [
44
- tgs:call_macro("TESTED_MODULE:from_list", [tgs:value(Set1)]),
45
- tgs:call_macro("TESTED_MODULE:from_list", [tgs:value(Set2)])])])]),
43
+ tgs:call_fun("custom_set:" ++ Property, [
44
+ tgs:call_fun("custom_set:from_list", [tgs:value(Set1)]),
45
+ tgs:call_fun("custom_set:from_list", [tgs:value(Set2)])])])]),
46
46
 
47
47
  {ok, Fn, [{Property, ["Set1", "Set2"]}, {"from_list", ["List"]}]};
48
48
  generate_test(#{description := Desc, expected := Exp, property := Prop, set := Set, element := Elem}) when is_list(Exp) ->
@@ -51,11 +51,11 @@ generate_test(#{description := Desc, expected := Exp, property := Prop, set := S
51
51
 
52
52
  Fn = tgs:simple_fun(TestName, [
53
53
  tgs:call_macro("assertEqual", [
54
- tgs:call_macro("TESTED_MODULE:from_list", [
54
+ tgs:call_fun("custom_set:from_list", [
55
55
  tgs:value(Exp)]),
56
- tgs:call_macro("TESTED_MODULE:" ++ Property, [
56
+ tgs:call_fun("custom_set:" ++ Property, [
57
57
  tgs:value(Elem),
58
- tgs:call_macro("TESTED_MODULE:from_list", [
58
+ tgs:call_fun("custom_set:from_list", [
59
59
  erl_syntax:abstract(Set)])])])]),
60
60
 
61
61
  {ok, Fn, [{Property, ["Elem", "Set"]}, {"from_list", ["List"]}]};
@@ -70,9 +70,9 @@ generate_test(#{description := Desc, expected := Exp, property := Prop, set := S
70
70
 
71
71
  Fn = tgs:simple_fun(TestName, [
72
72
  tgs:call_macro(Assert, [
73
- tgs:call_macro("TESTED_MODULE:" ++ Property, [
73
+ tgs:call_fun("custom_set:" ++ Property, [
74
74
  tgs:value(Elem),
75
- tgs:call_macro("TESTED_MODULE:from_list", [
75
+ tgs:call_fun("custom_set:from_list", [
76
76
  erl_syntax:abstract(Set)])])])]),
77
77
 
78
78
  {ok, Fn, [{Property, ["Elem", "Set"]}, {"from_list", ["List"]}]};
@@ -87,8 +87,8 @@ generate_test(#{description := Desc, expected := Exp, property := <<"empty">>, s
87
87
 
88
88
  Fn = tgs:simple_fun(TestName, [
89
89
  tgs:call_macro(Assert, [
90
- tgs:call_macro("TESTED_MODULE:" ++ Property, [
91
- tgs:call_macro("TESTED_MODULE:from_list", [
90
+ tgs:call_fun("custom_set:" ++ Property, [
91
+ tgs:call_fun("custom_set:from_list", [
92
92
  tgs:value(Set)])])])]),
93
93
 
94
94
  {ok, Fn, [{Property, ["Set"]}, {"from_list", ["List"]}]}.
@@ -22,7 +22,7 @@ generate_test(#{description := Desc, expected := #{error := Message}, property :
22
22
  Fn = tgs:simple_fun(TestName, [
23
23
  tgs:call_macro("assertMatch", [
24
24
  tgs:value({error, Reason}),
25
- tgs:call_macro("TESTED_MODULE:" ++ Property, [
25
+ tgs:call_fun("hamming:" ++ Property, [
26
26
  tgs:value(binary_to_list(S1)),
27
27
  tgs:value(binary_to_list(S2))])])]),
28
28
 
@@ -34,7 +34,7 @@ generate_test(#{description := Desc, expected := Exp, property := Prop, 'strand1
34
34
  Fn = tgs:simple_fun(TestName, [
35
35
  tgs:call_macro("assertMatch", [
36
36
  tgs:value(Exp),
37
- tgs:call_macro("TESTED_MODULE:" ++ Property, [
37
+ tgs:call_fun("hamming:" ++ Property, [
38
38
  tgs:value(binary_to_list(S1)),
39
39
  tgs:value(binary_to_list(S2))])])]),
40
40
 
@@ -22,6 +22,6 @@ generate_test(#{description := Desc, expected := Exp, property := Prop}) ->
22
22
  Fn = tgs:simple_fun(TestName, [
23
23
  tgs:call_macro("assertEqual", [
24
24
  tgs:value(Expected),
25
- tgs:call_macro("TESTED_MODULE:" ++ Property, [])])]),
25
+ tgs:call_fun("hello_world:" ++ Property, [])])]),
26
26
 
27
27
  {ok, Fn, [{Prop, []}]}.
@@ -25,7 +25,7 @@ generate_test(#{description := Desc, expected := Exp, property := <<"leapYear">>
25
25
 
26
26
  Fn = tgs:simple_fun(TestName, [
27
27
  tgs:call_macro(Assert, [
28
- tgs:call_macro("TESTED_MODULE:" ++ Property, [
28
+ tgs:call_fun("leap:" ++ Property, [
29
29
  tgs:value(In)])])]),
30
30
 
31
31
  {ok, Fn, [{Property, ["Year"]}]}.
@@ -21,7 +21,7 @@ generate_test(#{description := Desc, expected := null, property := <<"toRna">>,
21
21
  Fn = tgs:simple_fun(TestName, [
22
22
  tgs:call_macro("assertMatch", [
23
23
  tgs:value(error),
24
- tgs:call_macro("TESTED_MODULE:" ++ Property, [
24
+ tgs:call_fun("rna_transcription:" ++ Property, [
25
25
  tgs:value(binary_to_list(DNA))])])]),
26
26
 
27
27
  {ok, Fn, [{Property, ["Strand"]}]};
@@ -32,7 +32,7 @@ generate_test(#{description := Desc, expected := Exp, property := <<"toRna">>, d
32
32
  Fn = tgs:simple_fun(TestName, [
33
33
  tgs:call_macro("assertMatch", [
34
34
  tgs:value(binary_to_list(Exp)),
35
- tgs:call_macro("TESTED_MODULE:" ++ Property, [
35
+ tgs:call_fun("rna_transcription:" ++ Property, [
36
36
  tgs:value(binary_to_list(DNA))])])]),
37
37
 
38
38
  {ok, Fn, [{Property, ["Strand"]}]}.
@@ -7,6 +7,7 @@
7
7
  define/2,
8
8
  export/1,
9
9
  include/1,
10
+ include_lib/1,
10
11
  module/1,
11
12
  parens/1,
12
13
  raw/1,
@@ -41,6 +42,11 @@ include(File) when is_list(File) ->
41
42
  erl_syntax:text("include"), [
42
43
  erl_syntax:abstract(File)]).
43
44
 
45
+ include_lib(File) when is_list(File) ->
46
+ erl_syntax:attribute(
47
+ erl_syntax:text("include_lib"), [
48
+ erl_syntax:abstract(File)]).
49
+
44
50
  define(Name, Substitution) when is_list(Name) ->
45
51
  erl_syntax:attribute(
46
52
  erl_syntax:text("define"), [
@@ -1,7 +1,3 @@
1
1
  module BeerSong
2
2
 
3
- let verse (n: int) = failwith "You need to implement this function."
4
-
5
- let verses (stop: int) (start: int) = failwith "You need to implement this function."
6
-
7
- let sing: string = failwith "You need to implement this function."
3
+ let recite (startBottles: int) (takeDown: int) = failwith "You need to implement this function."
@@ -1,4 +1,4 @@
1
- // This file was auto-generated based on version 1.0.0 of the canonical data.
1
+ // This file was auto-generated based on version 2.0.0 of the canonical data.
2
2
 
3
3
  module BeerSongTest
4
4
 
@@ -9,41 +9,363 @@ open BeerSong
9
9
 
10
10
  [<Fact>]
11
11
  let ``First generic verse`` () =
12
- let expected = "99 bottles of beer on the wall, 99 bottles of beer.\nTake one down and pass it around, 98 bottles of beer on the wall.\n"
13
- verse 99 |> should equal expected
12
+ let expected =
13
+ [ "99 bottles of beer on the wall, 99 bottles of beer.";
14
+ "Take one down and pass it around, 98 bottles of beer on the wall." ]
15
+ recite 99 1 |> should equal expected
14
16
 
15
17
  [<Fact(Skip = "Remove to run test")>]
16
18
  let ``Last generic verse`` () =
17
- let expected = "3 bottles of beer on the wall, 3 bottles of beer.\nTake one down and pass it around, 2 bottles of beer on the wall.\n"
18
- verse 3 |> should equal expected
19
+ let expected =
20
+ [ "3 bottles of beer on the wall, 3 bottles of beer.";
21
+ "Take one down and pass it around, 2 bottles of beer on the wall." ]
22
+ recite 3 1 |> should equal expected
19
23
 
20
24
  [<Fact(Skip = "Remove to run test")>]
21
- let ``Verse 2`` () =
22
- let expected = "2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n"
23
- verse 2 |> should equal expected
25
+ let ``Verse with 2 bottles`` () =
26
+ let expected =
27
+ [ "2 bottles of beer on the wall, 2 bottles of beer.";
28
+ "Take one down and pass it around, 1 bottle of beer on the wall." ]
29
+ recite 2 1 |> should equal expected
24
30
 
25
31
  [<Fact(Skip = "Remove to run test")>]
26
- let ``Verse 1`` () =
27
- let expected = "1 bottle of beer on the wall, 1 bottle of beer.\nTake it down and pass it around, no more bottles of beer on the wall.\n"
28
- verse 1 |> should equal expected
32
+ let ``Verse with 1 bottle`` () =
33
+ let expected =
34
+ [ "1 bottle of beer on the wall, 1 bottle of beer.";
35
+ "Take it down and pass it around, no more bottles of beer on the wall." ]
36
+ recite 1 1 |> should equal expected
29
37
 
30
38
  [<Fact(Skip = "Remove to run test")>]
31
- let ``Verse 0`` () =
32
- let expected = "No more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.\n"
33
- verse 0 |> should equal expected
39
+ let ``Verse with 0 bottles`` () =
40
+ let expected =
41
+ [ "No more bottles of beer on the wall, no more bottles of beer.";
42
+ "Go to the store and buy some more, 99 bottles of beer on the wall." ]
43
+ recite 0 1 |> should equal expected
34
44
 
35
45
  [<Fact(Skip = "Remove to run test")>]
36
46
  let ``First two verses`` () =
37
- let expected = "99 bottles of beer on the wall, 99 bottles of beer.\nTake one down and pass it around, 98 bottles of beer on the wall.\n\n98 bottles of beer on the wall, 98 bottles of beer.\nTake one down and pass it around, 97 bottles of beer on the wall.\n"
38
- verses 99 98 |> should equal expected
47
+ let expected =
48
+ [ "99 bottles of beer on the wall, 99 bottles of beer.";
49
+ "Take one down and pass it around, 98 bottles of beer on the wall.";
50
+ "";
51
+ "98 bottles of beer on the wall, 98 bottles of beer.";
52
+ "Take one down and pass it around, 97 bottles of beer on the wall." ]
53
+ recite 99 2 |> should equal expected
39
54
 
40
55
  [<Fact(Skip = "Remove to run test")>]
41
56
  let ``Last three verses`` () =
42
- let expected = "2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n\n1 bottle of beer on the wall, 1 bottle of beer.\nTake it down and pass it around, no more bottles of beer on the wall.\n\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.\n"
43
- verses 2 0 |> should equal expected
57
+ let expected =
58
+ [ "2 bottles of beer on the wall, 2 bottles of beer.";
59
+ "Take one down and pass it around, 1 bottle of beer on the wall.";
60
+ "";
61
+ "1 bottle of beer on the wall, 1 bottle of beer.";
62
+ "Take it down and pass it around, no more bottles of beer on the wall.";
63
+ "";
64
+ "No more bottles of beer on the wall, no more bottles of beer.";
65
+ "Go to the store and buy some more, 99 bottles of beer on the wall." ]
66
+ recite 2 3 |> should equal expected
44
67
 
45
68
  [<Fact(Skip = "Remove to run test")>]
46
69
  let ``All verses`` () =
47
- let expected = "99 bottles of beer on the wall, 99 bottles of beer.\nTake one down and pass it around, 98 bottles of beer on the wall.\n\n98 bottles of beer on the wall, 98 bottles of beer.\nTake one down and pass it around, 97 bottles of beer on the wall.\n\n97 bottles of beer on the wall, 97 bottles of beer.\nTake one down and pass it around, 96 bottles of beer on the wall.\n\n96 bottles of beer on the wall, 96 bottles of beer.\nTake one down and pass it around, 95 bottles of beer on the wall.\n\n95 bottles of beer on the wall, 95 bottles of beer.\nTake one down and pass it around, 94 bottles of beer on the wall.\n\n94 bottles of beer on the wall, 94 bottles of beer.\nTake one down and pass it around, 93 bottles of beer on the wall.\n\n93 bottles of beer on the wall, 93 bottles of beer.\nTake one down and pass it around, 92 bottles of beer on the wall.\n\n92 bottles of beer on the wall, 92 bottles of beer.\nTake one down and pass it around, 91 bottles of beer on the wall.\n\n91 bottles of beer on the wall, 91 bottles of beer.\nTake one down and pass it around, 90 bottles of beer on the wall.\n\n90 bottles of beer on the wall, 90 bottles of beer.\nTake one down and pass it around, 89 bottles of beer on the wall.\n\n89 bottles of beer on the wall, 89 bottles of beer.\nTake one down and pass it around, 88 bottles of beer on the wall.\n\n88 bottles of beer on the wall, 88 bottles of beer.\nTake one down and pass it around, 87 bottles of beer on the wall.\n\n87 bottles of beer on the wall, 87 bottles of beer.\nTake one down and pass it around, 86 bottles of beer on the wall.\n\n86 bottles of beer on the wall, 86 bottles of beer.\nTake one down and pass it around, 85 bottles of beer on the wall.\n\n85 bottles of beer on the wall, 85 bottles of beer.\nTake one down and pass it around, 84 bottles of beer on the wall.\n\n84 bottles of beer on the wall, 84 bottles of beer.\nTake one down and pass it around, 83 bottles of beer on the wall.\n\n83 bottles of beer on the wall, 83 bottles of beer.\nTake one down and pass it around, 82 bottles of beer on the wall.\n\n82 bottles of beer on the wall, 82 bottles of beer.\nTake one down and pass it around, 81 bottles of beer on the wall.\n\n81 bottles of beer on the wall, 81 bottles of beer.\nTake one down and pass it around, 80 bottles of beer on the wall.\n\n80 bottles of beer on the wall, 80 bottles of beer.\nTake one down and pass it around, 79 bottles of beer on the wall.\n\n79 bottles of beer on the wall, 79 bottles of beer.\nTake one down and pass it around, 78 bottles of beer on the wall.\n\n78 bottles of beer on the wall, 78 bottles of beer.\nTake one down and pass it around, 77 bottles of beer on the wall.\n\n77 bottles of beer on the wall, 77 bottles of beer.\nTake one down and pass it around, 76 bottles of beer on the wall.\n\n76 bottles of beer on the wall, 76 bottles of beer.\nTake one down and pass it around, 75 bottles of beer on the wall.\n\n75 bottles of beer on the wall, 75 bottles of beer.\nTake one down and pass it around, 74 bottles of beer on the wall.\n\n74 bottles of beer on the wall, 74 bottles of beer.\nTake one down and pass it around, 73 bottles of beer on the wall.\n\n73 bottles of beer on the wall, 73 bottles of beer.\nTake one down and pass it around, 72 bottles of beer on the wall.\n\n72 bottles of beer on the wall, 72 bottles of beer.\nTake one down and pass it around, 71 bottles of beer on the wall.\n\n71 bottles of beer on the wall, 71 bottles of beer.\nTake one down and pass it around, 70 bottles of beer on the wall.\n\n70 bottles of beer on the wall, 70 bottles of beer.\nTake one down and pass it around, 69 bottles of beer on the wall.\n\n69 bottles of beer on the wall, 69 bottles of beer.\nTake one down and pass it around, 68 bottles of beer on the wall.\n\n68 bottles of beer on the wall, 68 bottles of beer.\nTake one down and pass it around, 67 bottles of beer on the wall.\n\n67 bottles of beer on the wall, 67 bottles of beer.\nTake one down and pass it around, 66 bottles of beer on the wall.\n\n66 bottles of beer on the wall, 66 bottles of beer.\nTake one down and pass it around, 65 bottles of beer on the wall.\n\n65 bottles of beer on the wall, 65 bottles of beer.\nTake one down and pass it around, 64 bottles of beer on the wall.\n\n64 bottles of beer on the wall, 64 bottles of beer.\nTake one down and pass it around, 63 bottles of beer on the wall.\n\n63 bottles of beer on the wall, 63 bottles of beer.\nTake one down and pass it around, 62 bottles of beer on the wall.\n\n62 bottles of beer on the wall, 62 bottles of beer.\nTake one down and pass it around, 61 bottles of beer on the wall.\n\n61 bottles of beer on the wall, 61 bottles of beer.\nTake one down and pass it around, 60 bottles of beer on the wall.\n\n60 bottles of beer on the wall, 60 bottles of beer.\nTake one down and pass it around, 59 bottles of beer on the wall.\n\n59 bottles of beer on the wall, 59 bottles of beer.\nTake one down and pass it around, 58 bottles of beer on the wall.\n\n58 bottles of beer on the wall, 58 bottles of beer.\nTake one down and pass it around, 57 bottles of beer on the wall.\n\n57 bottles of beer on the wall, 57 bottles of beer.\nTake one down and pass it around, 56 bottles of beer on the wall.\n\n56 bottles of beer on the wall, 56 bottles of beer.\nTake one down and pass it around, 55 bottles of beer on the wall.\n\n55 bottles of beer on the wall, 55 bottles of beer.\nTake one down and pass it around, 54 bottles of beer on the wall.\n\n54 bottles of beer on the wall, 54 bottles of beer.\nTake one down and pass it around, 53 bottles of beer on the wall.\n\n53 bottles of beer on the wall, 53 bottles of beer.\nTake one down and pass it around, 52 bottles of beer on the wall.\n\n52 bottles of beer on the wall, 52 bottles of beer.\nTake one down and pass it around, 51 bottles of beer on the wall.\n\n51 bottles of beer on the wall, 51 bottles of beer.\nTake one down and pass it around, 50 bottles of beer on the wall.\n\n50 bottles of beer on the wall, 50 bottles of beer.\nTake one down and pass it around, 49 bottles of beer on the wall.\n\n49 bottles of beer on the wall, 49 bottles of beer.\nTake one down and pass it around, 48 bottles of beer on the wall.\n\n48 bottles of beer on the wall, 48 bottles of beer.\nTake one down and pass it around, 47 bottles of beer on the wall.\n\n47 bottles of beer on the wall, 47 bottles of beer.\nTake one down and pass it around, 46 bottles of beer on the wall.\n\n46 bottles of beer on the wall, 46 bottles of beer.\nTake one down and pass it around, 45 bottles of beer on the wall.\n\n45 bottles of beer on the wall, 45 bottles of beer.\nTake one down and pass it around, 44 bottles of beer on the wall.\n\n44 bottles of beer on the wall, 44 bottles of beer.\nTake one down and pass it around, 43 bottles of beer on the wall.\n\n43 bottles of beer on the wall, 43 bottles of beer.\nTake one down and pass it around, 42 bottles of beer on the wall.\n\n42 bottles of beer on the wall, 42 bottles of beer.\nTake one down and pass it around, 41 bottles of beer on the wall.\n\n41 bottles of beer on the wall, 41 bottles of beer.\nTake one down and pass it around, 40 bottles of beer on the wall.\n\n40 bottles of beer on the wall, 40 bottles of beer.\nTake one down and pass it around, 39 bottles of beer on the wall.\n\n39 bottles of beer on the wall, 39 bottles of beer.\nTake one down and pass it around, 38 bottles of beer on the wall.\n\n38 bottles of beer on the wall, 38 bottles of beer.\nTake one down and pass it around, 37 bottles of beer on the wall.\n\n37 bottles of beer on the wall, 37 bottles of beer.\nTake one down and pass it around, 36 bottles of beer on the wall.\n\n36 bottles of beer on the wall, 36 bottles of beer.\nTake one down and pass it around, 35 bottles of beer on the wall.\n\n35 bottles of beer on the wall, 35 bottles of beer.\nTake one down and pass it around, 34 bottles of beer on the wall.\n\n34 bottles of beer on the wall, 34 bottles of beer.\nTake one down and pass it around, 33 bottles of beer on the wall.\n\n33 bottles of beer on the wall, 33 bottles of beer.\nTake one down and pass it around, 32 bottles of beer on the wall.\n\n32 bottles of beer on the wall, 32 bottles of beer.\nTake one down and pass it around, 31 bottles of beer on the wall.\n\n31 bottles of beer on the wall, 31 bottles of beer.\nTake one down and pass it around, 30 bottles of beer on the wall.\n\n30 bottles of beer on the wall, 30 bottles of beer.\nTake one down and pass it around, 29 bottles of beer on the wall.\n\n29 bottles of beer on the wall, 29 bottles of beer.\nTake one down and pass it around, 28 bottles of beer on the wall.\n\n28 bottles of beer on the wall, 28 bottles of beer.\nTake one down and pass it around, 27 bottles of beer on the wall.\n\n27 bottles of beer on the wall, 27 bottles of beer.\nTake one down and pass it around, 26 bottles of beer on the wall.\n\n26 bottles of beer on the wall, 26 bottles of beer.\nTake one down and pass it around, 25 bottles of beer on the wall.\n\n25 bottles of beer on the wall, 25 bottles of beer.\nTake one down and pass it around, 24 bottles of beer on the wall.\n\n24 bottles of beer on the wall, 24 bottles of beer.\nTake one down and pass it around, 23 bottles of beer on the wall.\n\n23 bottles of beer on the wall, 23 bottles of beer.\nTake one down and pass it around, 22 bottles of beer on the wall.\n\n22 bottles of beer on the wall, 22 bottles of beer.\nTake one down and pass it around, 21 bottles of beer on the wall.\n\n21 bottles of beer on the wall, 21 bottles of beer.\nTake one down and pass it around, 20 bottles of beer on the wall.\n\n20 bottles of beer on the wall, 20 bottles of beer.\nTake one down and pass it around, 19 bottles of beer on the wall.\n\n19 bottles of beer on the wall, 19 bottles of beer.\nTake one down and pass it around, 18 bottles of beer on the wall.\n\n18 bottles of beer on the wall, 18 bottles of beer.\nTake one down and pass it around, 17 bottles of beer on the wall.\n\n17 bottles of beer on the wall, 17 bottles of beer.\nTake one down and pass it around, 16 bottles of beer on the wall.\n\n16 bottles of beer on the wall, 16 bottles of beer.\nTake one down and pass it around, 15 bottles of beer on the wall.\n\n15 bottles of beer on the wall, 15 bottles of beer.\nTake one down and pass it around, 14 bottles of beer on the wall.\n\n14 bottles of beer on the wall, 14 bottles of beer.\nTake one down and pass it around, 13 bottles of beer on the wall.\n\n13 bottles of beer on the wall, 13 bottles of beer.\nTake one down and pass it around, 12 bottles of beer on the wall.\n\n12 bottles of beer on the wall, 12 bottles of beer.\nTake one down and pass it around, 11 bottles of beer on the wall.\n\n11 bottles of beer on the wall, 11 bottles of beer.\nTake one down and pass it around, 10 bottles of beer on the wall.\n\n10 bottles of beer on the wall, 10 bottles of beer.\nTake one down and pass it around, 9 bottles of beer on the wall.\n\n9 bottles of beer on the wall, 9 bottles of beer.\nTake one down and pass it around, 8 bottles of beer on the wall.\n\n8 bottles of beer on the wall, 8 bottles of beer.\nTake one down and pass it around, 7 bottles of beer on the wall.\n\n7 bottles of beer on the wall, 7 bottles of beer.\nTake one down and pass it around, 6 bottles of beer on the wall.\n\n6 bottles of beer on the wall, 6 bottles of beer.\nTake one down and pass it around, 5 bottles of beer on the wall.\n\n5 bottles of beer on the wall, 5 bottles of beer.\nTake one down and pass it around, 4 bottles of beer on the wall.\n\n4 bottles of beer on the wall, 4 bottles of beer.\nTake one down and pass it around, 3 bottles of beer on the wall.\n\n3 bottles of beer on the wall, 3 bottles of beer.\nTake one down and pass it around, 2 bottles of beer on the wall.\n\n2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n\n1 bottle of beer on the wall, 1 bottle of beer.\nTake it down and pass it around, no more bottles of beer on the wall.\n\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.\n"
48
- verses 99 0 |> should equal expected
70
+ let expected =
71
+ [ "99 bottles of beer on the wall, 99 bottles of beer.";
72
+ "Take one down and pass it around, 98 bottles of beer on the wall.";
73
+ "";
74
+ "98 bottles of beer on the wall, 98 bottles of beer.";
75
+ "Take one down and pass it around, 97 bottles of beer on the wall.";
76
+ "";
77
+ "97 bottles of beer on the wall, 97 bottles of beer.";
78
+ "Take one down and pass it around, 96 bottles of beer on the wall.";
79
+ "";
80
+ "96 bottles of beer on the wall, 96 bottles of beer.";
81
+ "Take one down and pass it around, 95 bottles of beer on the wall.";
82
+ "";
83
+ "95 bottles of beer on the wall, 95 bottles of beer.";
84
+ "Take one down and pass it around, 94 bottles of beer on the wall.";
85
+ "";
86
+ "94 bottles of beer on the wall, 94 bottles of beer.";
87
+ "Take one down and pass it around, 93 bottles of beer on the wall.";
88
+ "";
89
+ "93 bottles of beer on the wall, 93 bottles of beer.";
90
+ "Take one down and pass it around, 92 bottles of beer on the wall.";
91
+ "";
92
+ "92 bottles of beer on the wall, 92 bottles of beer.";
93
+ "Take one down and pass it around, 91 bottles of beer on the wall.";
94
+ "";
95
+ "91 bottles of beer on the wall, 91 bottles of beer.";
96
+ "Take one down and pass it around, 90 bottles of beer on the wall.";
97
+ "";
98
+ "90 bottles of beer on the wall, 90 bottles of beer.";
99
+ "Take one down and pass it around, 89 bottles of beer on the wall.";
100
+ "";
101
+ "89 bottles of beer on the wall, 89 bottles of beer.";
102
+ "Take one down and pass it around, 88 bottles of beer on the wall.";
103
+ "";
104
+ "88 bottles of beer on the wall, 88 bottles of beer.";
105
+ "Take one down and pass it around, 87 bottles of beer on the wall.";
106
+ "";
107
+ "87 bottles of beer on the wall, 87 bottles of beer.";
108
+ "Take one down and pass it around, 86 bottles of beer on the wall.";
109
+ "";
110
+ "86 bottles of beer on the wall, 86 bottles of beer.";
111
+ "Take one down and pass it around, 85 bottles of beer on the wall.";
112
+ "";
113
+ "85 bottles of beer on the wall, 85 bottles of beer.";
114
+ "Take one down and pass it around, 84 bottles of beer on the wall.";
115
+ "";
116
+ "84 bottles of beer on the wall, 84 bottles of beer.";
117
+ "Take one down and pass it around, 83 bottles of beer on the wall.";
118
+ "";
119
+ "83 bottles of beer on the wall, 83 bottles of beer.";
120
+ "Take one down and pass it around, 82 bottles of beer on the wall.";
121
+ "";
122
+ "82 bottles of beer on the wall, 82 bottles of beer.";
123
+ "Take one down and pass it around, 81 bottles of beer on the wall.";
124
+ "";
125
+ "81 bottles of beer on the wall, 81 bottles of beer.";
126
+ "Take one down and pass it around, 80 bottles of beer on the wall.";
127
+ "";
128
+ "80 bottles of beer on the wall, 80 bottles of beer.";
129
+ "Take one down and pass it around, 79 bottles of beer on the wall.";
130
+ "";
131
+ "79 bottles of beer on the wall, 79 bottles of beer.";
132
+ "Take one down and pass it around, 78 bottles of beer on the wall.";
133
+ "";
134
+ "78 bottles of beer on the wall, 78 bottles of beer.";
135
+ "Take one down and pass it around, 77 bottles of beer on the wall.";
136
+ "";
137
+ "77 bottles of beer on the wall, 77 bottles of beer.";
138
+ "Take one down and pass it around, 76 bottles of beer on the wall.";
139
+ "";
140
+ "76 bottles of beer on the wall, 76 bottles of beer.";
141
+ "Take one down and pass it around, 75 bottles of beer on the wall.";
142
+ "";
143
+ "75 bottles of beer on the wall, 75 bottles of beer.";
144
+ "Take one down and pass it around, 74 bottles of beer on the wall.";
145
+ "";
146
+ "74 bottles of beer on the wall, 74 bottles of beer.";
147
+ "Take one down and pass it around, 73 bottles of beer on the wall.";
148
+ "";
149
+ "73 bottles of beer on the wall, 73 bottles of beer.";
150
+ "Take one down and pass it around, 72 bottles of beer on the wall.";
151
+ "";
152
+ "72 bottles of beer on the wall, 72 bottles of beer.";
153
+ "Take one down and pass it around, 71 bottles of beer on the wall.";
154
+ "";
155
+ "71 bottles of beer on the wall, 71 bottles of beer.";
156
+ "Take one down and pass it around, 70 bottles of beer on the wall.";
157
+ "";
158
+ "70 bottles of beer on the wall, 70 bottles of beer.";
159
+ "Take one down and pass it around, 69 bottles of beer on the wall.";
160
+ "";
161
+ "69 bottles of beer on the wall, 69 bottles of beer.";
162
+ "Take one down and pass it around, 68 bottles of beer on the wall.";
163
+ "";
164
+ "68 bottles of beer on the wall, 68 bottles of beer.";
165
+ "Take one down and pass it around, 67 bottles of beer on the wall.";
166
+ "";
167
+ "67 bottles of beer on the wall, 67 bottles of beer.";
168
+ "Take one down and pass it around, 66 bottles of beer on the wall.";
169
+ "";
170
+ "66 bottles of beer on the wall, 66 bottles of beer.";
171
+ "Take one down and pass it around, 65 bottles of beer on the wall.";
172
+ "";
173
+ "65 bottles of beer on the wall, 65 bottles of beer.";
174
+ "Take one down and pass it around, 64 bottles of beer on the wall.";
175
+ "";
176
+ "64 bottles of beer on the wall, 64 bottles of beer.";
177
+ "Take one down and pass it around, 63 bottles of beer on the wall.";
178
+ "";
179
+ "63 bottles of beer on the wall, 63 bottles of beer.";
180
+ "Take one down and pass it around, 62 bottles of beer on the wall.";
181
+ "";
182
+ "62 bottles of beer on the wall, 62 bottles of beer.";
183
+ "Take one down and pass it around, 61 bottles of beer on the wall.";
184
+ "";
185
+ "61 bottles of beer on the wall, 61 bottles of beer.";
186
+ "Take one down and pass it around, 60 bottles of beer on the wall.";
187
+ "";
188
+ "60 bottles of beer on the wall, 60 bottles of beer.";
189
+ "Take one down and pass it around, 59 bottles of beer on the wall.";
190
+ "";
191
+ "59 bottles of beer on the wall, 59 bottles of beer.";
192
+ "Take one down and pass it around, 58 bottles of beer on the wall.";
193
+ "";
194
+ "58 bottles of beer on the wall, 58 bottles of beer.";
195
+ "Take one down and pass it around, 57 bottles of beer on the wall.";
196
+ "";
197
+ "57 bottles of beer on the wall, 57 bottles of beer.";
198
+ "Take one down and pass it around, 56 bottles of beer on the wall.";
199
+ "";
200
+ "56 bottles of beer on the wall, 56 bottles of beer.";
201
+ "Take one down and pass it around, 55 bottles of beer on the wall.";
202
+ "";
203
+ "55 bottles of beer on the wall, 55 bottles of beer.";
204
+ "Take one down and pass it around, 54 bottles of beer on the wall.";
205
+ "";
206
+ "54 bottles of beer on the wall, 54 bottles of beer.";
207
+ "Take one down and pass it around, 53 bottles of beer on the wall.";
208
+ "";
209
+ "53 bottles of beer on the wall, 53 bottles of beer.";
210
+ "Take one down and pass it around, 52 bottles of beer on the wall.";
211
+ "";
212
+ "52 bottles of beer on the wall, 52 bottles of beer.";
213
+ "Take one down and pass it around, 51 bottles of beer on the wall.";
214
+ "";
215
+ "51 bottles of beer on the wall, 51 bottles of beer.";
216
+ "Take one down and pass it around, 50 bottles of beer on the wall.";
217
+ "";
218
+ "50 bottles of beer on the wall, 50 bottles of beer.";
219
+ "Take one down and pass it around, 49 bottles of beer on the wall.";
220
+ "";
221
+ "49 bottles of beer on the wall, 49 bottles of beer.";
222
+ "Take one down and pass it around, 48 bottles of beer on the wall.";
223
+ "";
224
+ "48 bottles of beer on the wall, 48 bottles of beer.";
225
+ "Take one down and pass it around, 47 bottles of beer on the wall.";
226
+ "";
227
+ "47 bottles of beer on the wall, 47 bottles of beer.";
228
+ "Take one down and pass it around, 46 bottles of beer on the wall.";
229
+ "";
230
+ "46 bottles of beer on the wall, 46 bottles of beer.";
231
+ "Take one down and pass it around, 45 bottles of beer on the wall.";
232
+ "";
233
+ "45 bottles of beer on the wall, 45 bottles of beer.";
234
+ "Take one down and pass it around, 44 bottles of beer on the wall.";
235
+ "";
236
+ "44 bottles of beer on the wall, 44 bottles of beer.";
237
+ "Take one down and pass it around, 43 bottles of beer on the wall.";
238
+ "";
239
+ "43 bottles of beer on the wall, 43 bottles of beer.";
240
+ "Take one down and pass it around, 42 bottles of beer on the wall.";
241
+ "";
242
+ "42 bottles of beer on the wall, 42 bottles of beer.";
243
+ "Take one down and pass it around, 41 bottles of beer on the wall.";
244
+ "";
245
+ "41 bottles of beer on the wall, 41 bottles of beer.";
246
+ "Take one down and pass it around, 40 bottles of beer on the wall.";
247
+ "";
248
+ "40 bottles of beer on the wall, 40 bottles of beer.";
249
+ "Take one down and pass it around, 39 bottles of beer on the wall.";
250
+ "";
251
+ "39 bottles of beer on the wall, 39 bottles of beer.";
252
+ "Take one down and pass it around, 38 bottles of beer on the wall.";
253
+ "";
254
+ "38 bottles of beer on the wall, 38 bottles of beer.";
255
+ "Take one down and pass it around, 37 bottles of beer on the wall.";
256
+ "";
257
+ "37 bottles of beer on the wall, 37 bottles of beer.";
258
+ "Take one down and pass it around, 36 bottles of beer on the wall.";
259
+ "";
260
+ "36 bottles of beer on the wall, 36 bottles of beer.";
261
+ "Take one down and pass it around, 35 bottles of beer on the wall.";
262
+ "";
263
+ "35 bottles of beer on the wall, 35 bottles of beer.";
264
+ "Take one down and pass it around, 34 bottles of beer on the wall.";
265
+ "";
266
+ "34 bottles of beer on the wall, 34 bottles of beer.";
267
+ "Take one down and pass it around, 33 bottles of beer on the wall.";
268
+ "";
269
+ "33 bottles of beer on the wall, 33 bottles of beer.";
270
+ "Take one down and pass it around, 32 bottles of beer on the wall.";
271
+ "";
272
+ "32 bottles of beer on the wall, 32 bottles of beer.";
273
+ "Take one down and pass it around, 31 bottles of beer on the wall.";
274
+ "";
275
+ "31 bottles of beer on the wall, 31 bottles of beer.";
276
+ "Take one down and pass it around, 30 bottles of beer on the wall.";
277
+ "";
278
+ "30 bottles of beer on the wall, 30 bottles of beer.";
279
+ "Take one down and pass it around, 29 bottles of beer on the wall.";
280
+ "";
281
+ "29 bottles of beer on the wall, 29 bottles of beer.";
282
+ "Take one down and pass it around, 28 bottles of beer on the wall.";
283
+ "";
284
+ "28 bottles of beer on the wall, 28 bottles of beer.";
285
+ "Take one down and pass it around, 27 bottles of beer on the wall.";
286
+ "";
287
+ "27 bottles of beer on the wall, 27 bottles of beer.";
288
+ "Take one down and pass it around, 26 bottles of beer on the wall.";
289
+ "";
290
+ "26 bottles of beer on the wall, 26 bottles of beer.";
291
+ "Take one down and pass it around, 25 bottles of beer on the wall.";
292
+ "";
293
+ "25 bottles of beer on the wall, 25 bottles of beer.";
294
+ "Take one down and pass it around, 24 bottles of beer on the wall.";
295
+ "";
296
+ "24 bottles of beer on the wall, 24 bottles of beer.";
297
+ "Take one down and pass it around, 23 bottles of beer on the wall.";
298
+ "";
299
+ "23 bottles of beer on the wall, 23 bottles of beer.";
300
+ "Take one down and pass it around, 22 bottles of beer on the wall.";
301
+ "";
302
+ "22 bottles of beer on the wall, 22 bottles of beer.";
303
+ "Take one down and pass it around, 21 bottles of beer on the wall.";
304
+ "";
305
+ "21 bottles of beer on the wall, 21 bottles of beer.";
306
+ "Take one down and pass it around, 20 bottles of beer on the wall.";
307
+ "";
308
+ "20 bottles of beer on the wall, 20 bottles of beer.";
309
+ "Take one down and pass it around, 19 bottles of beer on the wall.";
310
+ "";
311
+ "19 bottles of beer on the wall, 19 bottles of beer.";
312
+ "Take one down and pass it around, 18 bottles of beer on the wall.";
313
+ "";
314
+ "18 bottles of beer on the wall, 18 bottles of beer.";
315
+ "Take one down and pass it around, 17 bottles of beer on the wall.";
316
+ "";
317
+ "17 bottles of beer on the wall, 17 bottles of beer.";
318
+ "Take one down and pass it around, 16 bottles of beer on the wall.";
319
+ "";
320
+ "16 bottles of beer on the wall, 16 bottles of beer.";
321
+ "Take one down and pass it around, 15 bottles of beer on the wall.";
322
+ "";
323
+ "15 bottles of beer on the wall, 15 bottles of beer.";
324
+ "Take one down and pass it around, 14 bottles of beer on the wall.";
325
+ "";
326
+ "14 bottles of beer on the wall, 14 bottles of beer.";
327
+ "Take one down and pass it around, 13 bottles of beer on the wall.";
328
+ "";
329
+ "13 bottles of beer on the wall, 13 bottles of beer.";
330
+ "Take one down and pass it around, 12 bottles of beer on the wall.";
331
+ "";
332
+ "12 bottles of beer on the wall, 12 bottles of beer.";
333
+ "Take one down and pass it around, 11 bottles of beer on the wall.";
334
+ "";
335
+ "11 bottles of beer on the wall, 11 bottles of beer.";
336
+ "Take one down and pass it around, 10 bottles of beer on the wall.";
337
+ "";
338
+ "10 bottles of beer on the wall, 10 bottles of beer.";
339
+ "Take one down and pass it around, 9 bottles of beer on the wall.";
340
+ "";
341
+ "9 bottles of beer on the wall, 9 bottles of beer.";
342
+ "Take one down and pass it around, 8 bottles of beer on the wall.";
343
+ "";
344
+ "8 bottles of beer on the wall, 8 bottles of beer.";
345
+ "Take one down and pass it around, 7 bottles of beer on the wall.";
346
+ "";
347
+ "7 bottles of beer on the wall, 7 bottles of beer.";
348
+ "Take one down and pass it around, 6 bottles of beer on the wall.";
349
+ "";
350
+ "6 bottles of beer on the wall, 6 bottles of beer.";
351
+ "Take one down and pass it around, 5 bottles of beer on the wall.";
352
+ "";
353
+ "5 bottles of beer on the wall, 5 bottles of beer.";
354
+ "Take one down and pass it around, 4 bottles of beer on the wall.";
355
+ "";
356
+ "4 bottles of beer on the wall, 4 bottles of beer.";
357
+ "Take one down and pass it around, 3 bottles of beer on the wall.";
358
+ "";
359
+ "3 bottles of beer on the wall, 3 bottles of beer.";
360
+ "Take one down and pass it around, 2 bottles of beer on the wall.";
361
+ "";
362
+ "2 bottles of beer on the wall, 2 bottles of beer.";
363
+ "Take one down and pass it around, 1 bottle of beer on the wall.";
364
+ "";
365
+ "1 bottle of beer on the wall, 1 bottle of beer.";
366
+ "Take it down and pass it around, no more bottles of beer on the wall.";
367
+ "";
368
+ "No more bottles of beer on the wall, no more bottles of beer.";
369
+ "Go to the store and buy some more, 99 bottles of beer on the wall." ]
370
+ recite 99 100 |> should equal expected
49
371