trackler 2.0.6.28 → 2.0.6.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/common/exercises/all-your-base/metadata.yml +1 -1
- data/common/exercises/allergies/metadata.yml +1 -1
- data/common/exercises/anagram/metadata.yml +1 -1
- data/common/exercises/beer-song/metadata.yml +1 -1
- data/common/exercises/binary-search-tree/metadata.yml +1 -1
- data/common/exercises/binary-search/metadata.yml +1 -1
- data/common/exercises/binary/metadata.yml +1 -1
- data/common/exercises/change/description.md +3 -3
- data/common/exercises/change/metadata.yml +1 -1
- data/common/exercises/crypto-square/description.md +1 -2
- data/common/exercises/etl/description.md +2 -2
- data/common/exercises/flatten-array/metadata.yml +1 -1
- data/common/exercises/food-chain/description.md +4 -5
- data/common/exercises/food-chain/metadata.yml +1 -1
- data/common/exercises/gigasecond/metadata.yml +1 -1
- data/common/exercises/grade-school/metadata.yml +1 -1
- data/common/exercises/grains/description.md +1 -1
- data/common/exercises/grains/metadata.yml +1 -1
- data/common/exercises/hamming/metadata.yml +1 -1
- data/common/exercises/hello-world/metadata.yml +1 -1
- data/common/exercises/hexadecimal/metadata.yml +1 -1
- data/common/exercises/house/metadata.yml +1 -1
- data/common/exercises/kindergarten-garden/metadata.yml +1 -1
- data/common/exercises/largest-series-product/metadata.yml +1 -1
- data/common/exercises/leap/metadata.yml +1 -1
- data/common/exercises/luhn/description.md +1 -1
- data/common/exercises/luhn/metadata.yml +1 -1
- data/common/exercises/matrix/metadata.yml +1 -1
- data/common/exercises/minesweeper/metadata.yml +1 -1
- data/common/exercises/nth-prime/metadata.yml +1 -1
- data/common/exercises/ocr-numbers/metadata.yml +1 -1
- data/common/exercises/octal/metadata.yml +1 -1
- data/common/exercises/paasio/metadata.yml +1 -1
- data/common/exercises/palindrome-products/description.md +30 -2
- data/common/exercises/palindrome-products/metadata.yml +1 -1
- data/common/exercises/parallel-letter-frequency/metadata.yml +1 -1
- data/common/exercises/pascals-triangle/metadata.yml +1 -1
- data/common/exercises/phone-number/metadata.yml +1 -1
- data/common/exercises/point-mutations/metadata.yml +1 -1
- data/common/exercises/protein-translation/description.md +1 -1
- data/common/exercises/protein-translation/metadata.yml +1 -1
- data/common/exercises/proverb/metadata.yml +1 -1
- data/common/exercises/queen-attack/metadata.yml +1 -1
- data/common/exercises/raindrops/metadata.yml +1 -1
- data/common/exercises/rna-transcription/metadata.yml +1 -1
- data/common/exercises/robot-name/metadata.yml +1 -1
- data/common/exercises/saddle-points/metadata.yml +1 -1
- data/common/exercises/say/metadata.yml +1 -1
- data/common/exercises/scale-generator/description.md +3 -4
- data/common/exercises/scale-generator/metadata.yml +1 -1
- data/common/exercises/scrabble-score/metadata.yml +1 -1
- data/common/exercises/secret-handshake/metadata.yml +1 -1
- data/common/exercises/series/metadata.yml +1 -1
- data/common/exercises/sieve/metadata.yml +1 -1
- data/common/exercises/space-age/metadata.yml +1 -1
- data/common/exercises/sum-of-multiples/description.md +2 -2
- data/common/exercises/sum-of-multiples/metadata.yml +1 -1
- data/common/exercises/transpose/description.md +1 -1
- data/common/exercises/transpose/metadata.yml +1 -1
- data/common/exercises/triangle/metadata.yml +1 -1
- data/common/exercises/trinary/metadata.yml +1 -1
- data/common/exercises/twelve-days/metadata.yml +1 -1
- data/common/exercises/two-bucket/description.md +1 -1
- data/common/exercises/two-bucket/metadata.yml +1 -1
- data/common/exercises/word-count/metadata.yml +1 -1
- data/common/exercises/zebra-puzzle/metadata.yml +1 -1
- data/lib/trackler/version.rb +1 -1
- data/tracks/erlang/.gitignore +2 -0
- data/tracks/erlang/.travis.yml +8 -4
- data/tracks/erlang/Makefile +16 -0
- data/tracks/erlang/README.md +77 -1
- data/tracks/erlang/_test/bootstrap.sh +17 -4
- data/tracks/erlang/_test/check-exercises.escript +64 -24
- data/tracks/erlang/config.json +63 -63
- data/tracks/erlang/docs/INSTALLATION.md +18 -0
- data/tracks/erlang/docs/TESTS.md +1 -3
- data/tracks/erlang/exercises/accumulate/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/accumulate/rebar.conf +30 -0
- data/tracks/erlang/exercises/accumulate/src/accumulate.app.src +9 -0
- data/tracks/erlang/exercises/accumulate/{example.erl → src/example.erl} +3 -2
- data/tracks/erlang/exercises/accumulate/test/accumulate_tests.erl +27 -0
- data/tracks/erlang/exercises/allergies/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/allergies/rebar.conf +30 -0
- data/tracks/erlang/exercises/allergies/src/allergies.app.src +9 -0
- data/tracks/erlang/exercises/allergies/{example.erl → src/example.erl} +9 -10
- data/tracks/erlang/exercises/allergies/{allergies_tests.erl → test/allergies_tests.erl} +17 -20
- data/tracks/erlang/exercises/anagram/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/anagram/rebar.conf +32 -0
- data/tracks/erlang/exercises/anagram/src/anagram.app.src +9 -0
- data/tracks/erlang/exercises/anagram/{example.erl → src/example.erl} +2 -1
- data/tracks/erlang/exercises/anagram/test/anagram_tests.erl +43 -0
- data/tracks/erlang/exercises/atbash-cipher/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/atbash-cipher/rebar.conf +30 -0
- data/tracks/erlang/exercises/atbash-cipher/src/atbash_cipher.app.src +9 -0
- data/tracks/erlang/exercises/atbash-cipher/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/atbash-cipher/{atbash_cipher_tests.erl → test/atbash_cipher_tests.erl} +6 -2
- data/tracks/erlang/exercises/bank-account/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/bank-account/rebar.conf +30 -0
- data/tracks/erlang/exercises/bank-account/src/bank_account.app.src +9 -0
- data/tracks/erlang/exercises/bank-account/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/bank-account/test/bank_account_tests.erl +98 -0
- data/tracks/erlang/exercises/beer-song/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/beer-song/rebar.conf +30 -0
- data/tracks/erlang/exercises/beer-song/src/beer_song.app.src +9 -0
- data/tracks/erlang/exercises/beer-song/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/beer-song/{beer_song_tests.erl → test/beer_song_tests.erl} +9 -9
- data/tracks/erlang/exercises/binary/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/binary/rebar.conf +30 -0
- data/tracks/erlang/exercises/binary/src/binary.app.src +9 -0
- data/tracks/erlang/exercises/binary/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/binary/{binary_string_tests.erl → test/binary_string_tests.erl} +7 -3
- data/tracks/erlang/exercises/bob/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/bob/rebar.conf +30 -0
- data/tracks/erlang/exercises/bob/src/bob.app.src +9 -0
- data/tracks/erlang/exercises/bob/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/bob/{bob_tests.erl → test/bob_tests.erl} +4 -4
- data/tracks/erlang/exercises/circular-buffer/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/circular-buffer/rebar.conf +30 -0
- data/tracks/erlang/exercises/circular-buffer/src/circular_buffer.app.src +9 -0
- data/tracks/erlang/exercises/circular-buffer/{example.erl → src/example.erl} +1 -34
- data/tracks/erlang/exercises/circular-buffer/test/circular_buffer_tests.erl +58 -0
- data/tracks/erlang/exercises/clock/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/clock/rebar.conf +30 -0
- data/tracks/erlang/exercises/clock/src/clock.app.src +9 -0
- data/tracks/erlang/exercises/clock/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/clock/{clock_tests.erl → test/clock_tests.erl} +51 -48
- data/tracks/erlang/exercises/difference-of-squares/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/difference-of-squares/rebar.conf +30 -0
- data/tracks/erlang/exercises/difference-of-squares/src/difference_of_squares.app.src +9 -0
- data/tracks/erlang/exercises/difference-of-squares/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/difference-of-squares/{difference_of_squares_tests.erl → test/difference_of_squares_tests.erl} +7 -3
- data/tracks/erlang/exercises/etl/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/etl/rebar.conf +30 -0
- data/tracks/erlang/exercises/etl/src/etl.app.src +9 -0
- data/tracks/erlang/exercises/etl/{example.erl → src/example.erl} +1 -2
- data/tracks/erlang/exercises/etl/{etl_tests.erl → test/etl_tests.erl} +3 -4
- data/tracks/erlang/exercises/gigasecond/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/gigasecond/rebar.conf +30 -0
- data/tracks/erlang/exercises/gigasecond/{example.erl → src/example.erl} +1 -2
- data/tracks/erlang/exercises/gigasecond/src/gigasecond.app.src +9 -0
- data/tracks/erlang/exercises/gigasecond/test/gigasecond_tests.erl +22 -0
- data/tracks/erlang/exercises/grade-school/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/grade-school/rebar.conf +30 -0
- data/tracks/erlang/exercises/grade-school/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/grade-school/src/grade_school.app.src +9 -0
- data/tracks/erlang/exercises/grade-school/test/grade_school_tests.erl +47 -0
- data/tracks/erlang/exercises/grains/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/grains/rebar.conf +30 -0
- data/tracks/erlang/exercises/grains/{example.erl → src/example.erl} +1 -2
- data/tracks/erlang/exercises/grains/src/grains.app.src +9 -0
- data/tracks/erlang/exercises/grains/test/grains_tests.erl +32 -0
- data/tracks/erlang/exercises/hamming/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/hamming/rebar.conf +30 -0
- data/tracks/erlang/exercises/hamming/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/hamming/src/hamming.app.src +9 -0
- data/tracks/erlang/exercises/hamming/test/hamming_tests.erl +24 -0
- data/tracks/erlang/exercises/hello-world/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/hello-world/rebar.conf +30 -0
- data/tracks/erlang/exercises/hello-world/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/hello-world/src/hello_world.app.src +9 -0
- data/tracks/erlang/exercises/hello-world/test/hello_world_tests.erl +18 -0
- data/tracks/erlang/exercises/largest-series-product/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/largest-series-product/rebar.conf +30 -0
- data/tracks/erlang/exercises/largest-series-product/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/largest-series-product/src/largest_series_product.app.src +9 -0
- data/tracks/erlang/exercises/largest-series-product/test/largest_series_product_tests.erl +57 -0
- data/tracks/erlang/exercises/leap/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/leap/rebar.conf +30 -0
- data/tracks/erlang/exercises/leap/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/leap/src/leap.app.src +9 -0
- data/tracks/erlang/exercises/leap/test/leap_tests.erl +18 -0
- data/tracks/erlang/exercises/luhn/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/luhn/rebar.conf +30 -0
- data/tracks/erlang/exercises/luhn/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/luhn/src/luhn.app.src +9 -0
- data/tracks/erlang/exercises/luhn/test/luhn_tests.erl +18 -0
- data/tracks/erlang/exercises/meetup/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/meetup/rebar.conf +30 -0
- data/tracks/erlang/exercises/meetup/{example.erl → src/example.erl} +1 -2
- data/tracks/erlang/exercises/meetup/src/meetup.app.src +9 -0
- data/tracks/erlang/exercises/meetup/{meetup_tests.erl → test/meetup_tests.erl} +94 -95
- data/tracks/erlang/exercises/nucleotide-count/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/nucleotide-count/rebar.conf +30 -0
- data/tracks/erlang/exercises/nucleotide-count/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/nucleotide-count/src/nucleotide_count.app.src +9 -0
- data/tracks/erlang/exercises/nucleotide-count/test/dna_tests.erl +30 -0
- data/tracks/erlang/exercises/parallel-letter-frequency/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/parallel-letter-frequency/rebar.conf +30 -0
- data/tracks/erlang/exercises/parallel-letter-frequency/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/parallel-letter-frequency/src/parallel_letter_frequency.app.src +9 -0
- data/tracks/erlang/exercises/parallel-letter-frequency/{parallel_letter_frequency_tests.erl → test/parallel_letter_frequency_tests.erl} +6 -2
- data/tracks/erlang/exercises/phone-number/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/phone-number/rebar.conf +30 -0
- data/tracks/erlang/exercises/phone-number/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/phone-number/src/phone_number.app.src +9 -0
- data/tracks/erlang/exercises/phone-number/test/phone_tests.erl +28 -0
- data/tracks/erlang/exercises/rna-transcription/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/rna-transcription/rebar.conf +30 -0
- data/tracks/erlang/exercises/rna-transcription/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/rna-transcription/src/rna_transcription.app.src +9 -0
- data/tracks/erlang/exercises/rna-transcription/test/rna_transcription_tests.erl +24 -0
- data/tracks/erlang/exercises/robot-simulator/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/robot-simulator/rebar.conf +30 -0
- data/tracks/erlang/exercises/robot-simulator/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/robot-simulator/src/robot_simulator.app.src +9 -0
- data/tracks/erlang/exercises/robot-simulator/test/robot_simulator_tests.erl +100 -0
- data/tracks/erlang/exercises/roman-numerals/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/roman-numerals/rebar.conf +30 -0
- data/tracks/erlang/exercises/roman-numerals/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/roman-numerals/src/roman_numerals.app.src +9 -0
- data/tracks/erlang/exercises/roman-numerals/{roman_numerals_tests.erl → test/roman_numerals_tests.erl} +3 -4
- data/tracks/erlang/exercises/scrabble-score/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/scrabble-score/rebar.conf +30 -0
- data/tracks/erlang/exercises/scrabble-score/{example.erl → src/example.erl} +2 -2
- data/tracks/erlang/exercises/scrabble-score/src/scrabble_score.app.src +9 -0
- data/tracks/erlang/exercises/scrabble-score/{scrabble_score_tests.erl → test/scrabble_score_tests.erl} +5 -1
- data/tracks/erlang/exercises/series/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/series/rebar.conf +30 -0
- data/tracks/erlang/exercises/series/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/series/src/series.app.src +9 -0
- data/tracks/erlang/exercises/series/test/series_tests.erl +10 -0
- data/tracks/erlang/exercises/space-age/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/space-age/rebar.conf +30 -0
- data/tracks/erlang/exercises/space-age/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/space-age/src/space_age.app.src +9 -0
- data/tracks/erlang/exercises/space-age/test/space_age_tests.erl +51 -0
- data/tracks/erlang/exercises/strain/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/strain/rebar.conf +30 -0
- data/tracks/erlang/exercises/strain/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/strain/src/strain.app.src +9 -0
- data/tracks/erlang/exercises/strain/test/strain_tests.erl +52 -0
- data/tracks/erlang/exercises/sum-of-multiples/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/sum-of-multiples/rebar.conf +30 -0
- data/tracks/erlang/exercises/sum-of-multiples/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/sum-of-multiples/src/sum_of_multiples.app.src +9 -0
- data/tracks/erlang/exercises/sum-of-multiples/test/sum_of_multiples_tests.erl +39 -0
- data/tracks/erlang/exercises/triangle/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/triangle/rebar.conf +30 -0
- data/tracks/erlang/exercises/triangle/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/triangle/src/triangle.app.src +9 -0
- data/tracks/erlang/exercises/triangle/{triangle_tests.erl → test/triangle_tests.erl} +19 -18
- data/tracks/erlang/exercises/trinary/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/trinary/rebar.conf +30 -0
- data/tracks/erlang/exercises/trinary/{example.erl → src/example.erl} +1 -2
- data/tracks/erlang/exercises/trinary/src/trinary.app.src +9 -0
- data/tracks/erlang/exercises/trinary/test/trinary_tests.erl +36 -0
- data/tracks/erlang/exercises/word-count/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/word-count/rebar.conf +30 -0
- data/tracks/erlang/exercises/word-count/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/word-count/src/word_count.app.src +9 -0
- data/tracks/erlang/exercises/word-count/{word_count_tests.erl → test/word_count_tests.erl} +4 -2
- data/tracks/erlang/exercises/zipper/include/exercism.hrl +6 -0
- data/tracks/erlang/exercises/zipper/rebar.conf +30 -0
- data/tracks/erlang/exercises/zipper/{example.erl → src/example.erl} +1 -1
- data/tracks/erlang/exercises/zipper/src/zipper.app.src +9 -0
- data/tracks/erlang/exercises/zipper/test/zipper_tests.erl +100 -0
- data/tracks/go/config.json +14 -4
- data/tracks/go/exercises/acronym/acronym_test.go +1 -1
- data/tracks/go/exercises/all-your-base/all_your_base_test.go +8 -8
- data/tracks/go/exercises/luhn/luhn_test.go +6 -6
- data/tracks/go/exercises/word-search/word_search_test.go +4 -1
- data/tracks/go/exercises/wordy/example.go +2 -0
- data/tracks/go/exercises/wordy/wordy_test.go +8 -0
- data/tracks/haskell/.travis.yml +3 -57
- data/tracks/haskell/README.md +13 -10
- data/tracks/haskell/bin/test-all-examples +20 -0
- data/tracks/haskell/bin/test-example +73 -0
- data/tracks/haskell/bin/test-stub +43 -0
- data/tracks/haskell/config.json +0 -1
- data/tracks/haskell/exercises/accumulate/examples/fail-reverse/package.yaml +16 -0
- data/tracks/haskell/exercises/accumulate/examples/fail-reverse/src/Accumulate.hs +7 -0
- data/tracks/haskell/exercises/accumulate/examples/success-standard/src/Accumulate.hs +0 -7
- data/tracks/haskell/exercises/atbash-cipher/test/Tests.hs +1 -5
- data/tracks/haskell/exercises/forth/test/Tests.hs +1 -4
- data/tracks/haskell/exercises/leap/examples/error-nosig/package.yaml +16 -0
- data/tracks/haskell/exercises/leap/examples/error-nosig/src/LeapYear.hs +4 -0
- data/tracks/haskell/exercises/nucleotide-count/examples/success-standard/src/DNA.hs +2 -5
- data/tracks/haskell/exercises/nucleotide-count/src/DNA.hs +1 -4
- data/tracks/haskell/exercises/nucleotide-count/test/Tests.hs +3 -22
- data/tracks/haskell/exercises/prime-factors/test/Tests.hs +9 -15
- data/tracks/haskell/exercises/scrabble-score/test/Tests.hs +1 -5
- data/tracks/haskell/exercises/secret-handshake/examples/success-standard/src/SecretHandshake.hs +3 -21
- data/tracks/haskell/exercises/secret-handshake/src/SecretHandshake.hs +1 -0
- data/tracks/haskell/exercises/secret-handshake/test/Tests.hs +20 -23
- data/tracks/haskell/exercises/strain/examples/fail-reverse/package.yaml +16 -0
- data/tracks/haskell/exercises/strain/examples/fail-reverse/src/Strain.hs +9 -0
- data/tracks/haskell/exercises/triangle/test/Tests.hs +6 -1
- data/tracks/julia/config.json +20 -2
- data/tracks/julia/exercises/raindrops/example.jl +16 -0
- data/tracks/julia/exercises/raindrops/raindrops.jl +3 -0
- data/tracks/julia/exercises/raindrops/runtests.jl +72 -0
- data/tracks/julia/exercises/secret-handshake/example.jl +12 -0
- data/tracks/julia/exercises/secret-handshake/runtests.jl +51 -0
- data/tracks/julia/exercises/secret-handshake/secret-handshake.jl +3 -0
- metadata +198 -79
- data/tracks/erlang/exercises/accumulate/accumulate_tests.erl +0 -28
- data/tracks/erlang/exercises/anagram/anagram_tests.erl +0 -39
- data/tracks/erlang/exercises/bank-account/bank_account_tests.erl +0 -95
- data/tracks/erlang/exercises/circular-buffer/circular_buffer_tests.erl +0 -54
- data/tracks/erlang/exercises/clock/clock.erl +0 -14
- data/tracks/erlang/exercises/gigasecond/gigasecond_tests.erl +0 -29
- data/tracks/erlang/exercises/grade-school/grade_school_tests.erl +0 -49
- data/tracks/erlang/exercises/grains/grains_tests.erl +0 -31
- data/tracks/erlang/exercises/hamming/dna_tests.erl +0 -21
- data/tracks/erlang/exercises/hello-world/hello_world_tests.erl +0 -19
- data/tracks/erlang/exercises/largest-series-product/largest_series_product.erl +0 -5
- data/tracks/erlang/exercises/largest-series-product/largest_series_product_tests.erl +0 -54
- data/tracks/erlang/exercises/leap/leap_tests.erl +0 -20
- data/tracks/erlang/exercises/luhn/luhn_tests.erl +0 -19
- data/tracks/erlang/exercises/nucleotide-count/dna_tests.erl +0 -27
- data/tracks/erlang/exercises/phone-number/phone_tests.erl +0 -29
- data/tracks/erlang/exercises/rna-transcription/rna_transcription_tests.erl +0 -24
- data/tracks/erlang/exercises/robot-simulator/robot_simulator_tests.erl +0 -96
- data/tracks/erlang/exercises/roman-numerals/roman_numerals.erl +0 -6
- data/tracks/erlang/exercises/series/series_tests.erl +0 -6
- data/tracks/erlang/exercises/space-age/space_age_tests.erl +0 -48
- data/tracks/erlang/exercises/strain/strain_tests.erl +0 -49
- data/tracks/erlang/exercises/sum-of-multiples/sum_of_multiples_tests.erl +0 -37
- data/tracks/erlang/exercises/trinary/trinary_tests.erl +0 -37
- data/tracks/erlang/exercises/zipper/zipper_tests.erl +0 -103
- data/tracks/haskell/exercises/secret-handshake/.meta/DONT-TEST-STUB +0 -1
- data/tracks/haskell/exercises/secret-handshake/HINTS.md +0 -6
@@ -1,28 +0,0 @@
|
|
1
|
-
% To run tests:
|
2
|
-
% erl -make
|
3
|
-
% erl -noshell -eval "eunit:test(accumulate, [verbose])" -s init stop
|
4
|
-
|
5
|
-
-module(accumulate_tests).
|
6
|
-
-include_lib("eunit/include/eunit.hrl").
|
7
|
-
|
8
|
-
accumulate_squares_test() ->
|
9
|
-
Fn = fun(Number) -> Number * Number end,
|
10
|
-
Ls = [1, 2, 3],
|
11
|
-
?assertEqual([1, 4, 9], accumulate:accumulate(Fn, Ls)).
|
12
|
-
|
13
|
-
accumulate_upcases_test() ->
|
14
|
-
Fn = fun(Word) -> string:to_upper(Word) end,
|
15
|
-
Ls = string:tokens("hello world", " "),
|
16
|
-
?assertEqual(["HELLO", "WORLD"], accumulate:accumulate(Fn, Ls)).
|
17
|
-
|
18
|
-
accumulate_reversed_strings_test() ->
|
19
|
-
Fn = fun(Word) -> lists:reverse(Word) end,
|
20
|
-
Ls = string:tokens("the quick brown fox etc", " "),
|
21
|
-
?assertEqual(["eht", "kciuq", "nworb", "xof", "cte"], accumulate:accumulate(Fn, Ls)).
|
22
|
-
|
23
|
-
accumulate_recursively_test() ->
|
24
|
-
Chars = string:tokens("a b c", " "),
|
25
|
-
Nums = string:tokens("1 2 3", " "),
|
26
|
-
Fn = fun(Char) -> [Char ++ Num || Num <- Nums] end,
|
27
|
-
?assertEqual([["a1", "a2", "a3"], ["b1", "b2", "b3"], ["c1", "c2", "c3"]], accumulate:accumulate(Fn, Chars)).
|
28
|
-
|
@@ -1,39 +0,0 @@
|
|
1
|
-
-module(anagram_tests).
|
2
|
-
-include_lib("eunit/include/eunit.hrl").
|
3
|
-
|
4
|
-
no_matches_test() ->
|
5
|
-
?assertEqual(
|
6
|
-
[], anagram:find("diaper", ["hello", "world", "zombies", "pants"])).
|
7
|
-
|
8
|
-
detect_simple_anagram_test() ->
|
9
|
-
?assertEqual(
|
10
|
-
["tan"], anagram:find("ant", ["tan", "stand", "at"])).
|
11
|
-
|
12
|
-
does_not_confuse_different_duplicates_test() ->
|
13
|
-
?assertEqual(
|
14
|
-
[], anagram:find("galea", ["eagle"])).
|
15
|
-
|
16
|
-
eliminate_anagram_subsets_test() ->
|
17
|
-
?assertEqual(
|
18
|
-
[], anagram:find("good", ["dog", "goody"])).
|
19
|
-
|
20
|
-
detect_anagram_test() ->
|
21
|
-
?assertEqual(
|
22
|
-
["inlets"], anagram:find("listen", ["enlists", "google", "inlets", "banana"])).
|
23
|
-
|
24
|
-
multiple_anagrams_test() ->
|
25
|
-
?assertEqual(
|
26
|
-
["gallery", "regally", "largely"],
|
27
|
-
anagram:find("allergy", ["gallery", "ballerina", "regally", "clergy", "largely", "leading"])).
|
28
|
-
|
29
|
-
case_insensitive_subject_test() ->
|
30
|
-
?assertEqual(
|
31
|
-
["carthorse"], anagram:find("Orchestra", ["cashregister", "carthorse", "radishes"])).
|
32
|
-
|
33
|
-
case_insensitive_candidate_test() ->
|
34
|
-
?assertEqual(
|
35
|
-
["Carthorse"], anagram:find("orchestra", ["cashregister", "Carthorse", "radishes"])).
|
36
|
-
|
37
|
-
does_not_detect_a_word_as_its_own_anagram_test() ->
|
38
|
-
?assertEqual(
|
39
|
-
["cron"], anagram:find("corn", ["corn", "dark", "Corn", "rank", "CORN", "cron", "park"])).
|
@@ -1,95 +0,0 @@
|
|
1
|
-
-module(bank_account_tests).
|
2
|
-
-include_lib("eunit/include/eunit.hrl").
|
3
|
-
|
4
|
-
|
5
|
-
create_test() ->
|
6
|
-
Bank_account = bank_account:create(),
|
7
|
-
?assert(bank_account:balance( Bank_account ) =:= 0).
|
8
|
-
|
9
|
-
close_account_test() ->
|
10
|
-
Bank_account = bank_account:create(),
|
11
|
-
bank_account:deposit( Bank_account, 1 ),
|
12
|
-
Amount = bank_account:close( Bank_account ),
|
13
|
-
?assert(Amount =:= 1),
|
14
|
-
?assertEqual({error, account_closed}, bank_account:balance( Bank_account )).
|
15
|
-
|
16
|
-
deposit_test() ->
|
17
|
-
Bank_account = bank_account:create(),
|
18
|
-
bank_account:deposit( Bank_account, 1 ),
|
19
|
-
?assert(bank_account:balance( Bank_account ) =:= 1).
|
20
|
-
|
21
|
-
deposit_fail_test() ->
|
22
|
-
Bank_account = bank_account:create(),
|
23
|
-
bank_account:deposit( Bank_account, -1 ),
|
24
|
-
?assert(bank_account:balance( Bank_account ) =:= 0).
|
25
|
-
|
26
|
-
deposit_many_test() ->
|
27
|
-
Bank_account = bank_account:create(),
|
28
|
-
[erlang:spawn( fun () -> bank_account:deposit(Bank_account, X) end ) || X <- lists:seq(1, 10)],
|
29
|
-
First = bank_account:balance( Bank_account ),
|
30
|
-
timer:sleep( 100 ),
|
31
|
-
Last = bank_account:balance( Bank_account ),
|
32
|
-
?assert(First < 55),
|
33
|
-
?assert(Last =:= 55).
|
34
|
-
|
35
|
-
withdraw_test() ->
|
36
|
-
Bank_account = bank_account:create(),
|
37
|
-
bank_account:deposit( Bank_account, 10 ),
|
38
|
-
Amount = bank_account:withdraw( Bank_account, 1 ),
|
39
|
-
?assert(Amount =:= 1),
|
40
|
-
?assert(bank_account:balance( Bank_account ) =:= 9).
|
41
|
-
|
42
|
-
withdraw_fail_test() ->
|
43
|
-
Bank_account = bank_account:create(),
|
44
|
-
bank_account:deposit( Bank_account, 10 ),
|
45
|
-
Amount = bank_account:withdraw( Bank_account, -1 ),
|
46
|
-
?assert(Amount =:= 0),
|
47
|
-
?assert(bank_account:balance( Bank_account ) =:= 10).
|
48
|
-
|
49
|
-
withdraw_excessive_test() ->
|
50
|
-
Bank_account = bank_account:create(),
|
51
|
-
bank_account:deposit( Bank_account, 10 ),
|
52
|
-
Amount = bank_account:withdraw( Bank_account, 20 ),
|
53
|
-
?assert(Amount =:= 10),
|
54
|
-
?assert(bank_account:balance( Bank_account ) =:= 0).
|
55
|
-
|
56
|
-
withdraw_many_test() ->
|
57
|
-
Bank_account = bank_account:create(),
|
58
|
-
bank_account:deposit(Bank_account, 55 ),
|
59
|
-
[erlang:spawn( fun () -> bank_account:withdraw(Bank_account, X) end ) || X <- lists:seq(1, 10)],
|
60
|
-
First = bank_account:balance( Bank_account ),
|
61
|
-
timer:sleep( 100 ),
|
62
|
-
Last = bank_account:balance( Bank_account ),
|
63
|
-
?assert(First > 0),
|
64
|
-
?assert(Last =:= 0).
|
65
|
-
|
66
|
-
charge_test() ->
|
67
|
-
Bank_account = bank_account:create(),
|
68
|
-
bank_account:deposit( Bank_account, 10 ),
|
69
|
-
Amount = bank_account:charge( Bank_account, 2 ),
|
70
|
-
?assert(Amount =:= 2),
|
71
|
-
?assert(bank_account:balance( Bank_account ) =:= 8).
|
72
|
-
|
73
|
-
charge_fail_test() ->
|
74
|
-
Bank_account = bank_account:create(),
|
75
|
-
bank_account:deposit( Bank_account, 10 ),
|
76
|
-
Amount = bank_account:charge( Bank_account, -2 ),
|
77
|
-
?assert(Amount =:= 0),
|
78
|
-
?assert(bank_account:balance( Bank_account ) =:= 10).
|
79
|
-
|
80
|
-
charge_excessive_test() ->
|
81
|
-
Bank_account = bank_account:create(),
|
82
|
-
bank_account:deposit( Bank_account, 10 ),
|
83
|
-
Amount = bank_account:charge( Bank_account, 20 ),
|
84
|
-
?assert(Amount =:= 0),
|
85
|
-
?assert(bank_account:balance( Bank_account ) =:= 10).
|
86
|
-
|
87
|
-
charge_many_test() ->
|
88
|
-
Bank_account = bank_account:create(),
|
89
|
-
bank_account:deposit(Bank_account, 55 ),
|
90
|
-
[erlang:spawn( fun () -> bank_account:charge(Bank_account, 10) end ) || _X <- lists:seq(1, 10)],
|
91
|
-
First = bank_account:balance( Bank_account ),
|
92
|
-
timer:sleep( 100 ),
|
93
|
-
Last = bank_account:balance( Bank_account ),
|
94
|
-
?assert(First > 0),
|
95
|
-
?assert(Last =:= 5).
|
@@ -1,54 +0,0 @@
|
|
1
|
-
-module( circular_buffer_tests ).
|
2
|
-
-include_lib( "eunit/include/eunit.hrl" ).
|
3
|
-
|
4
|
-
create_test() ->
|
5
|
-
Pid = circular_buffer:create( 5 ),
|
6
|
-
?assert( {ok, 5} =:= circular_buffer:size(Pid) ).
|
7
|
-
|
8
|
-
write_read_test() ->
|
9
|
-
Pid = circular_buffer:create( 4 ),
|
10
|
-
?assert( {error, empty} =:= circular_buffer:read(Pid) ),
|
11
|
-
circular_buffer:write( Pid, 1 ),
|
12
|
-
?assert( {ok, 1} =:= circular_buffer:read(Pid) ).
|
13
|
-
|
14
|
-
write_read_many_test() ->
|
15
|
-
Pid = circular_buffer:create( 3 ),
|
16
|
-
circular_buffer:write( Pid, 1 ),
|
17
|
-
circular_buffer:write( Pid, 2 ),
|
18
|
-
circular_buffer:write( Pid, 3 ),
|
19
|
-
?assert( {ok, 1} =:= circular_buffer:read(Pid) ),
|
20
|
-
?assert( {ok, 2} =:= circular_buffer:read(Pid) ),
|
21
|
-
?assert( {ok, 3} =:= circular_buffer:read(Pid) ).
|
22
|
-
|
23
|
-
over_write_read_test() ->
|
24
|
-
Pid = circular_buffer:create( 2 ),
|
25
|
-
circular_buffer:write( Pid, 1 ),
|
26
|
-
circular_buffer:write( Pid, 2 ),
|
27
|
-
circular_buffer:write( Pid, 3 ),
|
28
|
-
circular_buffer:write( Pid, 4 ),
|
29
|
-
?assert( {ok, 3} =:= circular_buffer:read(Pid) ),
|
30
|
-
?assert( {ok, 4} =:= circular_buffer:read(Pid) ),
|
31
|
-
?assert( {error, empty} =:= circular_buffer:read(Pid) ).
|
32
|
-
|
33
|
-
write_attempt_test() ->
|
34
|
-
Pid = circular_buffer:create( 1 ),
|
35
|
-
Attempt1 = circular_buffer:write_attempt( Pid, 1 ),
|
36
|
-
?assert( ok =:= Attempt1 ),
|
37
|
-
Attempt2 = circular_buffer:write_attempt( Pid, 2 ),
|
38
|
-
?assert( {error, full} =:= Attempt2 ),
|
39
|
-
?assert( {ok, 1} =:= circular_buffer:read(Pid) ).
|
40
|
-
|
41
|
-
producer_consumer_test() ->
|
42
|
-
Pid = circular_buffer:create( 3 ),
|
43
|
-
erlang:spawn( fun() ->
|
44
|
-
[circular_buffer:write(Pid, X) || X <- [1,2,3]]
|
45
|
-
end ),
|
46
|
-
My_pid = erlang:self(),
|
47
|
-
Ref = erlang:make_ref(),
|
48
|
-
erlang:spawn( fun() ->
|
49
|
-
My_pid ! {Ref, [circular_buffer:read(Pid) || _X <- [1,2,3]]}
|
50
|
-
end ),
|
51
|
-
Reads = receive
|
52
|
-
{Ref, R} -> R
|
53
|
-
end,
|
54
|
-
?assert( Reads =:= [{ok, 1}, {ok, 2}, {ok, 3}] ).
|
@@ -1,29 +0,0 @@
|
|
1
|
-
-module(gigasecond_tests).
|
2
|
-
-include_lib("eunit/include/eunit.hrl").
|
3
|
-
|
4
|
-
% To run tests:
|
5
|
-
% erl -make
|
6
|
-
% erl -noshell -eval "eunit:test(gigasecond, [verbose])" -s init stop
|
7
|
-
|
8
|
-
one_test() ->
|
9
|
-
Gs = gigasecond:from({2011, 4, 25}),
|
10
|
-
?assertEqual({{2043, 1, 1}, {1, 46, 40}}, Gs).
|
11
|
-
|
12
|
-
two_test() ->
|
13
|
-
Gs = gigasecond:from({1977, 6, 13}),
|
14
|
-
?assertEqual({{2009, 2, 19}, {1, 46, 40}}, Gs).
|
15
|
-
|
16
|
-
three_test() ->
|
17
|
-
Gs = gigasecond:from({1959, 7, 19}),
|
18
|
-
?assertEqual({{1991, 3, 27}, {1, 46, 40}}, Gs).
|
19
|
-
|
20
|
-
four_with_seconds_test() ->
|
21
|
-
Gs = gigasecond:from({{1959, 7, 19}, {23, 59, 59}}),
|
22
|
-
?assertEqual({{1991, 3, 28}, {1, 46, 39}}, Gs).
|
23
|
-
|
24
|
-
% modify the test to test your 1 Gs anniversary
|
25
|
-
% with_your_birthday_test() ->
|
26
|
-
% YourBirthday = {Year, Month, Day},
|
27
|
-
% Gs = gigasecond:from(YourBirthday),
|
28
|
-
% ?assertEqual({2009, 1, 31, 1, 46, 39}, Gs).
|
29
|
-
|
@@ -1,49 +0,0 @@
|
|
1
|
-
% To run tests:
|
2
|
-
% erl -make
|
3
|
-
% erl -noshell -eval "eunit:test(grade_school, [verbose])" -s init stop
|
4
|
-
%
|
5
|
-
|
6
|
-
-module(grade_school_tests).
|
7
|
-
|
8
|
-
-include_lib("eunit/include/eunit.hrl").
|
9
|
-
|
10
|
-
add_student_test() ->
|
11
|
-
S1 = grade_school:add("Aimee", 2, grade_school:new()),
|
12
|
-
Students = grade_school:get(2, S1),
|
13
|
-
?assertEqual(["Aimee"], lists:sort(Students)).
|
14
|
-
|
15
|
-
add_more_students_in_same_class_test() ->
|
16
|
-
S1 = grade_school:add("James", 2, grade_school:new()),
|
17
|
-
S2 = grade_school:add("Blair", 2, S1),
|
18
|
-
S3 = grade_school:add("Paul", 2, S2),
|
19
|
-
Students = grade_school:get(2, S3),
|
20
|
-
?assertEqual(["Blair","James","Paul"], lists:sort(Students)).
|
21
|
-
|
22
|
-
add_students_to_different_grades_test() ->
|
23
|
-
S1 = grade_school:add("Chelsea", 3, grade_school:new()),
|
24
|
-
S2 = grade_school:add("Logan", 7, S1),
|
25
|
-
|
26
|
-
?assertEqual(["Chelsea"], grade_school:get(3, S2)),
|
27
|
-
?assertEqual(["Logan"], grade_school:get(7, S2)).
|
28
|
-
|
29
|
-
get_students_in_a_grade_test() ->
|
30
|
-
S1 = grade_school:add("Franklin", 5, grade_school:new()),
|
31
|
-
S2 = grade_school:add("Bradley", 5, S1),
|
32
|
-
S3 = grade_school:add("Jeff", 1, S2),
|
33
|
-
Students = grade_school:get(5, S3),
|
34
|
-
?assertEqual(["Bradley","Franklin"], lists:sort(Students)).
|
35
|
-
|
36
|
-
get_students_in_a_non_existant_grade_test() ->
|
37
|
-
?assertEqual([], grade_school:get(1, grade_school:new())).
|
38
|
-
|
39
|
-
sort_school_test() ->
|
40
|
-
S1 = grade_school:add("Jennifer", 4, grade_school:new()),
|
41
|
-
S2 = grade_school:add("Kareem", 6, S1),
|
42
|
-
S3 = grade_school:add("Christopher", 4, S2),
|
43
|
-
S4 = grade_school:add("Kyle", 3, S3),
|
44
|
-
|
45
|
-
Sorted = [{3, ["Kyle"]},
|
46
|
-
{4, ["Christopher", "Jennifer"]},
|
47
|
-
{6, ["Kareem"]}],
|
48
|
-
|
49
|
-
?assertEqual(Sorted, grade_school:sort(S4)).
|
@@ -1,31 +0,0 @@
|
|
1
|
-
-module(grains_tests).
|
2
|
-
-include_lib("eunit/include/eunit.hrl").
|
3
|
-
|
4
|
-
% To run tests:
|
5
|
-
% erl -make
|
6
|
-
% erl -noshell -eval "eunit:test(grains, [verbose])" -s init stop
|
7
|
-
|
8
|
-
square_1_test() ->
|
9
|
-
?assertEqual(1, grains:square(1)).
|
10
|
-
|
11
|
-
square_2_test() ->
|
12
|
-
?assertEqual(2, grains:square(2)).
|
13
|
-
|
14
|
-
square_3_test() ->
|
15
|
-
?assertEqual(4, grains:square(3)).
|
16
|
-
|
17
|
-
square_4_test() ->
|
18
|
-
?assertEqual(8, grains:square(4)).
|
19
|
-
|
20
|
-
square_16_test() ->
|
21
|
-
?assertEqual(32768, grains:square(16)).
|
22
|
-
|
23
|
-
square_32_test() ->
|
24
|
-
?assertEqual(2147483648, grains:square(32)).
|
25
|
-
|
26
|
-
square_64_test() ->
|
27
|
-
?assertEqual(9223372036854775808, grains:square(64)).
|
28
|
-
|
29
|
-
total_grains_test() ->
|
30
|
-
?assertEqual(18446744073709551615, grains:total()).
|
31
|
-
|
@@ -1,21 +0,0 @@
|
|
1
|
-
-module(dna_tests).
|
2
|
-
|
3
|
-
-include_lib("eunit/include/eunit.hrl").
|
4
|
-
|
5
|
-
empty_test()->
|
6
|
-
?assertEqual(0, dna:hamming_distance("", "")).
|
7
|
-
|
8
|
-
equal_test() ->
|
9
|
-
?assertEqual(0, dna:hamming_distance("GAGCCTACTAACGGGAT", "GAGCCTACTAACGGGAT")).
|
10
|
-
|
11
|
-
all_different_test() ->
|
12
|
-
?assertEqual(17, dna:hamming_distance("GAGCCTACTAACGGGAT", "FFFFFFFFFFFFFFFFF")).
|
13
|
-
|
14
|
-
ends_different_test()->
|
15
|
-
?assertEqual(2, dna:hamming_distance("GAGCCTACTAACGGGAT", "TAGCCTACTAACGGGAG")).
|
16
|
-
|
17
|
-
middle_different_test() ->
|
18
|
-
?assertEqual(1, dna:hamming_distance("GAGCCTACTAACGGGAT", "GAGCCTACCAACGGGAT")).
|
19
|
-
|
20
|
-
some_differences_test() ->
|
21
|
-
?assertEqual(6, dna:hamming_distance("GAGCCTACTAACGGGAT", "GAACCTCCCAAGGGATT")).
|
@@ -1,19 +0,0 @@
|
|
1
|
-
% To run tests:
|
2
|
-
% erl -make
|
3
|
-
% erl -noshell -eval "eunit:test(hello_world, [verbose])" -s init stop
|
4
|
-
%
|
5
|
-
|
6
|
-
-module(hello_world_tests).
|
7
|
-
-include_lib("eunit/include/eunit.hrl").
|
8
|
-
|
9
|
-
no_name_test() ->
|
10
|
-
?assertEqual("Hello, World!", hello_world:greet()).
|
11
|
-
|
12
|
-
alice_test() ->
|
13
|
-
?assertEqual("Hello, Alice!", hello_world:greet("Alice")).
|
14
|
-
|
15
|
-
bob_test() ->
|
16
|
-
?assertEqual("Hello, Bob!", hello_world:greet("Bob")).
|
17
|
-
|
18
|
-
strange_test() ->
|
19
|
-
?assertEqual("Hello, !", hello_world:greet("")).
|
@@ -1,54 +0,0 @@
|
|
1
|
-
-module('largest_series_product_tests').
|
2
|
-
-include_lib("eunit/include/eunit.hrl").
|
3
|
-
|
4
|
-
|
5
|
-
can_find_the_largest_product_of_2_with_numbers_in_order_test() ->
|
6
|
-
?assertEqual(72, largest_series_product:lsp("0123456789", 2)).
|
7
|
-
|
8
|
-
can_find_the_largest_product_of_2_test() ->
|
9
|
-
?assertEqual(48, largest_series_product:lsp("576802143", 2)).
|
10
|
-
|
11
|
-
finds_the_largest_product_if_span_equals_length_test() ->
|
12
|
-
?assertEqual(18, largest_series_product:lsp("29", 2)).
|
13
|
-
|
14
|
-
can_find_the_largest_product_of_3_with_numbers_in_order_test() ->
|
15
|
-
?assertEqual(504, largest_series_product:lsp("0123456789", 3)).
|
16
|
-
|
17
|
-
can_find_the_largest_product_of_3_test() ->
|
18
|
-
?assertEqual(270, largest_series_product:lsp("1027839564", 3)).
|
19
|
-
|
20
|
-
can_find_the_largest_product_of_5_with_numbers_in_order_test() ->
|
21
|
-
?assertEqual(15120, largest_series_product:lsp("0123456789", 5)).
|
22
|
-
|
23
|
-
can_find_the_largest_product_of_a_big_number_test() ->
|
24
|
-
?assertEqual(23520, largest_series_product:lsp("73167176531330624919225119674426574742355349194934", 6)).
|
25
|
-
|
26
|
-
can_find_the_largest_product_of_a_big_number_ii_test() ->
|
27
|
-
?assertEqual(28350, largest_series_product:lsp("52677741234314237566414902593461595376319419139427", 6)).
|
28
|
-
|
29
|
-
can_find_the_largest_product_of_a_big_number_project_euler_test() ->
|
30
|
-
?assertEqual(23514624000, largest_series_product:lsp("7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858615607891129494954595017379583319528532088055111254069874715852386305071569329096329522744304355766896648950445244523161731856403098711121722383113622298934233803081353362766142828064444866452387493035890729629049156044077239071381051585930796086670172427121883998797908792274921901699720888093776657273330010533678812202354218097512545405947522435258490771167055601360483958644670632441572215539753697817977846174064955149290862569321978468622482839722413756570560574902614079729686524145351004748216637048440319989000889524345065854122758866688116427171479924442928230863465674813919123162824586178664583591245665294765456828489128831426076900422421902267105562632111110937054421750694165896040807198403850962455444362981230987879927244284909188845801561660979191338754992005240636899125607176060588611646710940507754100225698315520005593572972571636269561882670428252483600823257530420752963450", 13)).
|
31
|
-
|
32
|
-
reports_zero_if_the_only_digits_are_zero_test() ->
|
33
|
-
?assertEqual(0, largest_series_product:lsp("0000", 2)).
|
34
|
-
|
35
|
-
reports_zero_if_all_spans_include_zero_test() ->
|
36
|
-
?assertEqual(0, largest_series_product:lsp("99099", 3)).
|
37
|
-
|
38
|
-
rejects_span_longer_than_string_length_test() ->
|
39
|
-
?assertMatch(error, largest_series_product:lsp("123", 4)).
|
40
|
-
|
41
|
-
reports_1_for_empty_string_and_empty_product_0_span_test() ->
|
42
|
-
?assertEqual(1, largest_series_product:lsp("", 0)).
|
43
|
-
|
44
|
-
reports_1_for_nonempty_string_and_empty_product_0_span_test() ->
|
45
|
-
?assertEqual(1, largest_series_product:lsp("123", 0)).
|
46
|
-
|
47
|
-
rejects_empty_string_and_nonzero_span_test() ->
|
48
|
-
?assertMatch(error, largest_series_product:lsp("", 1)).
|
49
|
-
|
50
|
-
rejects_invalid_character_in_digits_test() ->
|
51
|
-
?assertMatch(error, largest_series_product:lsp("1234a5", 2)).
|
52
|
-
|
53
|
-
rejects_negative_span_test() ->
|
54
|
-
?assertMatch(error, largest_series_product:lsp("12345", -1)).
|