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.
- checksums.yaml +4 -4
- data/common/exercises/book-store/canonical-data.json +7 -1
- data/common/exercises/rotational-cipher/{cannonical-data.json → canonical-data.json} +0 -0
- data/lib/trackler/version.rb +1 -1
- data/tracks/c/config.json +9 -0
- data/tracks/c/exercises/triangle/makefile +16 -0
- data/tracks/c/exercises/triangle/src/example.c +33 -0
- data/tracks/c/exercises/triangle/src/example.h +15 -0
- data/tracks/c/exercises/triangle/src/triangle.h +10 -0
- data/tracks/c/exercises/triangle/test/test_triangle.c +121 -0
- data/tracks/c/exercises/triangle/test/vendor/unity.c +1300 -0
- data/tracks/c/exercises/triangle/test/vendor/unity.h +274 -0
- data/tracks/c/exercises/triangle/test/vendor/unity_internals.h +701 -0
- data/tracks/clojure/.gitignore +1 -0
- data/tracks/clojure/_src/clock_generator.clj +5 -0
- data/tracks/clojure/_src/generator.clj +72 -0
- data/tracks/clojure/config.json +6 -0
- data/tracks/clojure/exercises/clock/clock.mustache +34 -0
- data/tracks/clojure/exercises/clock/project.clj +4 -0
- data/tracks/clojure/exercises/clock/src/example.clj +19 -0
- data/tracks/clojure/exercises/clock/test/clock_test.clj +177 -0
- data/tracks/clojure/project.clj +4 -1
- data/tracks/csharp/exercises/poker/Example.cs +1 -1
- data/tracks/csharp/exercises/poker/PokerTest.cs +10 -0
- data/tracks/erlang/docs/INSTALLATION.md +14 -3
- data/tracks/erlang/docs/LEARNING.md +1 -0
- data/tracks/go/exercises/gigasecond/gigasecond_test.go +5 -2
- data/tracks/go/exercises/grade-school/example.go +2 -0
- data/tracks/go/exercises/grade-school/grade_school_test.go +8 -0
- data/tracks/go/exercises/hamming/hamming_test.go +1 -1
- data/tracks/go/exercises/hello-world/hello_test.go +6 -4
- data/tracks/haskell/exercises/accumulate/src/Accumulate.hs +1 -1
- data/tracks/haskell/exercises/anagram/src/Anagram.hs +1 -1
- data/tracks/java/bin/journey-test.sh +21 -4
- data/tracks/java/exercises/allergies/src/example/java/Allergen.java +20 -0
- data/tracks/java/exercises/hamming/src/test/java/HammingTest.java +10 -3
- data/tracks/java/exercises/luhn/src/example/java/LuhnValidator.java +19 -11
- data/tracks/java/exercises/luhn/src/test/java/LuhnValidatorTest.java +43 -1
- data/tracks/java/exercises/meetup/src/example/java/MeetupSchedule.java +8 -0
- data/tracks/java/exercises/meetup/src/test/java/MeetupTest.java +91 -91
- data/tracks/java/exercises/perfect-numbers/src/example/java/Classification.java +5 -0
- data/tracks/java/exercises/robot-simulator/src/example/java/GridPosition.java +29 -0
- data/tracks/java/exercises/robot-simulator/src/example/java/Orientation.java +5 -0
- data/tracks/java/exercises/secret-handshake/src/example/java/Signal.java +5 -0
- data/tracks/java/exercises/sublist/src/example/java/Relationship.java +5 -0
- data/tracks/java/exercises/triangle/src/example/java/TriangleException.java +5 -0
- data/tracks/java/exercises/triangle/src/example/java/TriangleKind.java +5 -0
- data/tracks/julia/config.json +10 -1
- data/tracks/julia/exercises/atbash-cipher/runtests.jl +36 -36
- data/tracks/julia/exercises/pangram/example.jl +2 -0
- data/tracks/julia/exercises/pangram/pangram.jl +4 -0
- data/tracks/julia/exercises/pangram/runtests.jl +40 -0
- data/tracks/perl5/exercises/bob/Example.pm +1 -1
- data/tracks/perl5/exercises/bob/bob.t +27 -31
- data/tracks/php/exercises/accumulate/accumulate_test.php +1 -1
- data/tracks/php/exercises/acronym/acronym_test.php +1 -1
- data/tracks/php/exercises/allergies/allergies_test.php +1 -1
- data/tracks/php/exercises/anagram/anagram_test.php +1 -1
- data/tracks/php/exercises/atbash-cipher/atbash-cipher_test.php +1 -1
- data/tracks/php/exercises/beer-song/beer-song_test.php +1 -1
- data/tracks/php/exercises/binary/binary_test.php +2 -2
- data/tracks/php/exercises/bob/bob_test.php +1 -1
- data/tracks/php/exercises/book-store/book-store_test.php +1 -1
- data/tracks/php/exercises/bowling/bowling_test.php +1 -1
- data/tracks/php/exercises/bracket-push/bracket-push_test.php +1 -1
- data/tracks/php/exercises/change/change_test.php +3 -3
- data/tracks/php/exercises/clock/clock_test.php +1 -1
- data/tracks/php/exercises/connect/connect_test.php +1 -1
- data/tracks/php/exercises/difference-of-squares/difference-of-squares_test.php +1 -1
- data/tracks/php/exercises/etl/etl_test.php +1 -1
- data/tracks/php/exercises/gigasecond/gigasecond_test.php +1 -1
- data/tracks/php/exercises/grains/grains_test.php +1 -1
- data/tracks/php/exercises/hamming/hamming_test.php +2 -2
- data/tracks/php/exercises/hello-world/hello-world_test.php +1 -1
- data/tracks/php/exercises/isogram/isogram_test.php +1 -1
- data/tracks/php/exercises/largest-series-product/largest-series-product_test.php +1 -1
- data/tracks/php/exercises/leap/leap_test.php +1 -1
- data/tracks/php/exercises/markdown/markdown_test.php +1 -1
- data/tracks/php/exercises/minesweeper/minesweeper_test.php +7 -7
- data/tracks/php/exercises/nucleotide-count/nucleotide-count_test.php +1 -1
- data/tracks/php/exercises/ocr-numbers/ocr-numbers_test.php +1 -1
- data/tracks/php/exercises/pangram/pangram_test.php +1 -1
- data/tracks/php/exercises/phone-number/phone-number_test.php +1 -1
- data/tracks/php/exercises/pig-latin/pig-latin_test.php +1 -1
- data/tracks/php/exercises/raindrops/raindrops_test.php +1 -1
- data/tracks/php/exercises/rna-transcription/rna-transcription_test.php +1 -1
- data/tracks/php/exercises/robot-name/robot-name_test.php +1 -1
- data/tracks/php/exercises/robot-simulator/robot-simulator_test.php +1 -1
- data/tracks/php/exercises/roman-numerals/roman-numerals_test.php +1 -1
- data/tracks/php/exercises/sieve/sieve_test.php +1 -1
- data/tracks/php/exercises/space-age/space-age_test.php +1 -1
- data/tracks/php/exercises/triangle/triangle_test.php +1 -1
- data/tracks/php/exercises/trinary/trinary_test.php +1 -1
- data/tracks/php/exercises/variable-length-quantity/variable-length-quantity_test.php +3 -3
- data/tracks/php/exercises/word-count/word-count_test.php +1 -1
- data/tracks/php/exercises/wordy/wordy_test.php +3 -3
- data/tracks/python/config.json +3 -13
- data/tracks/python/exercises/rectangles/rectangles_count_test.py +15 -22
- data/tracks/scala/config.json +684 -665
- data/tracks/scala/exercises/binary-search/build.sbt +3 -0
- data/tracks/scala/exercises/binary-search/example.scala +23 -0
- data/tracks/scala/exercises/binary-search/src/main/scala/BinarySearch.scala +0 -0
- data/tracks/scala/exercises/binary-search/src/test/scala/BinarySearchTest.scala +63 -0
- data/tracks/scala/exercises/strain/build.sbt +3 -0
- data/tracks/scala/exercises/strain/example.scala +22 -0
- data/tracks/scala/exercises/strain/src/main/scala/Strain.scala +0 -0
- data/tracks/scala/exercises/strain/src/test/scala/StrainTest.scala +78 -0
- data/tracks/scala/testgen/src/main/scala/AllYourBaseTestGenerator.scala +13 -20
- data/tracks/scala/testgen/src/main/scala/BinarySearchTestGenerator.scala +48 -0
- data/tracks/scala/testgen/src/main/scala/BowlingTestGenerator.scala +24 -32
- data/tracks/scala/testgen/src/main/scala/CustomSetTestGenerator.scala +148 -112
- data/tracks/scala/testgen/src/main/scala/TestBuilder.scala +86 -0
- metadata +30 -3
- data/tracks/java/exercises/allergies/src/example/java/Allergen.java +0 -1
- data/tracks/java/exercises/meetup/src/example/java/MeetupSchedule.java +0 -1
- data/tracks/java/exercises/perfect-numbers/src/example/java/Classification.java +0 -1
- data/tracks/java/exercises/robot-simulator/src/example/java/GridPosition.java +0 -1
- data/tracks/java/exercises/robot-simulator/src/example/java/Orientation.java +0 -1
- data/tracks/java/exercises/secret-handshake/src/example/java/Signal.java +0 -1
- data/tracks/java/exercises/sublist/src/example/java/Relationship.java +0 -1
- data/tracks/java/exercises/triangle/src/example/java/TriangleException.java +0 -1
- 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
|
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
|
}
|