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
@@ -49,8 +49,6 @@ specs = describe "dominoes" $
|
|
49
49
|
expectationFailure $
|
50
50
|
printf "In chain %s:\n\t right end of %s (%s)\n\tand left end of %s (%s)\n\tdidn't match!" (show l) name1 (show d1) name2 (show d2)
|
51
51
|
|
52
|
-
-- Test cases adapted from `exercism/x-common/dominoes` on 2016-11-11.
|
53
|
-
|
54
52
|
data Case = Case { description :: String
|
55
53
|
, input :: [(Int, Int)]
|
56
54
|
, expected :: Bool
|
@@ -12,8 +12,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
|
|
12
12
|
specs :: Spec
|
13
13
|
specs = describe "forth" $ do
|
14
14
|
|
15
|
-
-- Test cases adapted from `exercism/x-common/forth` on 2017-02-01.
|
16
|
-
|
17
15
|
let runTexts = fmap toList . foldM (flip evalText) empty
|
18
16
|
|
19
17
|
describe "parsing and numbers" $ do
|
@@ -22,9 +22,6 @@ specs :: Spec
|
|
22
22
|
specs = describe "gigasecond" $
|
23
23
|
describe "fromDay" $ do
|
24
24
|
|
25
|
-
-- Test cases loosely based on reference file
|
26
|
-
-- at `exercism/x-common/gigasecond.json`.
|
27
|
-
|
28
25
|
let dt = readTime defaultTimeLocale
|
29
26
|
(iso8601DateFormat (Just "%T%Z")) :: String -> UTCTime
|
30
27
|
|
@@ -13,9 +13,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
|
|
13
13
|
specs :: Spec
|
14
14
|
specs = describe "go-counting" $ do
|
15
15
|
|
16
|
-
-- As of 2016-07-27, there was no reference file
|
17
|
-
-- for the test cases in `exercism/x-common`.
|
18
|
-
|
19
16
|
let board5x5 = [ " B "
|
20
17
|
, " B B "
|
21
18
|
, "B W B"
|
@@ -11,9 +11,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
|
|
11
11
|
specs :: Spec
|
12
12
|
specs = describe "grade-school" $ 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
|
let fromList = foldr (uncurry add) empty
|
18
15
|
let fromGrade g = fromList . zip (repeat g)
|
19
16
|
|
@@ -24,8 +24,6 @@ specs = describe "grains" $ do
|
|
24
24
|
where
|
25
25
|
assertion = fromIntegral total `shouldBe` expected
|
26
26
|
|
27
|
-
-- Test cases adapted from `exercism/x-common/grains` on 2016-11-06.
|
28
|
-
|
29
27
|
squareCases :: [(String, Integer, Maybe Integer)]
|
30
28
|
squareCases =
|
31
29
|
[ ("square 1" , 1, Just 1)
|
@@ -20,8 +20,6 @@ specs = describe "hamming" $
|
|
20
20
|
assertion = expression `shouldBe` fromIntegral <$> expected
|
21
21
|
expression = distance strand1 strand2
|
22
22
|
|
23
|
-
-- Test cases adapted from `exercism/x-common/hamming.json` on 2016-07-12.
|
24
|
-
|
25
23
|
data Case = Case { description :: String
|
26
24
|
, strand1 :: String
|
27
25
|
, strand2 :: String
|
@@ -19,9 +19,6 @@ specs = describe "hexadecimal" $
|
|
19
19
|
description = show input
|
20
20
|
assertion = hexToInt input `shouldBe` expected
|
21
21
|
|
22
|
-
-- As of 2016-08-02, there was no reference file
|
23
|
-
-- for the test cases in `exercism/x-common`.
|
24
|
-
|
25
22
|
cases = [ ( "1", 1)
|
26
23
|
, ( "c", 12)
|
27
24
|
, ( "10", 16)
|
@@ -18,9 +18,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
|
|
18
18
|
specs :: Spec
|
19
19
|
specs = describe "kindergarten-garden" $ do
|
20
20
|
|
21
|
-
-- As of 2016-08-02, there was no reference file
|
22
|
-
-- for the test cases in `exercism/x-common`.
|
23
|
-
|
24
21
|
it "alice tests" $ do
|
25
22
|
|
26
23
|
let alicePlants = lookupPlants "Alice" . defaultGarden
|
@@ -11,9 +11,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
|
|
11
11
|
specs :: Spec
|
12
12
|
specs = describe "largest-series-product" $
|
13
13
|
|
14
|
-
-- Test cases adapted from `exercism/x-common/largest-series-product.json`
|
15
|
-
-- on 2016-07-27.
|
16
|
-
|
17
14
|
describe "largestProduct" $ do
|
18
15
|
|
19
16
|
it "can find the largest product of 2 with numbers in order" $
|
@@ -20,8 +20,6 @@ specs = describe "leap" $
|
|
20
20
|
explanation = unwords [show input, "-", description]
|
21
21
|
assertion = isLeapYear (fromIntegral input) `shouldBe` expected
|
22
22
|
|
23
|
-
-- Test cases adapted from `exercism/x-common/leap.json` on 2016-07-27.
|
24
|
-
|
25
23
|
data Case = Case { description :: String
|
26
24
|
, input :: Integer
|
27
25
|
, expected :: Bool
|
@@ -20,9 +20,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
|
|
20
20
|
specs :: Spec
|
21
21
|
specs = describe "lens-person" $ do
|
22
22
|
|
23
|
-
-- As of 2016-09-25, there was no reference file
|
24
|
-
-- for the test cases in `exercism/x-common`.
|
25
|
-
|
26
23
|
it "bornStreet" $
|
27
24
|
(bornStreet . _born) testPerson
|
28
25
|
`shouldBe` "Longway"
|
@@ -10,9 +10,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
|
|
10
10
|
specs :: Spec
|
11
11
|
specs = describe "linked-list" $ do
|
12
12
|
|
13
|
-
-- As of 2016-08-10, there was no reference file
|
14
|
-
-- for the test cases in `exercism/x-common`.
|
15
|
-
|
16
13
|
it "push pop" $ do
|
17
14
|
deque <- mkDeque
|
18
15
|
push deque 'a'
|
@@ -33,9 +33,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
|
|
33
33
|
specs :: Spec
|
34
34
|
specs = describe "list-ops" $ do
|
35
35
|
|
36
|
-
-- As of 2016-07-27, there was no reference file
|
37
|
-
-- for the test cases in `exercism/x-common`.
|
38
|
-
|
39
36
|
let big = 100000 :: Int
|
40
37
|
|
41
38
|
it "length of empty list" $
|
@@ -12,9 +12,6 @@ specs :: Spec
|
|
12
12
|
specs = describe "luhn" $ do
|
13
13
|
describe "standard tests" $ do
|
14
14
|
|
15
|
-
-- Test cases adapted from `exercism/x-common/luhn.json` on
|
16
|
-
-- 2016-08-04. Some deviations exist and are noted in comments.
|
17
|
-
|
18
15
|
it "check digit" $
|
19
16
|
checkDigit 34567 `shouldBe` 7
|
20
17
|
|
@@ -24,9 +24,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
|
|
24
24
|
specs :: Spec
|
25
25
|
specs = describe "matrix" $ do
|
26
26
|
|
27
|
-
-- As of 2016-08-08, there was no reference file
|
28
|
-
-- for the test cases in `exercism/x-common`.
|
29
|
-
|
30
27
|
let intMatrix = fromString :: String -> Matrix Int
|
31
28
|
let vector = Vector.fromList
|
32
29
|
|
@@ -21,8 +21,6 @@ specs = describe "meetup" $
|
|
21
21
|
returnedDay = meetupDay week dayofweek year month
|
22
22
|
expectedDay = fromGregorian year month dayofmonth
|
23
23
|
|
24
|
-
-- Test cases adapted from `exercism/x-common/meetup.json` on 2016-07-26.
|
25
|
-
|
26
24
|
data Case = Case { description :: String
|
27
25
|
, year :: Integer
|
28
26
|
, month :: Int
|
@@ -19,8 +19,6 @@ specs = describe "nth-prime" $
|
|
19
19
|
where
|
20
20
|
assertion = nth (fromIntegral input) `shouldBe` expected
|
21
21
|
|
22
|
-
-- Test cases adapted from `exercism/x-common` on 2016-09-19.
|
23
|
-
|
24
22
|
data Case = Case { description :: String
|
25
23
|
, input :: Integer
|
26
24
|
, expected :: Maybe Integer
|
@@ -13,8 +13,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
|
|
13
13
|
specs :: Spec
|
14
14
|
specs = describe "nucleotide-count" $ do
|
15
15
|
|
16
|
-
-- Test cases adapted from `exercism/x-common/triangle.json` on 2017-01-31.
|
17
|
-
|
18
16
|
let x `matchesMap` y = x `shouldBe` (Right . fromList) y
|
19
17
|
|
20
18
|
describe "nucleotideCounts" $ do
|
@@ -18,9 +18,6 @@ specs = describe "ocr-numbers" $
|
|
18
18
|
where
|
19
19
|
assertion = convert (unlines input) `shouldBe` expected
|
20
20
|
|
21
|
-
-- Test cases adapted from `exercism/x-common/ocr-numbers.json`
|
22
|
-
-- on 2016-08-09. Some deviations exist and are noted in comments.
|
23
|
-
|
24
21
|
data Case = Case { description :: String
|
25
22
|
, expected :: String
|
26
23
|
, input :: [String]
|
@@ -12,9 +12,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
|
|
12
12
|
specs :: Spec
|
13
13
|
specs = describe "octal" $ do
|
14
14
|
|
15
|
-
-- As of 2016-08-10, there was no reference file
|
16
|
-
-- for the test cases in `exercism/x-common`.
|
17
|
-
|
18
15
|
it "can show Int octal" $
|
19
16
|
property $ \(Positive n) -> Num.showOct n "" == showOct (n :: Int)
|
20
17
|
|
@@ -26,9 +26,6 @@ specs = describe "palindrome-products" $ for_ cases test
|
|
26
26
|
it "value" $ value `shouldBe` lPal
|
27
27
|
it "factors" $ normalize factors `shouldBe` lPalFactors
|
28
28
|
|
29
|
-
-- As of 2016-09-07, there was no reference file
|
30
|
-
-- for the test cases in `exercism/x-common`.
|
31
|
-
|
32
29
|
cases = [ ("palindromes from single digit factors", 1, 9, 1, [( 1, 1)], 9, [(1, 9), (3, 3)])
|
33
30
|
, ("palindromes from double digit factors", 10, 99, 121, [( 11, 11)], 9009, [( 91, 99)])
|
34
31
|
, ("palindromes from triple digit factors", 100, 999, 10201, [( 101, 101)], 906609, [( 913, 993)])
|
@@ -15,11 +15,6 @@ specs = describe "pangram" $
|
|
15
15
|
where
|
16
16
|
test Case{..} = it description $ isPangram input `shouldBe` expected
|
17
17
|
|
18
|
-
-- Adapted from
|
19
|
-
-- Source: exercism/x-common/exercises/pangram/canonical-data.json
|
20
|
-
-- Version: 1.0.0
|
21
|
-
-- Date: 2017-03-28.
|
22
|
-
|
23
18
|
data Case = Case { description :: String
|
24
19
|
, input :: String
|
25
20
|
, expected :: Bool
|
@@ -14,9 +14,6 @@ main = hspecWith defaultConfig {configFastFail = True} specs
|
|
14
14
|
specs :: Spec
|
15
15
|
specs = describe "parallel-letter-frequency" $ do
|
16
16
|
|
17
|
-
-- As of 2016-09-16, there was no reference file
|
18
|
-
-- for the test cases in `exercism/x-common`.
|
19
|
-
|
20
17
|
let odeAnDieFreude = concat -- Poem by Friedrich Schiller.
|
21
18
|
[ "Freude schöner Götterfunken" -- The corresponding music is
|
22
19
|
, "Tochter aus Elysium," -- the European Anthem.
|
@@ -18,8 +18,6 @@ specs = describe "pascals-triangle" $
|
|
18
18
|
where
|
19
19
|
assertion = rows n `shouldBe` expected
|
20
20
|
|
21
|
-
-- Test cases adapted from `exercism/x-common` on 2016-09-14.
|
22
|
-
|
23
21
|
rowsCases = [ ("no rows" , 0, [ ])
|
24
22
|
, ("single row" , 1, [[1] ])
|
25
23
|
, ("two rows" , 2, [[1], [1, 1] ])
|
@@ -15,8 +15,6 @@ specs = describe "phone-number" $
|
|
15
15
|
where
|
16
16
|
test Case{..} = it description $ number input `shouldBe` expected
|
17
17
|
|
18
|
-
-- Test cases adapted from `exercism/x-common/phone-number` on 2017-01-31.
|
19
|
-
|
20
18
|
data Case = Case { description :: String
|
21
19
|
, input :: String
|
22
20
|
, expected :: Maybe String
|
@@ -10,8 +10,6 @@ specs :: Spec
|
|
10
10
|
specs = describe "pig-latin" $
|
11
11
|
describe "translate" $ do
|
12
12
|
|
13
|
-
-- Test cases adapted from `exercism/x-common/pig-latin.json` on 2016-11-06.
|
14
|
-
|
15
13
|
describe "ay is added to words that start with vowels" $ do
|
16
14
|
it "word beginning with a" $ translate "apple" `shouldBe` "appleay"
|
17
15
|
it "word beginning with e" $ translate "ear" `shouldBe` "earay"
|
@@ -18,8 +18,6 @@ specs = describe "prime-factors" $
|
|
18
18
|
where
|
19
19
|
assertion = primeFactors n `shouldBe` expected
|
20
20
|
|
21
|
-
-- Test cases adapted from `exercism/x-common/prime-factors` on 2017-02-01.
|
22
|
-
|
23
21
|
cases = [ ("no factors", 1, [] )
|
24
22
|
, ("prime number", 2, [2] )
|
25
23
|
, ("square of a prime", 9, [3, 3] )
|
@@ -27,9 +27,6 @@ specs = describe "pythagorean-triplet" $ do
|
|
27
27
|
|
28
28
|
uncurry3 f (x, y, z) = f x y z
|
29
29
|
|
30
|
-
-- As of 2016-09-12, there was no reference file
|
31
|
-
-- for the test cases in `exercism/x-common`.
|
32
|
-
|
33
30
|
isPythagoreanCases = [ ( (3, 4, 5), True )
|
34
31
|
, ( (3, 5, 4), True )
|
35
32
|
, ( (4, 3, 5), True )
|
@@ -56,8 +56,6 @@ specs = describe "queen-attack" $ do
|
|
56
56
|
, "_ _ _ _ _ _ B _"
|
57
57
|
, "_ _ _ _ _ _ _ _" ]
|
58
58
|
|
59
|
-
-- Test cases adapted from `exercism/x-common/queen-attack.json` on
|
60
|
-
-- 2016-08-02.
|
61
59
|
-- The function described by the reference file as `create` doesn't
|
62
60
|
-- exist in this track, so only the `canAttack` test cases where
|
63
61
|
-- implemented here
|