trackler 2.0.6.40 → 2.0.6.41

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/common/exercises/book-store/canonical-data.json +7 -1
  3. data/common/exercises/rotational-cipher/{cannonical-data.json → canonical-data.json} +0 -0
  4. data/lib/trackler/version.rb +1 -1
  5. data/tracks/c/config.json +9 -0
  6. data/tracks/c/exercises/triangle/makefile +16 -0
  7. data/tracks/c/exercises/triangle/src/example.c +33 -0
  8. data/tracks/c/exercises/triangle/src/example.h +15 -0
  9. data/tracks/c/exercises/triangle/src/triangle.h +10 -0
  10. data/tracks/c/exercises/triangle/test/test_triangle.c +121 -0
  11. data/tracks/c/exercises/triangle/test/vendor/unity.c +1300 -0
  12. data/tracks/c/exercises/triangle/test/vendor/unity.h +274 -0
  13. data/tracks/c/exercises/triangle/test/vendor/unity_internals.h +701 -0
  14. data/tracks/clojure/.gitignore +1 -0
  15. data/tracks/clojure/_src/clock_generator.clj +5 -0
  16. data/tracks/clojure/_src/generator.clj +72 -0
  17. data/tracks/clojure/config.json +6 -0
  18. data/tracks/clojure/exercises/clock/clock.mustache +34 -0
  19. data/tracks/clojure/exercises/clock/project.clj +4 -0
  20. data/tracks/clojure/exercises/clock/src/example.clj +19 -0
  21. data/tracks/clojure/exercises/clock/test/clock_test.clj +177 -0
  22. data/tracks/clojure/project.clj +4 -1
  23. data/tracks/csharp/exercises/poker/Example.cs +1 -1
  24. data/tracks/csharp/exercises/poker/PokerTest.cs +10 -0
  25. data/tracks/erlang/docs/INSTALLATION.md +14 -3
  26. data/tracks/erlang/docs/LEARNING.md +1 -0
  27. data/tracks/go/exercises/gigasecond/gigasecond_test.go +5 -2
  28. data/tracks/go/exercises/grade-school/example.go +2 -0
  29. data/tracks/go/exercises/grade-school/grade_school_test.go +8 -0
  30. data/tracks/go/exercises/hamming/hamming_test.go +1 -1
  31. data/tracks/go/exercises/hello-world/hello_test.go +6 -4
  32. data/tracks/haskell/exercises/accumulate/src/Accumulate.hs +1 -1
  33. data/tracks/haskell/exercises/anagram/src/Anagram.hs +1 -1
  34. data/tracks/java/bin/journey-test.sh +21 -4
  35. data/tracks/java/exercises/allergies/src/example/java/Allergen.java +20 -0
  36. data/tracks/java/exercises/hamming/src/test/java/HammingTest.java +10 -3
  37. data/tracks/java/exercises/luhn/src/example/java/LuhnValidator.java +19 -11
  38. data/tracks/java/exercises/luhn/src/test/java/LuhnValidatorTest.java +43 -1
  39. data/tracks/java/exercises/meetup/src/example/java/MeetupSchedule.java +8 -0
  40. data/tracks/java/exercises/meetup/src/test/java/MeetupTest.java +91 -91
  41. data/tracks/java/exercises/perfect-numbers/src/example/java/Classification.java +5 -0
  42. data/tracks/java/exercises/robot-simulator/src/example/java/GridPosition.java +29 -0
  43. data/tracks/java/exercises/robot-simulator/src/example/java/Orientation.java +5 -0
  44. data/tracks/java/exercises/secret-handshake/src/example/java/Signal.java +5 -0
  45. data/tracks/java/exercises/sublist/src/example/java/Relationship.java +5 -0
  46. data/tracks/java/exercises/triangle/src/example/java/TriangleException.java +5 -0
  47. data/tracks/java/exercises/triangle/src/example/java/TriangleKind.java +5 -0
  48. data/tracks/julia/config.json +10 -1
  49. data/tracks/julia/exercises/atbash-cipher/runtests.jl +36 -36
  50. data/tracks/julia/exercises/pangram/example.jl +2 -0
  51. data/tracks/julia/exercises/pangram/pangram.jl +4 -0
  52. data/tracks/julia/exercises/pangram/runtests.jl +40 -0
  53. data/tracks/perl5/exercises/bob/Example.pm +1 -1
  54. data/tracks/perl5/exercises/bob/bob.t +27 -31
  55. data/tracks/php/exercises/accumulate/accumulate_test.php +1 -1
  56. data/tracks/php/exercises/acronym/acronym_test.php +1 -1
  57. data/tracks/php/exercises/allergies/allergies_test.php +1 -1
  58. data/tracks/php/exercises/anagram/anagram_test.php +1 -1
  59. data/tracks/php/exercises/atbash-cipher/atbash-cipher_test.php +1 -1
  60. data/tracks/php/exercises/beer-song/beer-song_test.php +1 -1
  61. data/tracks/php/exercises/binary/binary_test.php +2 -2
  62. data/tracks/php/exercises/bob/bob_test.php +1 -1
  63. data/tracks/php/exercises/book-store/book-store_test.php +1 -1
  64. data/tracks/php/exercises/bowling/bowling_test.php +1 -1
  65. data/tracks/php/exercises/bracket-push/bracket-push_test.php +1 -1
  66. data/tracks/php/exercises/change/change_test.php +3 -3
  67. data/tracks/php/exercises/clock/clock_test.php +1 -1
  68. data/tracks/php/exercises/connect/connect_test.php +1 -1
  69. data/tracks/php/exercises/difference-of-squares/difference-of-squares_test.php +1 -1
  70. data/tracks/php/exercises/etl/etl_test.php +1 -1
  71. data/tracks/php/exercises/gigasecond/gigasecond_test.php +1 -1
  72. data/tracks/php/exercises/grains/grains_test.php +1 -1
  73. data/tracks/php/exercises/hamming/hamming_test.php +2 -2
  74. data/tracks/php/exercises/hello-world/hello-world_test.php +1 -1
  75. data/tracks/php/exercises/isogram/isogram_test.php +1 -1
  76. data/tracks/php/exercises/largest-series-product/largest-series-product_test.php +1 -1
  77. data/tracks/php/exercises/leap/leap_test.php +1 -1
  78. data/tracks/php/exercises/markdown/markdown_test.php +1 -1
  79. data/tracks/php/exercises/minesweeper/minesweeper_test.php +7 -7
  80. data/tracks/php/exercises/nucleotide-count/nucleotide-count_test.php +1 -1
  81. data/tracks/php/exercises/ocr-numbers/ocr-numbers_test.php +1 -1
  82. data/tracks/php/exercises/pangram/pangram_test.php +1 -1
  83. data/tracks/php/exercises/phone-number/phone-number_test.php +1 -1
  84. data/tracks/php/exercises/pig-latin/pig-latin_test.php +1 -1
  85. data/tracks/php/exercises/raindrops/raindrops_test.php +1 -1
  86. data/tracks/php/exercises/rna-transcription/rna-transcription_test.php +1 -1
  87. data/tracks/php/exercises/robot-name/robot-name_test.php +1 -1
  88. data/tracks/php/exercises/robot-simulator/robot-simulator_test.php +1 -1
  89. data/tracks/php/exercises/roman-numerals/roman-numerals_test.php +1 -1
  90. data/tracks/php/exercises/sieve/sieve_test.php +1 -1
  91. data/tracks/php/exercises/space-age/space-age_test.php +1 -1
  92. data/tracks/php/exercises/triangle/triangle_test.php +1 -1
  93. data/tracks/php/exercises/trinary/trinary_test.php +1 -1
  94. data/tracks/php/exercises/variable-length-quantity/variable-length-quantity_test.php +3 -3
  95. data/tracks/php/exercises/word-count/word-count_test.php +1 -1
  96. data/tracks/php/exercises/wordy/wordy_test.php +3 -3
  97. data/tracks/python/config.json +3 -13
  98. data/tracks/python/exercises/rectangles/rectangles_count_test.py +15 -22
  99. data/tracks/scala/config.json +684 -665
  100. data/tracks/scala/exercises/binary-search/build.sbt +3 -0
  101. data/tracks/scala/exercises/binary-search/example.scala +23 -0
  102. data/tracks/scala/exercises/binary-search/src/main/scala/BinarySearch.scala +0 -0
  103. data/tracks/scala/exercises/binary-search/src/test/scala/BinarySearchTest.scala +63 -0
  104. data/tracks/scala/exercises/strain/build.sbt +3 -0
  105. data/tracks/scala/exercises/strain/example.scala +22 -0
  106. data/tracks/scala/exercises/strain/src/main/scala/Strain.scala +0 -0
  107. data/tracks/scala/exercises/strain/src/test/scala/StrainTest.scala +78 -0
  108. data/tracks/scala/testgen/src/main/scala/AllYourBaseTestGenerator.scala +13 -20
  109. data/tracks/scala/testgen/src/main/scala/BinarySearchTestGenerator.scala +48 -0
  110. data/tracks/scala/testgen/src/main/scala/BowlingTestGenerator.scala +24 -32
  111. data/tracks/scala/testgen/src/main/scala/CustomSetTestGenerator.scala +148 -112
  112. data/tracks/scala/testgen/src/main/scala/TestBuilder.scala +86 -0
  113. metadata +30 -3
  114. data/tracks/java/exercises/allergies/src/example/java/Allergen.java +0 -1
  115. data/tracks/java/exercises/meetup/src/example/java/MeetupSchedule.java +0 -1
  116. data/tracks/java/exercises/perfect-numbers/src/example/java/Classification.java +0 -1
  117. data/tracks/java/exercises/robot-simulator/src/example/java/GridPosition.java +0 -1
  118. data/tracks/java/exercises/robot-simulator/src/example/java/Orientation.java +0 -1
  119. data/tracks/java/exercises/secret-handshake/src/example/java/Signal.java +0 -1
  120. data/tracks/java/exercises/sublist/src/example/java/Relationship.java +0 -1
  121. data/tracks/java/exercises/triangle/src/example/java/TriangleException.java +0 -1
  122. data/tracks/java/exercises/triangle/src/example/java/TriangleKind.java +0 -1
