trackler 2.1.0.9 → 2.1.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/common/exercises/perfect-numbers/description.md +2 -2
- data/common/exercises/phone-number/canonical-data.json +1 -7
- data/common/exercises/tournament/canonical-data.json +96 -21
- data/common/exercises/tournament/description.md +0 -5
- data/lib/trackler/version.rb +1 -1
- data/tracks/coq/README.md +6 -8
- data/tracks/coq/exercises/hello-world/example.v +3 -0
- data/tracks/coq/exercises/hello-world/hello-world.v +3 -0
- data/tracks/coq/exercises/rna-transcription/DNA.v +4 -0
- data/tracks/coq/exercises/rna-transcription/example.v +15 -0
- data/tracks/coq/exercises/rna-transcription/rna-transcription.v +5 -0
- data/tracks/coq/exercises/tautology/description.md +1 -0
- data/tracks/coq/exercises/tautology/example.v +4 -0
- data/tracks/coq/exercises/tautology/tautology.v +4 -0
- data/tracks/haskell/exercises/accumulate/package.yaml +1 -0
- data/tracks/haskell/exercises/accumulate/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/acronym/package.yaml +1 -0
- data/tracks/haskell/exercises/acronym/test/Tests.hs +0 -5
- data/tracks/haskell/exercises/all-your-base/package.yaml +1 -0
- data/tracks/haskell/exercises/all-your-base/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/allergies/package.yaml +1 -0
- data/tracks/haskell/exercises/allergies/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/alphametics/package.yaml +1 -0
- data/tracks/haskell/exercises/alphametics/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/anagram/package.yaml +1 -0
- data/tracks/haskell/exercises/anagram/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/atbash-cipher/package.yaml +1 -0
- data/tracks/haskell/exercises/atbash-cipher/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/bank-account/package.yaml +1 -0
- data/tracks/haskell/exercises/bank-account/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/beer-song/package.yaml +1 -0
- data/tracks/haskell/exercises/binary/package.yaml +1 -0
- data/tracks/haskell/exercises/binary/test/Tests.hs +0 -1
- data/tracks/haskell/exercises/binary-search-tree/package.yaml +1 -0
- data/tracks/haskell/exercises/binary-search-tree/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/bob/package.yaml +1 -0
- data/tracks/haskell/exercises/bob/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/bowling/package.yaml +1 -0
- data/tracks/haskell/exercises/bowling/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/bracket-push/package.yaml +1 -0
- data/tracks/haskell/exercises/bracket-push/test/Tests.hs +1 -6
- data/tracks/haskell/exercises/change/package.yaml +1 -0
- data/tracks/haskell/exercises/change/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/clock/package.yaml +1 -0
- data/tracks/haskell/exercises/clock/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/connect/package.yaml +1 -0
- data/tracks/haskell/exercises/connect/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/crypto-square/package.yaml +1 -0
- data/tracks/haskell/exercises/crypto-square/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/custom-set/package.yaml +1 -0
- data/tracks/haskell/exercises/custom-set/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/difference-of-squares/package.yaml +1 -0
- data/tracks/haskell/exercises/difference-of-squares/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/dominoes/package.yaml +1 -0
- data/tracks/haskell/exercises/dominoes/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/etl/package.yaml +1 -0
- data/tracks/haskell/exercises/etl/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/food-chain/package.yaml +1 -0
- data/tracks/haskell/exercises/forth/package.yaml +1 -0
- data/tracks/haskell/exercises/forth/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/gigasecond/package.yaml +1 -0
- data/tracks/haskell/exercises/gigasecond/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/go-counting/package.yaml +1 -0
- data/tracks/haskell/exercises/go-counting/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/grade-school/package.yaml +1 -0
- data/tracks/haskell/exercises/grade-school/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/grains/package.yaml +1 -0
- data/tracks/haskell/exercises/grains/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/hamming/package.yaml +1 -0
- data/tracks/haskell/exercises/hamming/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/hello-world/package.yaml +1 -0
- data/tracks/haskell/exercises/hexadecimal/package.yaml +1 -0
- data/tracks/haskell/exercises/hexadecimal/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/house/package.yaml +1 -0
- data/tracks/haskell/exercises/kindergarten-garden/package.yaml +1 -0
- data/tracks/haskell/exercises/kindergarten-garden/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/largest-series-product/package.yaml +1 -0
- data/tracks/haskell/exercises/largest-series-product/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/leap/package.yaml +1 -0
- data/tracks/haskell/exercises/leap/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/lens-person/package.yaml +1 -0
- data/tracks/haskell/exercises/lens-person/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/linked-list/package.yaml +1 -0
- data/tracks/haskell/exercises/linked-list/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/list-ops/package.yaml +1 -0
- data/tracks/haskell/exercises/list-ops/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/luhn/package.yaml +1 -0
- data/tracks/haskell/exercises/luhn/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/matrix/package.yaml +1 -0
- data/tracks/haskell/exercises/matrix/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/meetup/package.yaml +1 -0
- data/tracks/haskell/exercises/meetup/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/minesweeper/package.yaml +1 -0
- data/tracks/haskell/exercises/minesweeper/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/nth-prime/package.yaml +1 -0
- data/tracks/haskell/exercises/nth-prime/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/nucleotide-count/package.yaml +1 -0
- data/tracks/haskell/exercises/nucleotide-count/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/ocr-numbers/package.yaml +1 -0
- data/tracks/haskell/exercises/ocr-numbers/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/octal/package.yaml +1 -0
- data/tracks/haskell/exercises/octal/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/palindrome-products/package.yaml +1 -0
- data/tracks/haskell/exercises/palindrome-products/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/pangram/package.yaml +1 -0
- data/tracks/haskell/exercises/pangram/test/Tests.hs +0 -5
- data/tracks/haskell/exercises/parallel-letter-frequency/package.yaml +1 -0
- data/tracks/haskell/exercises/parallel-letter-frequency/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/pascals-triangle/package.yaml +1 -0
- data/tracks/haskell/exercises/pascals-triangle/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/phone-number/package.yaml +1 -0
- data/tracks/haskell/exercises/phone-number/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/pig-latin/package.yaml +1 -0
- data/tracks/haskell/exercises/pig-latin/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/pov/package.yaml +1 -0
- data/tracks/haskell/exercises/pov/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/prime-factors/package.yaml +1 -0
- data/tracks/haskell/exercises/prime-factors/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/pythagorean-triplet/package.yaml +1 -0
- data/tracks/haskell/exercises/pythagorean-triplet/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/queen-attack/package.yaml +1 -0
- data/tracks/haskell/exercises/queen-attack/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/raindrops/package.yaml +1 -0
- data/tracks/haskell/exercises/raindrops/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/rna-transcription/package.yaml +1 -0
- data/tracks/haskell/exercises/rna-transcription/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/robot-name/package.yaml +1 -0
- data/tracks/haskell/exercises/robot-name/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/robot-simulator/package.yaml +1 -0
- data/tracks/haskell/exercises/robot-simulator/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/roman-numerals/package.yaml +1 -0
- data/tracks/haskell/exercises/roman-numerals/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/run-length-encoding/package.yaml +1 -0
- data/tracks/haskell/exercises/run-length-encoding/test/Tests.hs +0 -4
- data/tracks/haskell/exercises/saddle-points/package.yaml +1 -0
- data/tracks/haskell/exercises/saddle-points/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/say/package.yaml +1 -0
- data/tracks/haskell/exercises/say/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/scrabble-score/package.yaml +1 -0
- data/tracks/haskell/exercises/scrabble-score/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/secret-handshake/package.yaml +1 -0
- data/tracks/haskell/exercises/secret-handshake/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/series/package.yaml +1 -0
- data/tracks/haskell/exercises/series/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/sgf-parsing/package.yaml +1 -0
- data/tracks/haskell/exercises/sgf-parsing/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/sieve/package.yaml +1 -0
- data/tracks/haskell/exercises/sieve/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/simple-cipher/package.yaml +1 -0
- data/tracks/haskell/exercises/simple-cipher/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/simple-linked-list/package.yaml +1 -0
- data/tracks/haskell/exercises/simple-linked-list/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/space-age/package.yaml +1 -0
- data/tracks/haskell/exercises/space-age/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/strain/package.yaml +1 -0
- data/tracks/haskell/exercises/strain/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/sublist/package.yaml +1 -0
- data/tracks/haskell/exercises/sublist/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/sum-of-multiples/package.yaml +1 -0
- data/tracks/haskell/exercises/sum-of-multiples/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/triangle/package.yaml +1 -0
- data/tracks/haskell/exercises/triangle/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/trinary/package.yaml +1 -0
- data/tracks/haskell/exercises/trinary/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/word-count/package.yaml +1 -0
- data/tracks/haskell/exercises/word-count/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/wordy/package.yaml +1 -0
- data/tracks/haskell/exercises/wordy/test/Tests.hs +0 -2
- data/tracks/haskell/exercises/zebra-puzzle/package.yaml +1 -0
- data/tracks/haskell/exercises/zipper/package.yaml +1 -0
- data/tracks/haskell/exercises/zipper/test/Tests.hs +0 -3
- data/tracks/java/exercises/book-store/src/test/java/BookstoreTest.java +12 -12
- data/tracks/java/exercises/ocr-numbers/src/test/java/OpticalCharacterReaderTest.java +16 -16
- data/tracks/java/exercises/strain/src/test/java/StrainTest.java +11 -11
- data/tracks/perl6/README.md +12 -0
- data/tracks/perl6/bin/README.md +3 -0
- data/tracks/perl6/config.json +20 -20
- data/tracks/perl6/exercises/accumulate/{Example.pm → Example.pm6} +0 -0
- data/tracks/perl6/exercises/all-your-base/{Example.pm → Example.pm6} +0 -0
- data/tracks/perl6/exercises/allergies/{Example.pm → Example.pm6} +0 -0
- data/tracks/perl6/exercises/anagram/{Example.pm → Example.pm6} +0 -0
- data/tracks/perl6/exercises/atbash-cipher/{Example.pm → Example.pm6} +0 -0
- data/tracks/perl6/exercises/binary/{Example.pm → Example.pm6} +0 -0
- data/tracks/perl6/exercises/bob/{Example.pm → Example.pm6} +0 -0
- data/tracks/perl6/exercises/bob/bob.t +181 -180
- data/tracks/perl6/exercises/bob/example.yaml +1 -0
- data/tracks/perl6/exercises/grade-school/{Example.pm → Example.pm6} +0 -0
- data/tracks/perl6/exercises/grade-school/grade-school.t +9 -18
- data/tracks/perl6/exercises/grains/{Example.pm → Example.pm6} +0 -0
- data/tracks/perl6/exercises/hello-world/{Example.pm → Example.pm6} +0 -0
- data/tracks/perl6/exercises/hello-world/example.yaml +1 -0
- data/tracks/perl6/exercises/hello-world/hello-world.t +38 -43
- data/tracks/perl6/exercises/leap/{Example.pm → Example.pm6} +0 -0
- data/tracks/perl6/exercises/leap/leap.t +40 -42
- data/tracks/perl6/exercises/phone-number/{Example.pm → Example.pm6} +2 -2
- data/tracks/perl6/exercises/phone-number/PhoneNumber.pm6 +1 -1
- data/tracks/perl6/exercises/phone-number/example.yaml +2 -2
- data/tracks/perl6/exercises/phone-number/phone-number.t +3 -9
- data/tracks/perl6/exercises/raindrops/{Example.pm → Example.pm6} +0 -0
- data/tracks/perl6/exercises/rna-transcription/{Example.pm → Example.pm6} +0 -0
- data/tracks/perl6/exercises/robot-name/{Example.pm → Example.pm6} +0 -0
- data/tracks/perl6/exercises/scrabble-score/{Example.pm → Example.pm6} +0 -0
- data/tracks/perl6/exercises/space-age/{Example.pm → Example.pm6} +0 -0
- data/tracks/perl6/exercises/trinary/{Example.pm → Example.pm6} +0 -0
- data/tracks/perl6/exercises/word-count/{Example.pm → Example.pm6} +0 -0
- data/tracks/perl6/exercises/wordy/{Example.pm → Example.pm6} +0 -0
- data/tracks/python/.github/stale.yml +4 -4
- data/tracks/python/config.json +24 -0
- data/tracks/python/exercises/alphametics/alphametics.py +2 -0
- data/tracks/python/exercises/alphametics/alphametics_test.py +71 -0
- data/tracks/python/exercises/alphametics/example.py +29 -0
- data/tracks/python/exercises/book-store/book_store.py +2 -0
- data/tracks/python/exercises/book-store/book_store_test.py +72 -0
- data/tracks/python/exercises/book-store/example.py +29 -0
- data/tracks/python/exercises/meetup/meetup_test.py +341 -1
- data/tracks/python/exercises/tournament/example.py +45 -0
- data/tracks/python/exercises/tournament/tournament.py +2 -0
- data/tracks/python/exercises/tournament/tournament_test.py +70 -0
- data/tracks/python/exercises/variable-length-quantity/example.py +34 -0
- data/tracks/python/exercises/variable-length-quantity/variable_length_quantity.py +6 -0
- data/tracks/python/exercises/variable-length-quantity/variable_length_quantity_test.py +100 -0
- data/tracks/r/config.json +23 -23
- data/tracks/r/exercises/perfect-numbers/test_perfect-numbers.R +1 -1
- data/tracks/r/exercises/prime-factors/test_prime-factors.R +2 -0
- data/tracks/r/exercises/tournament/example.R +2 -5
- data/tracks/scala/exercises/leap/example.scala +4 -4
- data/tracks/scala/exercises/leap/src/main/scala/Leap.scala +3 -0
- data/tracks/scala/exercises/leap/src/test/scala/LeapTest.scala +6 -6
- metadata +43 -22
@@ -15,8 +15,6 @@ specs = describe "rna-transcription" $
|
|
15
15
|
where
|
16
16
|
test Case{..} = it description $ toRNA dna `shouldBe` expected
|
17
17
|
|
18
|
-
-- Test cases adapted from `exercism/x-common/rna-transcription.json` on 2016-07-24.
|
19
|
-
|
20
18
|
data Case = Case { description :: String
|
21
19
|
, dna :: String
|
22
20
|
, expected :: Maybe String
|
@@ -18,9 +18,6 @@ would likely not be in the business of resetting the name.
|
|
18
18
|
specs :: Spec
|
19
19
|
specs = describe "robot-name" $ do
|
20
20
|
|
21
|
-
-- As of 2016-07-30, there was no reference file
|
22
|
-
-- for the test cases in `exercism/x-common`.
|
23
|
-
|
24
21
|
let a = ('A', 'Z')
|
25
22
|
let d = ('0', '9')
|
26
23
|
let matchesPattern s = length s == 5
|
@@ -23,9 +23,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
|
|
23
23
|
specs :: Spec
|
24
24
|
specs = describe "robot-simulator" $ do
|
25
25
|
|
26
|
-
-- Test cases adapted from `exercism/x-common/robot-simulator.json`
|
27
|
-
-- on 2016-08-02. Some deviations exist and are noted in comments.
|
28
|
-
|
29
26
|
describe "mkRobot" $ do
|
30
27
|
|
31
28
|
-- The function described by the reference file
|
@@ -20,8 +20,6 @@ specs = describe "roman-numerals" $
|
|
20
20
|
explanation = show number
|
21
21
|
assertion = numerals (fromIntegral number) `shouldBe` expected
|
22
22
|
|
23
|
-
-- Test cases adapted from `exercism/x-common/roman-numerals.json` on 2016-07-26.
|
24
|
-
|
25
23
|
data Case = Case { number :: Integer
|
26
24
|
, expected :: Maybe String
|
27
25
|
}
|
@@ -17,10 +17,6 @@ specs = describe "run-length-encoding" $ do
|
|
17
17
|
where
|
18
18
|
test f Case{..} = it description $ f input `shouldBe` expected
|
19
19
|
|
20
|
-
-- Test cases adapted from file
|
21
|
-
-- `exercism/x-common/exercises/run-length-encoding/canonical-data.json`
|
22
|
-
-- on 2016-12-26.
|
23
|
-
|
24
20
|
data Case = Case { description :: String
|
25
21
|
, input :: String
|
26
22
|
, expected :: String
|
@@ -22,9 +22,6 @@ specs = describe "saddle-points" $
|
|
22
22
|
columns = length $ head xss
|
23
23
|
matrix = listArray ((0, 0), (rows - 1, columns - 1)) (concat xss)
|
24
24
|
|
25
|
-
-- As of 2016-09-12, there was no reference file
|
26
|
-
-- for the test cases in `exercism/x-common`.
|
27
|
-
|
28
25
|
cases = [ ("Example from README", [ [9, 8, 7]
|
29
26
|
, [5, 3, 2]
|
30
27
|
, [6, 6, 7] ], [(1, 0)] )
|
@@ -23,8 +23,6 @@ specs = describe "scrabble-score" $ do
|
|
23
23
|
where
|
24
24
|
assertion = scoreWord input `shouldBe` fromIntegral expected
|
25
25
|
|
26
|
-
-- Test cases adapted from `exercism/x-common/scrabble-score.json` on 2017-02-01.
|
27
|
-
|
28
26
|
data Case = Case { description :: String
|
29
27
|
, input :: String
|
30
28
|
, expected :: Integer
|
@@ -9,8 +9,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
|
|
9
9
|
specs :: Spec
|
10
10
|
specs = describe "secret-handshake" $ do
|
11
11
|
|
12
|
-
-- Test cases adapted from `exercism/x-common/secret-handshake` on 2017-01-31.
|
13
|
-
|
14
12
|
it "wink for 1" $
|
15
13
|
handshake (1 :: Int) `shouldBe` ["wink"]
|
16
14
|
|
@@ -14,9 +14,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
|
|
14
14
|
specs :: Spec
|
15
15
|
specs = describe "series" $ do
|
16
16
|
|
17
|
-
-- As of 2016-11-08, there was no reference file
|
18
|
-
-- for the test cases in `exercism/x-common`.
|
19
|
-
|
20
17
|
let x `shouldHaveSlices` yss = (map toList . toList) x `shouldBe` yss
|
21
18
|
|
22
19
|
it "slices of one" $ do
|
@@ -21,9 +21,6 @@ specs = describe "sgf-parsing" $
|
|
21
21
|
description = unwords ["parse", show input]
|
22
22
|
assertion = parseSgf input `shouldBe` fmap fromList <$> expected
|
23
23
|
|
24
|
-
-- As of 2016-09-18, there was no reference file
|
25
|
-
-- for the test cases in `exercism/x-common`.
|
26
|
-
|
27
24
|
cases = [ ("" , Nothing )
|
28
25
|
, ("()" , Nothing )
|
29
26
|
, (";" , Nothing )
|
@@ -9,9 +9,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
|
|
9
9
|
specs :: Spec
|
10
10
|
specs = describe "simple-cipher" $ do
|
11
11
|
|
12
|
-
-- As of 2016-09-16, there was no reference file
|
13
|
-
-- for the test cases in `exercism/x-common`.
|
14
|
-
|
15
12
|
it "no-op encode" $ do
|
16
13
|
caesarEncode "a" ['a'..'z'] `shouldBe` ['a'..'z']
|
17
14
|
caesarEncode (repeat 'a') ['a'..'z'] `shouldBe` ['a'..'z']
|
@@ -31,9 +31,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
|
|
31
31
|
specs :: Spec
|
32
32
|
specs = describe "simple-linked-list" $ do
|
33
33
|
|
34
|
-
-- As of 2016-07-27, there was no reference file
|
35
|
-
-- for the test cases in `exercism/x-common`.
|
36
|
-
|
37
34
|
let n1 = new (1 :: Int) nil
|
38
35
|
let n21 = new 2 n1
|
39
36
|
let n321 = new 3 n21
|
@@ -28,8 +28,6 @@ specs = describe "space-age" $
|
|
28
28
|
shouldBeAround = shouldBe `on` roundTo 2
|
29
29
|
roundTo n = (/ 10 ^ n) . fromIntegral . round . (* 10 ^ n)
|
30
30
|
|
31
|
-
-- Test cases adapted from `exercism/x-common/space-age.json` on 2016-07-27.
|
32
|
-
|
33
31
|
data Case = Case { description :: String
|
34
32
|
, planet :: Planet
|
35
33
|
, seconds :: Integer
|
@@ -11,9 +11,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
|
|
11
11
|
specs :: Spec
|
12
12
|
specs = describe "strain" $ do
|
13
13
|
|
14
|
-
-- As of 2016-07-27, there was no reference file
|
15
|
-
-- for the test cases in `exercism/x-common`.
|
16
|
-
|
17
14
|
it "empty keep" $
|
18
15
|
keep (<10) [] `shouldBe` ([] :: [Int])
|
19
16
|
|
@@ -21,8 +21,6 @@ specs = describe "sum-of-multiples" $
|
|
21
21
|
expression = sumOfMultiples (fromIntegral <$> factors)
|
22
22
|
(fromIntegral limit )
|
23
23
|
|
24
|
-
-- Test cases adapted from `exercism/x-common/sum-of-multiples.json` on 2016-07-27.
|
25
|
-
|
26
24
|
data Case = Case { factors :: [Integer]
|
27
25
|
, limit :: Integer
|
28
26
|
, expected :: Integer
|
@@ -25,9 +25,6 @@ specs = describe "triangle" $
|
|
25
25
|
where
|
26
26
|
assertion = triangleType a b c `shouldBe` expected
|
27
27
|
|
28
|
-
-- Test cases created from old version of `x-common` tests on 2017-01-31,
|
29
|
-
-- diverging from `exercism/x-common/triangle`.
|
30
|
-
|
31
28
|
cases = [ ( "equilateral triangle has all sides equal"
|
32
29
|
, (2, 2, 2)
|
33
30
|
, Equilateral
|
@@ -13,9 +13,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
|
|
13
13
|
specs :: Spec
|
14
14
|
specs = describe "trinary" $ do
|
15
15
|
|
16
|
-
-- As of 2016-08-10, there was no reference file
|
17
|
-
-- for the test cases in `exercism/x-common`.
|
18
|
-
|
19
16
|
let refShowTri n = Num.showIntAtBase 3 intToDigit n ""
|
20
17
|
|
21
18
|
it "can show Int trinary" $
|
@@ -19,8 +19,6 @@ specs = describe "wordy" $
|
|
19
19
|
where
|
20
20
|
assertion = answer input `shouldBe` fromIntegral <$> expected
|
21
21
|
|
22
|
-
-- Test cases adapted from `exercism/x-common/wordy.json` on 2016-08-10.
|
23
|
-
|
24
22
|
data Case = Case { description :: String
|
25
23
|
, input :: String
|
26
24
|
, expected :: Maybe Integer
|
@@ -21,9 +21,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
|
|
21
21
|
specs :: Spec
|
22
22
|
specs = describe "zipper" $ do
|
23
23
|
|
24
|
-
-- As of 2016-09-27, there was no reference file
|
25
|
-
-- for the test cases in `exercism/x-common`.
|
26
|
-
|
27
24
|
let leaf v = node v Nothing Nothing
|
28
25
|
node v l r = Just (BT v l r :: BinTree Int)
|
29
26
|
t1 = BT 1 (node 2 Nothing $ leaf 3) $ leaf 4
|
@@ -20,7 +20,7 @@ public class BookstoreTest {
|
|
20
20
|
assertEquals(8, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
|
21
21
|
}
|
22
22
|
|
23
|
-
@Ignore
|
23
|
+
@Ignore("Remove to run test")
|
24
24
|
@Test
|
25
25
|
public void twoOfSameBook() {
|
26
26
|
List<Integer> books = new ArrayList<>(Arrays.asList(1, 1));
|
@@ -28,7 +28,7 @@ public class BookstoreTest {
|
|
28
28
|
assertEquals(16, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
|
29
29
|
}
|
30
30
|
|
31
|
-
@Ignore
|
31
|
+
@Ignore("Remove to run test")
|
32
32
|
@Test
|
33
33
|
public void emptyBasket() {
|
34
34
|
List<Integer> books = new ArrayList<>();
|
@@ -36,7 +36,7 @@ public class BookstoreTest {
|
|
36
36
|
assertEquals(0, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
|
37
37
|
}
|
38
38
|
|
39
|
-
@Ignore
|
39
|
+
@Ignore("Remove to run test")
|
40
40
|
@Test
|
41
41
|
public void twoDifferentBooks() {
|
42
42
|
List<Integer> books = new ArrayList<>(Arrays.asList(1, 2));
|
@@ -44,7 +44,7 @@ public class BookstoreTest {
|
|
44
44
|
assertEquals(15.20, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
|
45
45
|
}
|
46
46
|
|
47
|
-
@Ignore
|
47
|
+
@Ignore("Remove to run test")
|
48
48
|
@Test
|
49
49
|
public void threeDifferentBooks() {
|
50
50
|
List<Integer> books = new ArrayList<>(Arrays.asList(1, 2, 3));
|
@@ -52,7 +52,7 @@ public class BookstoreTest {
|
|
52
52
|
assertEquals(21.6, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
|
53
53
|
}
|
54
54
|
|
55
|
-
@Ignore
|
55
|
+
@Ignore("Remove to run test")
|
56
56
|
@Test
|
57
57
|
public void fourDifferentBooks() {
|
58
58
|
List<Integer> books = new ArrayList<>(Arrays.asList(1, 2, 3, 4));
|
@@ -60,7 +60,7 @@ public class BookstoreTest {
|
|
60
60
|
assertEquals(25.6, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
|
61
61
|
}
|
62
62
|
|
63
|
-
@Ignore
|
63
|
+
@Ignore("Remove to run test")
|
64
64
|
@Test
|
65
65
|
public void fiveDifferentBooks() {
|
66
66
|
List<Integer> books = new ArrayList<>(Arrays.asList(1, 2, 3, 4, 5));
|
@@ -68,7 +68,7 @@ public class BookstoreTest {
|
|
68
68
|
assertEquals(30, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
|
69
69
|
}
|
70
70
|
|
71
|
-
@Ignore
|
71
|
+
@Ignore("Remove to run test")
|
72
72
|
@Test
|
73
73
|
public void twoGroupsOfFourIsCheaperThanGroupOfFivePlusGroupOfThree() {
|
74
74
|
List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 3, 4, 5));
|
@@ -76,7 +76,7 @@ public class BookstoreTest {
|
|
76
76
|
assertEquals(51.20, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
|
77
77
|
}
|
78
78
|
|
79
|
-
@Ignore
|
79
|
+
@Ignore("Remove to run test")
|
80
80
|
@Test
|
81
81
|
public void groupOfFourPlusGroupOfTwoIsCheaperThanTwoGroupsOfThree() {
|
82
82
|
List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 4));
|
@@ -84,7 +84,7 @@ public class BookstoreTest {
|
|
84
84
|
assertEquals(40.8, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
|
85
85
|
}
|
86
86
|
|
87
|
-
@Ignore
|
87
|
+
@Ignore("Remove to run test")
|
88
88
|
@Test
|
89
89
|
public void twoEachOfFirst4BooksAnd1CopyEachOfRest() {
|
90
90
|
List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 3, 4, 4, 5));
|
@@ -92,7 +92,7 @@ public class BookstoreTest {
|
|
92
92
|
assertEquals(55.60, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
|
93
93
|
}
|
94
94
|
|
95
|
-
@Ignore
|
95
|
+
@Ignore("Remove to run test")
|
96
96
|
@Test
|
97
97
|
public void twoCopiesOfEachBook() {
|
98
98
|
List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 3, 4, 4, 5, 5));
|
@@ -100,7 +100,7 @@ public class BookstoreTest {
|
|
100
100
|
assertEquals(60.00, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
|
101
101
|
}
|
102
102
|
|
103
|
-
@Ignore
|
103
|
+
@Ignore("Remove to run test")
|
104
104
|
@Test
|
105
105
|
public void threeCopiesOfFirstBookAnd2EachOfRemaining() {
|
106
106
|
List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 1));
|
@@ -108,7 +108,7 @@ public class BookstoreTest {
|
|
108
108
|
assertEquals(68.00, bookstore.calculateTotalCost(), EQUALITY_TOLERANCE);
|
109
109
|
}
|
110
110
|
|
111
|
-
@Ignore
|
111
|
+
@Ignore("Remove to run test")
|
112
112
|
@Test
|
113
113
|
public void threeEachOFirst2BooksAnd2EachOfRemainingBooks() {
|
114
114
|
List<Integer> books = new ArrayList<>(Arrays.asList(1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 1, 2));
|
@@ -28,7 +28,7 @@ public final class OpticalCharacterReaderTest {
|
|
28
28
|
assertEquals("0", parsedInput);
|
29
29
|
}
|
30
30
|
|
31
|
-
@Ignore
|
31
|
+
@Ignore("Remove to run test")
|
32
32
|
@Test
|
33
33
|
public void testReaderRecognizesSingle1() {
|
34
34
|
String parsedInput = new OpticalCharacterReader().parse(Arrays.asList(
|
@@ -41,7 +41,7 @@ public final class OpticalCharacterReaderTest {
|
|
41
41
|
assertEquals("1", parsedInput);
|
42
42
|
}
|
43
43
|
|
44
|
-
@Ignore
|
44
|
+
@Ignore("Remove to run test")
|
45
45
|
@Test
|
46
46
|
public void testReaderReturnsQuestionMarkForUnreadableButCorrectlySizedInput() {
|
47
47
|
String parsedInput = new OpticalCharacterReader().parse(Arrays.asList(
|
@@ -54,7 +54,7 @@ public final class OpticalCharacterReaderTest {
|
|
54
54
|
assertEquals("?", parsedInput);
|
55
55
|
}
|
56
56
|
|
57
|
-
@Ignore
|
57
|
+
@Ignore("Remove to run test")
|
58
58
|
@Test
|
59
59
|
public void testReaderThrowsExceptionWhenNumberOfInputLinesIsNotAMultipleOf4() {
|
60
60
|
expectedException.expect(IllegalArgumentException.class);
|
@@ -67,7 +67,7 @@ public final class OpticalCharacterReaderTest {
|
|
67
67
|
));
|
68
68
|
}
|
69
69
|
|
70
|
-
@Ignore
|
70
|
+
@Ignore("Remove to run test")
|
71
71
|
@Test
|
72
72
|
public void testReaderThrowsExceptionWhenNumberOfInputColumnsIsNotAMultipleOf3() {
|
73
73
|
expectedException.expect(IllegalArgumentException.class);
|
@@ -81,7 +81,7 @@ public final class OpticalCharacterReaderTest {
|
|
81
81
|
));
|
82
82
|
}
|
83
83
|
|
84
|
-
@Ignore
|
84
|
+
@Ignore("Remove to run test")
|
85
85
|
@Test
|
86
86
|
public void testReaderRecognizesBinarySequence110101100() {
|
87
87
|
String parsedInput = new OpticalCharacterReader().parse(Arrays.asList(
|
@@ -94,7 +94,7 @@ public final class OpticalCharacterReaderTest {
|
|
94
94
|
assertEquals("110101100", parsedInput);
|
95
95
|
}
|
96
96
|
|
97
|
-
@Ignore
|
97
|
+
@Ignore("Remove to run test")
|
98
98
|
@Test
|
99
99
|
public void testReaderReplacesUnreadableDigitsWithQuestionMarksWithinSequence() {
|
100
100
|
String parsedInput = new OpticalCharacterReader().parse(Arrays.asList(
|
@@ -107,7 +107,7 @@ public final class OpticalCharacterReaderTest {
|
|
107
107
|
assertEquals("11?10?1?0", parsedInput);
|
108
108
|
}
|
109
109
|
|
110
|
-
@Ignore
|
110
|
+
@Ignore("Remove to run test")
|
111
111
|
@Test
|
112
112
|
public void testReaderRecognizesSingle2() {
|
113
113
|
String parsedInput = new OpticalCharacterReader().parse(Arrays.asList(
|
@@ -120,7 +120,7 @@ public final class OpticalCharacterReaderTest {
|
|
120
120
|
assertEquals("2", parsedInput);
|
121
121
|
}
|
122
122
|
|
123
|
-
@Ignore
|
123
|
+
@Ignore("Remove to run test")
|
124
124
|
@Test
|
125
125
|
public void testReaderRecognizesSingle3() {
|
126
126
|
String parsedInput = new OpticalCharacterReader().parse(Arrays.asList(
|
@@ -133,7 +133,7 @@ public final class OpticalCharacterReaderTest {
|
|
133
133
|
assertEquals("3", parsedInput);
|
134
134
|
}
|
135
135
|
|
136
|
-
@Ignore
|
136
|
+
@Ignore("Remove to run test")
|
137
137
|
@Test
|
138
138
|
public void testReaderRecognizesSingle4() {
|
139
139
|
String parsedInput = new OpticalCharacterReader().parse(Arrays.asList(
|
@@ -146,7 +146,7 @@ public final class OpticalCharacterReaderTest {
|
|
146
146
|
assertEquals("4", parsedInput);
|
147
147
|
}
|
148
148
|
|
149
|
-
@Ignore
|
149
|
+
@Ignore("Remove to run test")
|
150
150
|
@Test
|
151
151
|
public void testReaderRecognizesSingle5() {
|
152
152
|
String parsedInput = new OpticalCharacterReader().parse(Arrays.asList(
|
@@ -159,7 +159,7 @@ public final class OpticalCharacterReaderTest {
|
|
159
159
|
assertEquals("5", parsedInput);
|
160
160
|
}
|
161
161
|
|
162
|
-
@Ignore
|
162
|
+
@Ignore("Remove to run test")
|
163
163
|
@Test
|
164
164
|
public void testReaderRecognizesSingle6() {
|
165
165
|
String parsedInput = new OpticalCharacterReader().parse(Arrays.asList(
|
@@ -172,7 +172,7 @@ public final class OpticalCharacterReaderTest {
|
|
172
172
|
assertEquals("6", parsedInput);
|
173
173
|
}
|
174
174
|
|
175
|
-
@Ignore
|
175
|
+
@Ignore("Remove to run test")
|
176
176
|
@Test
|
177
177
|
public void testReaderRecognizesSingle7() {
|
178
178
|
String parsedInput = new OpticalCharacterReader().parse(Arrays.asList(
|
@@ -185,7 +185,7 @@ public final class OpticalCharacterReaderTest {
|
|
185
185
|
assertEquals("7", parsedInput);
|
186
186
|
}
|
187
187
|
|
188
|
-
@Ignore
|
188
|
+
@Ignore("Remove to run test")
|
189
189
|
@Test
|
190
190
|
public void testReaderRecognizesSingle8() {
|
191
191
|
String parsedInput = new OpticalCharacterReader().parse(Arrays.asList(
|
@@ -198,7 +198,7 @@ public final class OpticalCharacterReaderTest {
|
|
198
198
|
assertEquals("8", parsedInput);
|
199
199
|
}
|
200
200
|
|
201
|
-
@Ignore
|
201
|
+
@Ignore("Remove to run test")
|
202
202
|
@Test
|
203
203
|
public void testReaderRecognizesSingle9() {
|
204
204
|
String parsedInput = new OpticalCharacterReader().parse(Arrays.asList(
|
@@ -211,7 +211,7 @@ public final class OpticalCharacterReaderTest {
|
|
211
211
|
assertEquals("9", parsedInput);
|
212
212
|
}
|
213
213
|
|
214
|
-
@Ignore
|
214
|
+
@Ignore("Remove to run test")
|
215
215
|
@Test
|
216
216
|
public void testReaderRecognizesSequence1234567890() {
|
217
217
|
String parsedInput = new OpticalCharacterReader().parse(Arrays.asList(
|
@@ -224,7 +224,7 @@ public final class OpticalCharacterReaderTest {
|
|
224
224
|
assertEquals("1234567890", parsedInput);
|
225
225
|
}
|
226
226
|
|
227
|
-
@Ignore
|
227
|
+
@Ignore("Remove to run test")
|
228
228
|
@Test
|
229
229
|
public void testReaderRecognizesAndCorrectlyFormatsMultiRowInput() {
|
230
230
|
String parsedInput = new OpticalCharacterReader().parse(Arrays.asList(
|