trackler 2.0.0.1 → 2.0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (226) hide show
  1. checksums.yaml +4 -4
  2. data/bin/bump-content +3 -1
  3. data/bin/verify-metadata +2 -2
  4. data/common/exercises/alphametics/canonical-data.json +19 -9
  5. data/common/exercises/food-chain/canonical-data.json +7 -1
  6. data/common/exercises/grains/canonical-data.json +66 -0
  7. data/common/exercises/raindrops/description.md +4 -5
  8. data/common/exercises/triangle/canonical-data.json +81 -54
  9. data/lib/trackler/version.rb +1 -1
  10. data/tracks/c/config.json +26 -19
  11. data/tracks/c/exercises/allergies/makefile +15 -0
  12. data/tracks/c/exercises/allergies/src/allergies.h +21 -0
  13. data/tracks/c/exercises/allergies/src/example.c +32 -0
  14. data/tracks/c/exercises/allergies/src/example.h +26 -0
  15. data/tracks/c/exercises/allergies/test/test_allergies.c +203 -0
  16. data/tracks/c/exercises/allergies/test/vendor/unity.c +1300 -0
  17. data/tracks/c/exercises/allergies/test/vendor/unity.h +274 -0
  18. data/tracks/c/exercises/allergies/test/vendor/unity_internals.h +701 -0
  19. data/tracks/c/exercises/atbash-cipher/makefile +16 -0
  20. data/tracks/c/exercises/atbash-cipher/src/example.c +71 -0
  21. data/tracks/c/exercises/atbash-cipher/src/example.h +7 -0
  22. data/tracks/c/exercises/atbash-cipher/test/test_atbash_cipher.c +113 -0
  23. data/tracks/c/exercises/atbash-cipher/test/vendor/unity.c +1300 -0
  24. data/tracks/c/exercises/atbash-cipher/test/vendor/unity.h +274 -0
  25. data/tracks/c/exercises/atbash-cipher/test/vendor/unity_internals.h +701 -0
  26. data/tracks/c/exercises/phone-number/makefile +16 -0
  27. data/tracks/c/exercises/phone-number/src/example.c +66 -0
  28. data/tracks/c/exercises/phone-number/src/example.h +8 -0
  29. data/tracks/c/exercises/phone-number/test/test_phone_number.c +108 -0
  30. data/tracks/c/exercises/phone-number/test/vendor/unity.c +1300 -0
  31. data/tracks/c/exercises/phone-number/test/vendor/unity.h +274 -0
  32. data/tracks/c/exercises/phone-number/test/vendor/unity_internals.h +701 -0
  33. data/tracks/csharp/config.json +8 -0
  34. data/tracks/csharp/exercises/bowling/BowlingTest.cs +188 -33
  35. data/tracks/csharp/exercises/bowling/Example.cs +38 -9
  36. data/tracks/csharp/exercises/rectangles/Example.cs +91 -0
  37. data/tracks/csharp/exercises/rectangles/RectanglesTest.cs +133 -0
  38. data/tracks/elisp/docs/INSTALLATION.org +1 -1
  39. data/tracks/elixir/config.json +8 -66
  40. data/tracks/elixir/docs/LEARNING.md +1 -1
  41. data/tracks/elixir/exercises/diamond/diamond_test.exs +12 -12
  42. data/tracks/elixir/exercises/grep/example.exs +92 -0
  43. data/tracks/elixir/exercises/grep/grep.exs +6 -0
  44. data/tracks/elixir/exercises/grep/grep_test.exs +259 -0
  45. data/tracks/elixir/exercises/markdown/markdown.exs +59 -2
  46. data/tracks/elixir/exercises/nucleotide-count/nucleotide_count_test.exs +4 -4
  47. data/tracks/elixir/exercises/phone-number/phone_number_test.exs +5 -0
  48. data/tracks/fsharp/exercises/bowling/BowlingTest.fs +158 -43
  49. data/tracks/fsharp/exercises/bowling/Example.fs +53 -24
  50. data/tracks/go/config.json +5 -0
  51. data/tracks/go/exercises/diamond/diamond_test.go +227 -0
  52. data/tracks/go/exercises/diamond/example.go +47 -0
  53. data/tracks/go/exercises/food-chain/example.go +1 -1
  54. data/tracks/go/exercises/food-chain/food_chain_test.go +30 -6
  55. data/tracks/go/exercises/nucleotide-count/example.go +21 -8
  56. data/tracks/go/exercises/nucleotide-count/nucleotide_count_test.go +45 -37
  57. data/tracks/haskell/exercises/anagram/test/Tests.hs +1 -11
  58. data/tracks/java/bin/journey-test.sh +165 -128
  59. data/tracks/java/docs/ABOUT.md +5 -8
  60. data/tracks/java/exercises/hello-world/build.gradle +0 -6
  61. data/tracks/java/exercises/hello-world/src/test/java/HelloWorldTest.java +0 -1
  62. data/tracks/java/exercises/meetup/build.gradle +0 -1
  63. data/tracks/java/exercises/meetup/src/example/java/Meetup.java +9 -7
  64. data/tracks/java/exercises/meetup/src/test/java/MeetupTest.java +185 -188
  65. data/tracks/lua/config.json +0 -73
  66. data/tracks/lua/exercises/bowling/bowling_spec.lua +92 -48
  67. data/tracks/lua/exercises/bowling/example.lua +4 -1
  68. data/tracks/objective-c/config.json +9 -30
  69. data/tracks/objective-c/exercises/pangram/PangramExample.h +7 -0
  70. data/tracks/objective-c/exercises/pangram/PangramExample.m +21 -0
  71. data/tracks/objective-c/exercises/pangram/PangramTest.m +51 -0
  72. data/tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/project.pbxproj +18 -0
  73. data/tracks/ocaml/README.md +46 -1
  74. data/tracks/ocaml/SETUP.md +21 -2
  75. data/tracks/ocaml/config.json +48 -78
  76. data/tracks/perl5/README.md +15 -8
  77. data/tracks/perl5/testall.pl +5 -5
  78. data/tracks/php/config.json +26 -34
  79. data/tracks/php/docs/ABOUT.md +15 -0
  80. data/tracks/php/exercises/allergies/allergies_test.php +121 -0
  81. data/tracks/php/exercises/allergies/example.php +64 -0
  82. data/tracks/php/exercises/etl/etl_test.php +52 -0
  83. data/tracks/php/exercises/etl/example.php +12 -0
  84. data/tracks/php/exercises/nucleotide-count/example.php +25 -0
  85. data/tracks/php/exercises/nucleotide-count/nucleotide-count_test.php +36 -0
  86. data/tracks/php/exercises/pig-latin/example.php +25 -29
  87. data/tracks/php/exercises/pig-latin/pig-latin_test.php +26 -19
  88. data/tracks/php/exercises/space-age/example.php +65 -0
  89. data/tracks/php/exercises/space-age/space-age_test.php +70 -0
  90. data/tracks/php/exercises/triangle/example.php +43 -0
  91. data/tracks/php/exercises/triangle/triangle_test.php +140 -0
  92. data/tracks/pony/exercises/anagram/example.pony +6 -6
  93. data/tracks/pony/exercises/anagram/test.pony +3 -4
  94. data/tracks/pony/exercises/bob/test.pony +23 -23
  95. data/tracks/pony/exercises/difference-of-squares/test.pony +11 -11
  96. data/tracks/pony/exercises/hamming/example.pony +3 -3
  97. data/tracks/pony/exercises/hamming/test.pony +16 -16
  98. data/tracks/pony/exercises/hello-world/test.pony +5 -4
  99. data/tracks/pony/exercises/leap/test.pony +8 -8
  100. data/tracks/python/config.json +18 -0
  101. data/tracks/python/exercises/diamond/diamond_test.py +33 -0
  102. data/tracks/python/exercises/diamond/example.py +15 -0
  103. data/tracks/python/exercises/linked-list/example.py +47 -0
  104. data/tracks/python/exercises/linked-list/linked_list.py +13 -0
  105. data/tracks/python/exercises/linked-list/linked_list_test.py +49 -0
  106. data/tracks/python/exercises/list-ops/example.py +55 -0
  107. data/tracks/python/exercises/list-ops/list_ops.py +38 -0
  108. data/tracks/python/exercises/list-ops/list_ops_test.py +136 -0
  109. data/tracks/ruby/bin/generate +22 -2
  110. data/tracks/ruby/config.json +12 -83
  111. data/tracks/ruby/exercises/allergies/allergies_test.rb +0 -1
  112. data/tracks/ruby/exercises/atbash-cipher/atbash_cipher_test.rb +0 -1
  113. data/tracks/ruby/exercises/beer-song/beer_song_test.rb +1 -2
  114. data/tracks/ruby/exercises/binary/example.rb +0 -1
  115. data/tracks/ruby/exercises/binary-search-tree/binary_search_tree_test.rb +1 -1
  116. data/tracks/ruby/exercises/bowling/.version +1 -0
  117. data/tracks/ruby/exercises/bowling/bowling_test.rb +109 -133
  118. data/tracks/ruby/exercises/bowling/example.rb +7 -7
  119. data/tracks/ruby/exercises/bowling/example.tt +27 -0
  120. data/tracks/ruby/exercises/circular-buffer/circular_buffer_test.rb +0 -2
  121. data/tracks/ruby/exercises/clock/example.rb +0 -2
  122. data/tracks/ruby/exercises/connect/connect_test.rb +0 -1
  123. data/tracks/ruby/exercises/custom-set/custom_set_test.rb +0 -1
  124. data/tracks/ruby/exercises/diamond/diamond_test.rb +0 -1
  125. data/tracks/ruby/exercises/etl/etl_test.rb +1 -1
  126. data/tracks/ruby/exercises/house/house_test.rb +0 -1
  127. data/tracks/ruby/exercises/isogram/isogram_test.rb +2 -2
  128. data/tracks/ruby/exercises/largest-series-product/example.tt +0 -3
  129. data/tracks/ruby/exercises/largest-series-product/largest_series_product_test.rb +0 -4
  130. data/tracks/ruby/exercises/linked-list/linked_list_test.rb +1 -1
  131. data/tracks/ruby/exercises/meetup/meetup_test.rb +0 -1
  132. data/tracks/ruby/exercises/nth-prime/example.tt +0 -2
  133. data/tracks/ruby/exercises/nth-prime/nth_prime_test.rb +0 -2
  134. data/tracks/ruby/exercises/ocr-numbers/ocr_numbers_test.rb +1 -2
  135. data/tracks/ruby/exercises/protein-translation/protein_translation_test.rb +0 -1
  136. data/tracks/ruby/exercises/proverb/proverb_test.rb +1 -3
  137. data/tracks/ruby/exercises/queen-attack/example.rb +3 -1
  138. data/tracks/ruby/exercises/queen-attack/queen_attack_test.rb +34 -8
  139. data/tracks/ruby/exercises/robot-simulator/robot_simulator_test.rb +1 -1
  140. data/tracks/ruby/exercises/strain/strain_test.rb +2 -2
  141. data/tracks/ruby/exercises/tournament/.version +1 -0
  142. data/tracks/ruby/exercises/tournament/example.rb +54 -0
  143. data/tracks/ruby/exercises/tournament/example.tt +23 -0
  144. data/tracks/ruby/exercises/tournament/tournament_test.rb +92 -0
  145. data/tracks/ruby/exercises/transpose/.version +1 -0
  146. data/tracks/ruby/exercises/transpose/example.rb +14 -0
  147. data/tracks/ruby/exercises/transpose/example.tt +22 -0
  148. data/tracks/ruby/exercises/transpose/transpose_test.rb +303 -0
  149. data/tracks/ruby/lib/bowling_cases.rb +46 -0
  150. data/tracks/ruby/lib/isogram_cases.rb +1 -1
  151. data/tracks/ruby/lib/tournament_cases.rb +45 -0
  152. data/tracks/ruby/lib/transpose_cases.rb +45 -0
  153. data/tracks/rust/config.json +2 -0
  154. data/tracks/rust/exercises/bowling/.gitignore +7 -0
  155. data/tracks/rust/exercises/bowling/Cargo.toml +3 -0
  156. data/tracks/rust/exercises/bowling/example.rs +134 -0
  157. data/tracks/rust/exercises/bowling/tests/bowling.rs +373 -0
  158. data/tracks/rust/exercises/grains/.gitignore +7 -0
  159. data/tracks/rust/exercises/grains/Cargo.toml +3 -0
  160. data/tracks/rust/exercises/grains/example.rs +11 -0
  161. data/tracks/rust/exercises/grains/src/lib.rs +7 -0
  162. data/tracks/rust/exercises/grains/tests/grains.rs +63 -0
  163. data/tracks/rust/problems.md +2 -0
  164. data/tracks/scala/README.md +38 -0
  165. data/tracks/scala/config.json +20 -74
  166. data/tracks/scala/exercises/accumulate/src/test/scala/accumulate_test.scala +4 -0
  167. data/tracks/scala/exercises/allergies/src/test/scala/allergies_test.scala +11 -0
  168. data/tracks/scala/exercises/alphametics/build.sbt +6 -0
  169. data/tracks/scala/exercises/alphametics/example.scala +125 -0
  170. data/tracks/scala/exercises/alphametics/src/main/scala/.keep +0 -0
  171. data/tracks/scala/exercises/alphametics/src/test/scala/AlphameticsTest.scala +62 -0
  172. data/tracks/scala/exercises/atbash-cipher/src/test/scala/atbash_test.scala +8 -0
  173. data/tracks/scala/exercises/bank-account/src/test/scala/BankAccountTest.scala +4 -0
  174. data/tracks/scala/exercises/binary/src/test/scala/binary_test.scala +13 -0
  175. data/tracks/scala/exercises/binary-search-tree/src/test/scala/BstTest.scala +11 -0
  176. data/tracks/scala/exercises/bowling/Example.scala +116 -0
  177. data/tracks/scala/exercises/bowling/build.sbt +3 -0
  178. data/tracks/scala/exercises/bowling/src/main/scala/Bowling.scala +11 -0
  179. data/tracks/scala/exercises/bowling/src/test/scala/BowlingSuite.scala +237 -0
  180. data/tracks/scala/exercises/clock/src/test/scala/ClockTest.scala +50 -0
  181. data/tracks/scala/exercises/connect/README.md +17 -0
  182. data/tracks/scala/exercises/connect/src/test/scala/ConnectTest.scala +7 -0
  183. data/tracks/scala/exercises/crypto-square/src/test/scala/{CrytpoSquareTest.scala → CryptoSquareTest.scala} +9 -0
  184. data/tracks/scala/exercises/custom-set/src/test/scala/CustomSetTest.scala +36 -0
  185. data/tracks/scala/exercises/difference-of-squares/src/test/scala/squares_test.scala +8 -0
  186. data/tracks/scala/exercises/forth/src/test/scala/ForthTest.scala +22 -0
  187. data/tracks/scala/exercises/hexadecimal/src/test/scala/HexadecimalTest.scala +8 -0
  188. data/tracks/scala/exercises/kindergarten-garden/src/test/scala/GardenTest.scala +5 -0
  189. data/tracks/scala/exercises/largest-series-product/src/test/scala/SeriesTest.scala +2 -0
  190. data/tracks/scala/exercises/linked-list/src/test/scala/DequeTest.scala +4 -0
  191. data/tracks/scala/exercises/luhn/src/test/scala/LuhnTest.scala +4 -0
  192. data/tracks/scala/exercises/matrix/src/test/scala/MatrixTest.scala +2 -0
  193. data/tracks/scala/exercises/minesweeper/src/test/scala/MinesweeperTest.scala +6 -0
  194. data/tracks/scala/exercises/nth-prime/src/test/scala/PrimeTest.scala +5 -0
  195. data/tracks/scala/exercises/ocr-numbers/src/test/scala/OcrTest.scala +15 -0
  196. data/tracks/scala/exercises/octal/src/test/scala/OctalTest.scala +7 -0
  197. data/tracks/scala/exercises/parallel-letter-frequency/src/test/scala/FrequencyTest.scala +8 -0
  198. data/tracks/scala/exercises/pascals-triangle/src/test/scala/PascalsTriangleTest.scala +5 -0
  199. data/tracks/scala/exercises/pig-latin/src/test/scala/PigLatinTest.scala +4 -0
  200. data/tracks/scala/exercises/pythagorean-triplet/src/test/scala/PythagoreanTripletTest.scala +3 -0
  201. data/tracks/scala/exercises/queen-attack/src/test/scala/QueensTest.scala +5 -0
  202. data/tracks/scala/exercises/robot-simulator/src/test/scala/RobotTest.scala +16 -8
  203. data/tracks/scala/exercises/say/src/test/scala/SayTest.scala +34 -17
  204. data/tracks/scala/exercises/scrabble-score/src/test/scala/scrabble_score_test.scala +6 -0
  205. data/tracks/scala/exercises/secret-handshake/src/test/scala/SecretHandshakeTest.scala +18 -9
  206. data/tracks/scala/exercises/series/src/test/scala/SeriesTest.scala +4 -2
  207. data/tracks/scala/exercises/sieve/src/test/scala/SieveTest.scala +8 -4
  208. data/tracks/scala/exercises/simple-cipher/src/test/scala/CipherTest.scala +17 -9
  209. data/tracks/scala/exercises/sublist/src/test/scala/sublist_test.scala +17 -0
  210. data/tracks/scala/exercises/trinary/src/test/scala/TrinaryTest.scala +14 -7
  211. data/tracks/scala/exercises/wordy/src/test/scala/WordProblemTest.scala +28 -14
  212. data/tracks/scala/project/Build.scala +3 -3
  213. data/tracks/scala/testgen/src/main/scala/BowlingTestGenerator.scala +57 -0
  214. data/tracks/sml/config.json +41 -6
  215. data/tracks/sml/exercises/flatten-array/example.sml +6 -0
  216. data/tracks/sml/exercises/flatten-array/test_flatten_array.sml +10 -0
  217. data/tracks/sml/exercises/nth-prime/example.sml +46 -0
  218. data/tracks/sml/exercises/nth-prime/test_nth_prime.sml +14 -0
  219. data/tracks/sml/exercises/raindrops/example.sml +9 -0
  220. data/tracks/sml/exercises/raindrops/raindrops.sml +2 -0
  221. data/tracks/sml/exercises/raindrops/test_raindrops.sml +95 -0
  222. data/tracks/swift/config.json +269 -328
  223. data/tracks/swift/exercises/pangram/PangramExample.swift +17 -0
  224. data/tracks/swift/exercises/pangram/PangramTest.swift +43 -0
  225. data/tracks/swift/xcodeProject/xSwift.xcodeproj/project.pbxproj +16 -0
  226. metadata +95 -3