@@ -19,10 +19,22 @@ public class LuhnValidatorTest {
19
19
 
20
20
  @Ignore
21
21
  @Test
22
- public void testThatAValidCanadianSocialInsuranceNumberIsIdentifiedAsValid() {
22
+ public void testThatASimpleValidNumberIsIdentifiedAsValid() {
23
+ assertTrue(new LuhnValidator().isValid(" 5 9 "));
24
+ }
25
+
26
+ @Ignore
27
+ @Test
28
+ public void testThatAValidCanadianSocialInsuranceNumberIsIdentifiedAsValidV1() {
23
29
  assertTrue(new LuhnValidator().isValid("046 454 286"));
24
30
  }
25
31
 
32
+ @Ignore
33
+ @Test
34
+ public void testThatAValidCanadianSocialInsuranceNumberIsIdentifiedAsValidV2() {
35
+ assertTrue(new LuhnValidator().isValid("055 444 285"));
36
+ }
37
+
26
38
  @Ignore
27
39
  @Test
28
40
  public void testThatAnInvalidCanadianSocialInsuranceNumberIsIdentifiedAsInvalid() {
@@ -41,4 +53,34 @@ public class LuhnValidatorTest {
41
53
  assertFalse(new LuhnValidator().isValid("046a 454 286"));
42
54
  }
43
55
 
56
+ @Ignore
57
+ @Test
58
+ public void testThatStringContainingPunctuationIsInvalid() {
59
+ assertFalse(new LuhnValidator().isValid("055-444-285"));
60
+ }
61
+
62
+ @Ignore
63
+ @Test
64
+ public void testThatStringContainingSymbolsIsInvalid() {
65
+ assertFalse(new LuhnValidator().isValid("055£ 444$ 285"));
66
+ }
67
+
68
+ @Ignore
69
+ @Test
70
+ public void testThatTheStringConsistingOfASpaceAndASingleZeroIsInvalid() {
71
+ assertFalse(new LuhnValidator().isValid(" 0"));
72
+ }
73
+
74
+ @Ignore
75
+ @Test
76
+ public void testThatStringContainingMultipleZerosIsValid() {
77
+ assertTrue(new LuhnValidator().isValid(" 00000"));
78
+ }
79
+
80
+ @Ignore
81
+ @Test
82
+ public void testThatDoublingNineIsHandledCorrectly() {
83
+ assertTrue(new LuhnValidator().isValid("091"));
84
+ }
85
+
44
86
  }
@@ -0,0 +1,8 @@
1
+ public enum MeetupSchedule {
2
+ FIRST,
3
+ SECOND,
4
+ THIRD,
5
+ FOURTH,
6
+ LAST,
7
+ TEENTH
8
+ }