@@ -7,6 +7,7 @@ class MinesweeperTest extends FlatSpec with Matchers {
7
7
  }
8
8
 
9
9
  it should "handle empty board" in {
10
+ pending
10
11
  Minesweeper.annotate(List(" ",
11
12
  " ",
12
13
  " ")) should
@@ -16,6 +17,7 @@ class MinesweeperTest extends FlatSpec with Matchers {
16
17
  }
17
18
 
18
19
  it should "handle board full of mines" in {
20
+ pending
19
21
  Minesweeper.annotate(List("***",
20
22
  "***",
21
23
  "***")) should
@@ -25,6 +27,7 @@ class MinesweeperTest extends FlatSpec with Matchers {
25
27
  }
26
28
 
27
29
  it should "handle surrounded" in {
30
+ pending
28
31
  Minesweeper.annotate(List("***",
29
32
  "* *",
30
33
  "***")) should
@@ -34,12 +37,14 @@ class MinesweeperTest extends FlatSpec with Matchers {
34
37
  }
35
38
 
36
39
  it should "handle horizontal line" in {
40
+ pending
37
41
  Minesweeper.annotate(List(" * * ")) should
38
42
  equal(List("1*2*1"))
39
43
  }
40
44
 
41
45
 
42
46
  it should "handle vertical line" in {
47
+ pending
43
48
  Minesweeper.annotate(List(" ",
44
49
  "*",
45
50
  " ",
@@ -53,6 +58,7 @@ class MinesweeperTest extends FlatSpec with Matchers {
53
58
  }
54
59
 
55
60
  it should "handle cross" in {
61
+ pending
56
62
  Minesweeper.annotate(List(" * ",
57
63
  " * ",
58
64
  "*****",
@@ -6,22 +6,27 @@ class PrimeTest extends FlatSpec with Matchers {
6
6
  }
7
7
 
8
8
  it should "calculate 2nd prime" in {
9
+ pending
9
10
  Prime.nth(2) should be (3)
10
11
  }
11
12
 
12
13
  it should "calculate 6th prime" in {
14
+ pending
13
15
  Prime.nth(6) should be (13)
14
16
  }
15
17
 
16
18
  it should "calculate 1000th prime" in {
19
+ pending
17
20
  Prime.nth(1000) should be (7919)
18
21
  }
19
22
 
20
23
  it should "calculate 10000th prime" in {
24
+ pending
21
25
  Prime.nth(10000) should be (104729)
22
26
  }
23
27
 
24
28
  it should "calculate 10001th prime" in {
29
+ pending
25
30
  Prime.nth(10001) should be (104743)
26
31
  }
27
32
  }
@@ -9,6 +9,7 @@ class OcrTest extends FlatSpec with Matchers {
9
9
  }
10
10
 
11
11
  it should "recognize one" in {
12
+ pending
12
13
  Ocr(List(" "
13
14
  , " |"
14
15
  , " |"
@@ -16,6 +17,7 @@ class OcrTest extends FlatSpec with Matchers {
16
17
  }
17
18
 
18
19
  it should "recognize two" in {
20
+ pending
19
21
  Ocr(List(" _ "
20
22
  , " _|"
21
23
  , "|_ "
@@ -23,6 +25,7 @@ class OcrTest extends FlatSpec with Matchers {
23
25
  }
24
26
 
25
27
  it should "recognize three" in {
28
+ pending
26
29
  Ocr(List(" _ "
27
30
  , " _|"
28
31
  , " _|"
@@ -30,6 +33,7 @@ class OcrTest extends FlatSpec with Matchers {
30
33
  }
31
34
 
32
35
  it should "recognize four" in {
36
+ pending
33
37
  Ocr(List(" "
34
38
  , "|_|"
35
39
  , " |"
@@ -37,6 +41,7 @@ class OcrTest extends FlatSpec with Matchers {
37
41
  }
38
42
 
39
43
  it should "recognize five" in {
44
+ pending
40
45
  Ocr(List(" _ "
41
46
  , "|_ "
42
47
  , " _|"
@@ -44,6 +49,7 @@ class OcrTest extends FlatSpec with Matchers {
44
49
  }
45
50
 
46
51
  it should "recognize six" in {
52
+ pending
47
53
  Ocr(List(" _ "
48
54
  , "|_ "
49
55
  , "|_|"
@@ -51,6 +57,7 @@ class OcrTest extends FlatSpec with Matchers {
51
57
  }
52
58
 
53
59
  it should "recognize seven" in {
60
+ pending
54
61
  Ocr(List(" _ "
55
62
  , " |"
56
63
  , " |"
@@ -58,6 +65,7 @@ class OcrTest extends FlatSpec with Matchers {
58
65
  }
59
66
 
60
67
  it should "recognize eight" in {
68
+ pending
61
69
  Ocr(List(" _ "
62
70
  , "|_|"
63
71
  , "|_|"
@@ -65,6 +73,7 @@ class OcrTest extends FlatSpec with Matchers {
65
73
  }
66
74
 
67
75
  it should "recognize nine" in {
76
+ pending
68
77
  Ocr(List(" _ "
69
78
  , "|_|"
70
79
  , " _|"
@@ -72,6 +81,7 @@ class OcrTest extends FlatSpec with Matchers {
72
81
  }
73
82
 
74
83
  it should "recognize garble" in {
84
+ pending
75
85
  Ocr(List(" "
76
86
  , "| |"
77
87
  , "| |"
@@ -79,6 +89,7 @@ class OcrTest extends FlatSpec with Matchers {
79
89
  }
80
90
 
81
91
  it should "recognize ten" in {
92
+ pending
82
93
  Ocr(List(" _ "
83
94
  , " || |"
84
95
  , " ||_|"
@@ -86,6 +97,7 @@ class OcrTest extends FlatSpec with Matchers {
86
97
  }
87
98
 
88
99
  it should "recognize 110101100" in {
100
+ pending
89
101
  Ocr(List(" _ _ _ _ "
90
102
  , " | || | || | | || || |"
91
103
  , " | ||_| ||_| | ||_||_|"
@@ -93,6 +105,7 @@ class OcrTest extends FlatSpec with Matchers {
93
105
  }
94
106
 
95
107
  it should "recognize garbled multi digit ocr" in {
108
+ pending
96
109
  Ocr(List(" _ _ _ "
97
110
  , " | || | || | || || |"
98
111
  , " | | _| ||_| | ||_||_|"
@@ -100,6 +113,7 @@ class OcrTest extends FlatSpec with Matchers {
100
113
  }
101
114
 
102
115
  it should "recognize 1234567890" in {
116
+ pending
103
117
  Ocr(List(" _ _ _ _ _ _ _ _ "
104
118
  , " | _| _||_||_ |_ ||_||_|| |"
105
119
  , " ||_ _| | _||_| ||_| _||_|"
@@ -107,6 +121,7 @@ class OcrTest extends FlatSpec with Matchers {
107
121
  }
108
122
 
109
123
  it should "recognize 123,456,789" in {
124
+ pending
110
125
  Ocr(List(" _ _ "
111
126
  , " | _| _|"
112
127
  , " ||_ _|"
@@ -8,6 +8,7 @@ class OctalTest extends FlatSpec with Matchers {
8
8
  }
9
9
 
10
10
  it should "invalid octal should error" in {
11
+ pending
11
12
  intercept[IllegalArgumentException] {
12
13
  Octal.octalToInt("1239")
13
14
  }
@@ -18,30 +19,36 @@ class OctalTest extends FlatSpec with Matchers {
18
19
  }
19
20
 
20
21
  it should "handle zeros" in {
22
+ pending
21
23
  Octal.octalToInt("00000000") should equal(0)
22
24
  }
23
25
 
24
26
  it should "handle single digit" in {
27
+ pending
25
28
  Octal.octalToInt("0") should equal(0)
26
29
  Octal.octalToInt("7") should equal(7)
27
30
  }
28
31
 
29
32
  it should "handle multiple digits" in {
33
+ pending
30
34
  Octal.octalToInt("10") should equal(8)
31
35
  Octal.octalToInt("17") should equal(15)
32
36
  Octal.octalToInt("1234567") should equal(342391)
33
37
  }
34
38
 
35
39
  it should "handle Int 0" in {
40
+ pending
36
41
  Octal.intToOctal(0) should equal("0")
37
42
  }
38
43
 
39
44
  it should "handle Int to multi digit octal" in {
45
+ pending
40
46
  Octal.intToOctal(9) should equal("11")
41
47
  Octal.intToOctal(342391) should equal("1234567")
42
48
  }
43
49
 
44
50
  it should "handle Int to octal with trailing zeros" in {
51
+ pending
45
52
  Octal.intToOctal(8) should equal("10")
46
53
  }
47
54
  }
@@ -41,31 +41,38 @@ class FrequencyTest extends FunSuite with Matchers {
41
41
  }
42
42
 
43
43
  test("Single letter") {
44
+ pending
44
45
  Frequency.frequency(10, Seq("a")) should be (Map('a' -> 1))
45
46
  }
46
47
 
47
48
  test("Case insensitivity") {
49
+ pending
48
50
  Frequency.frequency(1000, Seq("aA")) should be (Map('a' -> 2))
49
51
  }
50
52
 
51
53
  test("Many empty texts") {
54
+ pending
52
55
  Frequency.frequency(1, Iterator.fill(10000)(" ").toSeq) should be (Map())
53
56
  }
54
57
 
55
58
  test("many times the same text gives a predictable result") {
59
+ pending
56
60
  Frequency.frequency(1, Iterator.fill(1000)("abc").toSeq) should
57
61
  be (Map('a' -> 1000, 'b' -> 1000, 'c' -> 1000))
58
62
  }
59
63
 
60
64
  test("Ignore punctuation") {
65
+ pending
61
66
  Frequency.frequency(1, ode_an_die_freude).get(',') should be (None)
62
67
  }
63
68
 
64
69
  test("Ignore numbers") {
70
+ pending
65
71
  Frequency.frequency(1, Seq("Testing 1, 2, 3")).get('1') should be (None)
66
72
  }
67
73
 
68
74
  test("All three anthems - 1 worker") {
75
+ pending
69
76
  val freqs = Frequency.frequency(1, ode_an_die_freude ++ wilhelmus ++ star_spangled_banner)
70
77
  freqs.get('a') should be (Some(49))
71
78
  freqs.get('t') should be (Some(56))
@@ -73,6 +80,7 @@ class FrequencyTest extends FunSuite with Matchers {
73
80
  }
74
81
 
75
82
  test("All three anthems - 4 workers") {
83
+ pending
76
84
  val freqs = Frequency.frequency(4, ode_an_die_freude ++ wilhelmus ++ star_spangled_banner)
77
85
  freqs.get('a') should be (Some(49))
78
86
  freqs.get('t') should be (Some(56))
@@ -6,24 +6,29 @@ class PascalsTriangleTest extends FlatSpec with Matchers {
6
6
  }
7
7
 
8
8
  it should "handle 2 rows" in {
9
+ pending
9
10
  PascalsTriangle.triangle(2) should be (List(List(1), List(1, 1)))
10
11
  }
11
12
 
12
13
  it should "handle 3 rows" in {
14
+ pending
13
15
  PascalsTriangle.triangle(3) should be (List(List(1), List(1, 1), List(1, 2, 1)))
14
16
  }
15
17
 
16
18
  it should "handle 4 rows" in {
19
+ pending
17
20
  PascalsTriangle.triangle(4) should be (List(List(1), List(1, 1),
18
21
  List(1, 2, 1), List(1, 3, 3, 1)))
19
22
  }
20
23
 
21
24
  it should "handle 5 rows" in {
25
+ pending
22
26
  PascalsTriangle.triangle(5) should be (List(List(1), List(1, 1),
23
27
  List(1, 2, 1), List(1, 3, 3, 1), List(1, 4, 6, 4, 1)))
24
28
  }
25
29
 
26
30
  it should "handle 20 rows" in {
31
+ pending
27
32
  PascalsTriangle.triangle(20).takeRight(1).head should be (List(1, 19,
28
33
  171, 969, 3876, 11628, 27132, 50388, 75582, 92378,
29
34
  92378, 75582, 50388, 27132, 11628, 3876, 969, 171,
@@ -7,12 +7,14 @@ class PigLatinTest extends FlatSpec with Matchers {
7
7
  }
8
8
 
9
9
  it should "translate beginning with single letter consonant clusters" in {
10
+ pending
10
11
  PigLatin.translate("pig") should be ("igpay")
11
12
  PigLatin.translate("koala") should be ("oalakay")
12
13
  PigLatin.translate("qat") should be ("atqay")
13
14
  }
14
15
 
15
16
  it should "translate beginning with multiple letter consonant clusters" in {
17
+ pending
16
18
  PigLatin.translate("chair") should be ("airchay")
17
19
  PigLatin.translate("therapy") should be ("erapythay")
18
20
  PigLatin.translate("thrush") should be ("ushthray")
@@ -20,11 +22,13 @@ class PigLatinTest extends FlatSpec with Matchers {
20
22
  }
21
23
 
22
24
  it should "translate beginning with consonant clusters with qu" in {
25
+ pending
23
26
  PigLatin.translate("queen") should be ("eenquay")
24
27
  PigLatin.translate("square") should be ("aresquay")
25
28
  }
26
29
 
27
30
  it should "translate phrases" in {
31
+ pending
28
32
  PigLatin.translate("quick fast run") should be ("ickquay astfay unray")
29
33
  }
30
34
  }
@@ -13,14 +13,17 @@ class PythagoreanTripletTest extends FunSuite with Matchers {
13
13
  }
14
14
 
15
15
  test("pythagoreanTriplets 1 to 10") {
16
+ pending
16
17
  PythagoreanTriplet.pythagoreanTriplets(1, 10) should be (Seq((3, 4, 5), (6, 8, 10)))
17
18
  }
18
19
 
19
20
  test("pythagoreanTriplets 11 to 20") {
21
+ pending
20
22
  PythagoreanTriplet.pythagoreanTriplets(11, 20) should be (Seq((12, 16, 20)))
21
23
  }
22
24
 
23
25
  test("pythagoreanTriplets 56 to 95") {
26
+ pending
24
27
  PythagoreanTriplet.pythagoreanTriplets(56, 95) should be (Seq((57, 76, 95), (60, 63, 87)))
25
28
  }
26
29
  }
@@ -14,6 +14,7 @@ class QueensTest extends FunSuite with Matchers {
14
14
  }
15
15
 
16
16
  test("boardString") {
17
+ pending
17
18
  Queens().boardString(Some(Position(2, 4)), Some(Position(6, 6))) should equal(
18
19
  "_ _ _ _ _ _ _ _\n" +
19
20
  "_ _ _ _ _ _ _ _\n" +
@@ -26,18 +27,22 @@ class QueensTest extends FunSuite with Matchers {
26
27
  }
27
28
 
28
29
  test("canAttack - false") {
30
+ pending
29
31
  Queens().canAttack(Position(2, 3), Position(4, 7)) should be (false)
30
32
  }
31
33
 
32
34
  test("canAttack - vert attack") {
35
+ pending
33
36
  Queens().canAttack(Position(2, 4), Position(2, 7)) should be (true)
34
37
  }
35
38
 
36
39
  test("canAttack - horiz attack") {
40
+ pending
37
41
  Queens().canAttack(Position(5, 4), Position(2, 4)) should be (true)
38
42
  }
39
43
 
40
44
  test("canAttack - diag attack") {
45
+ pending
41
46
  Queens().canAttack(Position(1, 1), Position(6, 6)) should be (true)
42
47
  Queens().canAttack(Position(0, 6), Position(1, 7)) should be (true)
43
48
  Queens().canAttack(Position(4, 1), Position(6, 3)) should be (true)
@@ -7,45 +7,53 @@ class RobotTest extends FunSuite with Matchers {
7
7
  robot.coordinates should equal((0, 0))
8
8
  }
9
9
 
10
- test("advance - positive") {
10
+ test("advance - positive") {
11
+ pending
11
12
  Robot(Bearing.North, (0, 0)).advance should equal(Robot(Bearing.North, (0, 1)))
12
13
  Robot(Bearing.East, (0, 0)).advance should equal(Robot(Bearing.East, (1, 0)))
13
14
  }
14
15
 
15
- test("advance - negative") {
16
+ test("advance - negative") {
17
+ pending
16
18
  Robot(Bearing.South, (0, 0)).advance should equal(Robot(Bearing.South, (0, -1)))
17
19
  Robot(Bearing.West, (0, 0)).advance should equal(Robot(Bearing.West, (-1, 0)))
18
20
  }
19
21
 
20
- test("turning") {
22
+ test("turning") {
23
+ pending
21
24
  Robot(Bearing.South, (0, 0)).turnRight should equal(Robot(Bearing.West, (0, 0)))
22
25
  Robot(Bearing.West, (0, 0)).turnLeft() should equal(Robot(Bearing.South, (0, 0)))
23
26
  }
24
27
 
25
- test("turning - edge cases") {
28
+ test("turning - edge cases") {
29
+ pending
26
30
  Robot(Bearing.West, (0, 0)).turnRight should equal(Robot(Bearing.North, (0, 0)))
27
31
  Robot(Bearing.North, (0, 0)).turnLeft should equal(Robot(Bearing.West, (0, 0)))
28
32
  }
29
33
 
30
- test("simulate Seurat") {
34
+ test("simulate Seurat") {
35
+ pending
31
36
  val seurat = Robot(Bearing.East, (-2, 1))
32
37
  val movedSeurat = seurat.simulate("RLAALAL")
33
38
  movedSeurat should equal(Robot(Bearing.West, (0, 2)))
34
39
  }
35
40
 
36
- test("simulate Erasmus") {
41
+ test("simulate Erasmus") {
42
+ pending
37
43
  val erasmus = Robot(Bearing.North, (0, 0))
38
44
  val movedErasmus = erasmus.simulate("LAAARALA")
39
45
  movedErasmus should equal(Robot(Bearing.West, (-4, 1)))
40
46
  }
41
47
 
42
- test("simulate Chirox") {
48
+ test("simulate Chirox") {
49
+ pending
43
50
  val chirox = Robot(Bearing.East, (2, -7))
44
51
  val movedChirox = chirox.simulate("RRAAAAALA")
45
52
  movedChirox should equal(Robot(Bearing.South, (-3, -8)))
46
53
  }
47
54
 
48
- test("simulate Awesomo") {
55
+ test("simulate Awesomo") {
56
+ pending
49
57
  val awesomo = Robot(Bearing.South, (8, 4))
50
58
  val movedAwesomo = awesomo.simulate("LAAARRRALLLL")
51
59
  movedAwesomo should equal(Robot(Bearing.North, (11, 5)))
@@ -5,72 +5,89 @@ class SayTest extends FunSuite with Matchers {
5
5
  Say.inEnglish(0) should be (Some("zero"))
6
6
  }
7
7
 
8
- test("one") {
8
+ test("one") {
9
+ pending
9
10
  Say.inEnglish(1) should be (Some("one"))
10
11
  }
11
12
 
12
- test("fourteen") {
13
+ test("fourteen") {
14
+ pending
13
15
  Say.inEnglish(14) should be (Some("fourteen"))
14
16
  }
15
17
 
16
- test("twenty") {
18
+ test("twenty") {
19
+ pending
17
20
  Say.inEnglish(20) should be (Some("twenty"))
18
21
  }
19
22
 
20
- test("twenty-two") {
23
+ test("twenty-two") {
24
+ pending
21
25
  Say.inEnglish(22) should be (Some("twenty-two"))
22
26
  }
23
27
 
24
- test("fifty") {
28
+ test("fifty") {
29
+ pending
25
30
  Say.inEnglish(50) should be (Some("fifty"))
26
31
  }
27
32
 
28
- test("ninety-eight") {
33
+ test("ninety-eight") {
34
+ pending
29
35
  Say.inEnglish(98) should be (Some("ninety-eight"))
30
36
  }
31
37
 
32
- test("one hundred") {
38
+ test("one hundred") {
39
+ pending
33
40
  Say.inEnglish(100) should be (Some("one hundred"))
34
41
  }
35
42
 
36
- test("one hundred twenty-three") {
43
+ test("one hundred twenty-three") {
44
+ pending
37
45
  Say.inEnglish(123) should be (Some("one hundred twenty-three"))
38
46
  }
39
47
 
40
- test("one thousand") {
48
+ test("one thousand") {
49
+ pending
41
50
  Say.inEnglish(1000) should be (Some("one thousand"))
42
51
  }
43
52
 
44
- test("one thousand two hundred thirty-four") {
53
+ test("one thousand two hundred thirty-four") {
54
+ pending
45
55
  Say.inEnglish(1234) should be (Some("one thousand two hundred thirty-four"))
46
56
  }
47
57
 
48
- test("one million") {
58
+ test("one million") {
59
+ pending
49
60
  Say.inEnglish(1000000) should be (Some("one million"))
50
61
  }
51
62
 
52
- test("one million two") {
63
+ test("one million two") {
64
+ pending
53
65
  Say.inEnglish(1000002) should be (Some("one million two"))
54
66
  }
55
67
 
56
- test("one million two thousand three hundred forty-five") {
68
+ test("one million two thousand three hundred forty-five") {
69
+ pending
57
70
  Say.inEnglish(1002345) should be (Some("one million two thousand three hundred forty-five"))
58
71
  }
59
72
 
60
- test("one billion") {
73
+ test("one billion") {
74
+ pending
61
75
  Say.inEnglish(1000000000) should be (Some("one billion"))
62
76
  }
63
77
 
64
- test("A big number") {
78
+ test("A big number") {
79
+ pending
65
80
  Say.inEnglish(987654321123L) should be (Some("nine hundred eighty-seven billion " +
66
81
  "six hundred fifty-four million three hundred twenty-one thousand one hundred twenty-three"))
67
82
  }
68
83
 
69
- test("Lower bound") {
84
+ test("Lower bound") {
85
+ pending
70
86
  Say.inEnglish(-1) should be (None)
71
87
  }
72
88
 
73
- test("Upper bound") {
89
+ test("Upper bound") {
90
+ pending
74
91
  Say.inEnglish(1000000000000L) should be (None)
75
92
  }
76
93
  }
@@ -6,26 +6,32 @@ class scrabble_score_test extends FunSuite with Matchers {
6
6
  }
7
7
 
8
8
  test("score letter uppercase") {
9
+ pending
9
10
  new Scrabble().scoreLetter('A') should be (1)
10
11
  }
11
12
 
12
13
  test("score word") {
14
+ pending
13
15
  new Scrabble().scoreWord("at") should be (2)
14
16
  }
15
17
 
16
18
  test("score word with dupe letters") {
19
+ pending
17
20
  new Scrabble().scoreWord("street") should be (6)
18
21
  }
19
22
 
20
23
  test("score quirky word") {
24
+ pending
21
25
  new Scrabble().scoreWord("quirky") should be (22)
22
26
  }
23
27
 
24
28
  test("score capitalized word") {
29
+ pending
25
30
  new Scrabble().scoreWord("OXYPHENBUTAZONE") should be (41)
26
31
  }
27
32
 
28
33
  test("score mixed case word") {
34
+ pending
29
35
  new Scrabble().scoreWord("Oxyphenbutazone") should be (41)
30
36
  }
31
37
  }
@@ -6,46 +6,55 @@ class SecretHandshakeTest extends FunSuite with Matchers {
6
6
  SecretHandshake.handshake("1") should be (List("wink"))
7
7
  }
8
8
 
9
- test("10 to double blink") {
9
+ test("10 to double blink") {
10
+ pending
10
11
  SecretHandshake.handshake(2) should be (List("double blink"))
11
12
  SecretHandshake.handshake("10") should be (List("double blink"))
12
13
  }
13
14
 
14
- test("100 to close your eyes") {
15
+ test("100 to close your eyes") {
16
+ pending
15
17
  SecretHandshake.handshake(4) should be (List("close your eyes"))
16
18
  SecretHandshake.handshake("100") should be (List("close your eyes"))
17
19
  }
18
20
 
19
- test("1000 to jump") {
21
+ test("1000 to jump") {
22
+ pending
20
23
  SecretHandshake.handshake(8) should be (List("jump"))
21
24
  SecretHandshake.handshake("1000") should be (List("jump"))
22
25
  }
23
26
 
24
- test("11 to wink and double blink") {
27
+ test("11 to wink and double blink") {
28
+ pending
25
29
  SecretHandshake.handshake(3) should be (List("wink", "double blink"))
26
30
  SecretHandshake.handshake("11") should be (List("wink", "double blink"))
27
31
  }
28
32
 
29
- test("10011 to double blink and wink") {
33
+ test("10011 to double blink and wink") {
34
+ pending
30
35
  SecretHandshake.handshake(19) should be (List("double blink", "wink"))
31
36
  SecretHandshake.handshake("10011") should be (List("double blink", "wink"))
32
37
  }
33
38
 
34
- test("11111 to jump, close your eyes, double blink, and wink") {
39
+ test("11111 to jump, close your eyes, double blink, and wink") {
40
+ pending
35
41
  SecretHandshake.handshake(31) should be (List("jump", "close your eyes", "double blink", "wink"))
36
42
  SecretHandshake.handshake("11111") should be (List("jump", "close your eyes", "double blink", "wink"))
37
43
  }
38
44
 
39
- test("zero") {
45
+ test("zero") {
46
+ pending
40
47
  SecretHandshake.handshake(0) should be (List())
41
48
  SecretHandshake.handshake("0") should be (List())
42
49
  }
43
50
 
44
- test("gibberish") {
51
+ test("gibberish") {
52
+ pending
45
53
  SecretHandshake.handshake("piggies") should be (List())
46
54
  }
47
55
 
48
- test("partial gibberish") {
56
+ test("partial gibberish") {
57
+ pending
49
58
  SecretHandshake.handshake("1piggies") should be (List())
50
59
  }
51
60
  }
@@ -8,14 +8,16 @@ class SeriesTest extends FunSuite with Matchers {
8
8
  List(3), List(4)))
9
9
  }
10
10
 
11
- test("slices of two") {
11
+ test("slices of two") {
12
+ pending
12
13
  Series.slices(2, "") should be (List())
13
14
  Series.slices(2, "01") should be (List(List(0, 1)))
14
15
  Series.slices(2, "01234") should be (List(List(0, 1), List(1, 2), List(2, 3),
15
16
  List(3, 4)))
16
17
  }
17
18
 
18
- test("slices of three") {
19
+ test("slices of three") {
20
+ pending
19
21
  Series.slices(3, "") should be (List())
20
22
  Series.slices(3, "012") should be (List(List(0, 1, 2)))
21
23
  Series.slices(3, "01234") should be (List(List(0, 1, 2), List(1, 2, 3),