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,4 +1,4 @@
|
|
1
|
-
-module(
|
1
|
+
-module(example).
|
2
2
|
|
3
3
|
-export( [create/1, read/1, size/1, write/2, write_attempt/2] ).
|
4
4
|
|
@@ -17,39 +17,6 @@ write_attempt( Pid, Item ) ->
|
|
17
17
|
{write_attempt, false, Pid} -> {error, full}
|
18
18
|
end.
|
19
19
|
|
20
|
-
|
21
|
-
|
22
|
-
handle( {read, Pid}, {0, MaxSize, Queue}) ->
|
23
|
-
Pid ! {read, empty, erlang:self()},
|
24
|
-
{0, MaxSize, Queue};
|
25
|
-
handle( {read, Pid}, {CurrentSize, MaxSize, Queue}) ->
|
26
|
-
{Result, NewQueue} = queue:out(Queue),
|
27
|
-
Pid ! {read, Result, erlang:self()},
|
28
|
-
{CurrentSize-1, MaxSize, NewQueue};
|
29
|
-
handle( {write, Item}, {MaxSize, MaxSize, Queue}) ->
|
30
|
-
{_Old, TmpQueue} = queue:out(Queue),
|
31
|
-
NewQueue = queue:in(Item, TmpQueue),
|
32
|
-
{MaxSize, MaxSize, NewQueue};
|
33
|
-
handle( {write, Item}, {CurrentSize, MaxSize, Queue}) ->
|
34
|
-
NewQueue = queue:in(Item, Queue),
|
35
|
-
{CurrentSize+1, MaxSize, NewQueue};
|
36
|
-
handle( {write_attempt, _Item, Pid}, {MaxSize, MaxSize, Queue}) ->
|
37
|
-
Pid ! {write_attempt, false, erlang:self()},
|
38
|
-
{MaxSize, MaxSize, Queue};
|
39
|
-
handle( {write_attempt, Item, Pid}, {CurrentSize, MaxSize, Queue}) ->
|
40
|
-
Pid ! {write_attempt, true, erlang:self()},
|
41
|
-
NewQueue = queue:in(Item, Queue),
|
42
|
-
{CurrentSize+1, MaxSize, NewQueue};
|
43
|
-
handle( {size, Pid}, {CurrentSize, MaxSize, Queue}) ->
|
44
|
-
Pid ! {size, MaxSize, Queue},
|
45
|
-
{CurrentSize, MaxSize, Queue}.
|
46
|
-
|
47
|
-
loop(State) ->
|
48
|
-
receive
|
49
|
-
Request ->
|
50
|
-
loop(handle(Request, State))
|
51
|
-
end.
|
52
|
-
|
53
20
|
loop( Current_size, Max_size, Queue ) ->
|
54
21
|
receive
|
55
22
|
{read, Pid} ->
|
@@ -0,0 +1,58 @@
|
|
1
|
+
-module( circular_buffer_tests ).
|
2
|
+
|
3
|
+
-include("exercism.hrl").
|
4
|
+
-include_lib( "eunit/include/eunit.hrl" ).
|
5
|
+
|
6
|
+
-define(TESTED_MODULE, (sut(circular_buffer))).
|
7
|
+
|
8
|
+
create_test() ->
|
9
|
+
Pid = ?TESTED_MODULE:create( 5 ),
|
10
|
+
?assert( {ok, 5} =:= ?TESTED_MODULE:size(Pid) ).
|
11
|
+
|
12
|
+
write_read_test() ->
|
13
|
+
Pid = ?TESTED_MODULE:create( 4 ),
|
14
|
+
?assert( {error, empty} =:= ?TESTED_MODULE:read(Pid) ),
|
15
|
+
?TESTED_MODULE:write( Pid, 1 ),
|
16
|
+
?assert( {ok, 1} =:= ?TESTED_MODULE:read(Pid) ).
|
17
|
+
|
18
|
+
write_read_many_test() ->
|
19
|
+
Pid = ?TESTED_MODULE:create( 3 ),
|
20
|
+
?TESTED_MODULE:write( Pid, 1 ),
|
21
|
+
?TESTED_MODULE:write( Pid, 2 ),
|
22
|
+
?TESTED_MODULE:write( Pid, 3 ),
|
23
|
+
?assert( {ok, 1} =:= ?TESTED_MODULE:read(Pid) ),
|
24
|
+
?assert( {ok, 2} =:= ?TESTED_MODULE:read(Pid) ),
|
25
|
+
?assert( {ok, 3} =:= ?TESTED_MODULE:read(Pid) ).
|
26
|
+
|
27
|
+
over_write_read_test() ->
|
28
|
+
Pid = ?TESTED_MODULE:create( 2 ),
|
29
|
+
?TESTED_MODULE:write( Pid, 1 ),
|
30
|
+
?TESTED_MODULE:write( Pid, 2 ),
|
31
|
+
?TESTED_MODULE:write( Pid, 3 ),
|
32
|
+
?TESTED_MODULE:write( Pid, 4 ),
|
33
|
+
?assert( {ok, 3} =:= ?TESTED_MODULE:read(Pid) ),
|
34
|
+
?assert( {ok, 4} =:= ?TESTED_MODULE:read(Pid) ),
|
35
|
+
?assert( {error, empty} =:= ?TESTED_MODULE:read(Pid) ).
|
36
|
+
|
37
|
+
write_attempt_test() ->
|
38
|
+
Pid = ?TESTED_MODULE:create( 1 ),
|
39
|
+
Attempt1 = ?TESTED_MODULE:write_attempt( Pid, 1 ),
|
40
|
+
?assert( ok =:= Attempt1 ),
|
41
|
+
Attempt2 = ?TESTED_MODULE:write_attempt( Pid, 2 ),
|
42
|
+
?assert( {error, full} =:= Attempt2 ),
|
43
|
+
?assert( {ok, 1} =:= ?TESTED_MODULE:read(Pid) ).
|
44
|
+
|
45
|
+
producer_consumer_test() ->
|
46
|
+
Pid = ?TESTED_MODULE:create( 3 ),
|
47
|
+
erlang:spawn( fun() ->
|
48
|
+
[?TESTED_MODULE:write(Pid, X) || X <- [1,2,3]]
|
49
|
+
end ),
|
50
|
+
My_pid = erlang:self(),
|
51
|
+
Ref = erlang:make_ref(),
|
52
|
+
erlang:spawn( fun() ->
|
53
|
+
My_pid ! {Ref, [?TESTED_MODULE:read(Pid) || _X <- [1,2,3]]}
|
54
|
+
end ),
|
55
|
+
Reads = receive
|
56
|
+
{Ref, R} -> R
|
57
|
+
end,
|
58
|
+
?assert( Reads =:= [{ok, 1}, {ok, 2}, {ok, 3}] ).
|
@@ -0,0 +1,30 @@
|
|
1
|
+
%% Erlang compiler options
|
2
|
+
{erl_opts, [debug_info]}.
|
3
|
+
|
4
|
+
{deps, []}.
|
5
|
+
|
6
|
+
{dialyzer, [
|
7
|
+
{warnings, [underspecs, no_return]},
|
8
|
+
{get_warnings, true},
|
9
|
+
{plt_apps, top_level_deps}, % top_level_deps | all_deps
|
10
|
+
{plt_extra_apps, []},
|
11
|
+
{plt_location, local}, % local | "/my/file/name"
|
12
|
+
{plt_prefix, "rebar3"},
|
13
|
+
{base_plt_apps, [stdlib, kernel, crypto]},
|
14
|
+
{base_plt_location, global}, % global | "/my/file/name"
|
15
|
+
{base_plt_prefix, "rebar3"}
|
16
|
+
]}.
|
17
|
+
|
18
|
+
%% eunit:test(Tests)
|
19
|
+
{eunit_tests, [{application, beer_song}]}.
|
20
|
+
%% Options for eunit:test(Tests, Opts)
|
21
|
+
{eunit_opts, [verbose]}.
|
22
|
+
|
23
|
+
%% == xref ==
|
24
|
+
|
25
|
+
{xref_warnings, true}.
|
26
|
+
|
27
|
+
%% xref checks to run
|
28
|
+
{xref_checks, [undefined_function_calls, undefined_functions,
|
29
|
+
locals_not_used, exports_not_used,
|
30
|
+
deprecated_function_calls, deprecated_functions]}.
|
@@ -1,9 +1,13 @@
|
|
1
1
|
-module('clock_tests').
|
2
|
+
|
3
|
+
-include("exercism.hrl").
|
2
4
|
-include_lib("eunit/include/eunit.hrl").
|
3
5
|
|
4
|
-
-define(
|
6
|
+
-define(TESTED_MODULE, (sut(clock))).
|
7
|
+
|
8
|
+
-define(assertClockString(String, Hour, Minute), ?assertEqual(String, ?TESTED_MODULE:to_string(?TESTED_MODULE:create( Hour, Minute)))).
|
5
9
|
|
6
|
-
-define(assertClockAdd(String, Hour, Minute, Add), ?assertEqual(String,
|
10
|
+
-define(assertClockAdd(String, Hour, Minute, Add), ?assertEqual(String, ?TESTED_MODULE:to_string(?TESTED_MODULE:minutes_add(?TESTED_MODULE:create(Hour, Minute), Add)))).
|
7
11
|
|
8
12
|
create_on_the_hour_test() ->
|
9
13
|
?assertClockString("08:00", 8, 0).
|
@@ -115,78 +119,77 @@ subtract_more_than_two_days_test() ->
|
|
115
119
|
|
116
120
|
|
117
121
|
equal_clocks_with_same_time_test() ->
|
118
|
-
Clock1 =
|
119
|
-
Clock2 =
|
120
|
-
?assert(
|
122
|
+
Clock1 = ?TESTED_MODULE:create(15, 37),
|
123
|
+
Clock2 = ?TESTED_MODULE:create(15, 37),
|
124
|
+
?assert(?TESTED_MODULE:is_equal(Clock1, Clock2)).
|
121
125
|
|
122
126
|
equal_clocks_a_minute_apart_test() ->
|
123
|
-
Clock1 =
|
124
|
-
Clock2 =
|
125
|
-
?assertNot(
|
127
|
+
Clock1 = ?TESTED_MODULE:create(15, 36),
|
128
|
+
Clock2 = ?TESTED_MODULE:create(15, 37),
|
129
|
+
?assertNot(?TESTED_MODULE:is_equal(Clock1, Clock2)).
|
126
130
|
|
127
131
|
equal_clocks_an_hour_apart_test() ->
|
128
|
-
Clock1 =
|
129
|
-
Clock2 =
|
130
|
-
?assertNot(
|
132
|
+
Clock1 = ?TESTED_MODULE:create(14, 37),
|
133
|
+
Clock2 = ?TESTED_MODULE:create(15, 37),
|
134
|
+
?assertNot(?TESTED_MODULE:is_equal(Clock1, Clock2)).
|
131
135
|
|
132
136
|
|
133
137
|
equal_clocks_with_hour_overflow_test() ->
|
134
|
-
Clock1 =
|
135
|
-
Clock2 =
|
136
|
-
?assert(
|
138
|
+
Clock1 = ?TESTED_MODULE:create(10, 37),
|
139
|
+
Clock2 = ?TESTED_MODULE:create(34, 37),
|
140
|
+
?assert(?TESTED_MODULE:is_equal(Clock1, Clock2)).
|
137
141
|
|
138
142
|
equal_clocks_with_hour_overflow_by_several_days_test() ->
|
139
|
-
Clock1 =
|
140
|
-
Clock2 =
|
141
|
-
?assert(
|
143
|
+
Clock1 = ?TESTED_MODULE:create(3, 11),
|
144
|
+
Clock2 = ?TESTED_MODULE:create(99, 11),
|
145
|
+
?assert(?TESTED_MODULE:is_equal(Clock1, Clock2)).
|
142
146
|
|
143
147
|
equal_clocks_with_negative_hour_test() ->
|
144
|
-
Clock1 =
|
145
|
-
Clock2 =
|
146
|
-
?assert(
|
148
|
+
Clock1 = ?TESTED_MODULE:create(22, 40),
|
149
|
+
Clock2 = ?TESTED_MODULE:create(-2, 40),
|
150
|
+
?assert(?TESTED_MODULE:is_equal(Clock1, Clock2)).
|
147
151
|
|
148
152
|
equal_clocks_with_negative_hour_that_wraps_test() ->
|
149
|
-
Clock1 =
|
150
|
-
Clock2 =
|
151
|
-
?assert(
|
153
|
+
Clock1 = ?TESTED_MODULE:create(17, 3),
|
154
|
+
Clock2 = ?TESTED_MODULE:create(-31, 3),
|
155
|
+
?assert(?TESTED_MODULE:is_equal(Clock1, Clock2)).
|
152
156
|
|
153
157
|
equal_clocks_with_negative_hour_that_wraps_multiple_times_test() ->
|
154
|
-
Clock1 =
|
155
|
-
Clock2 =
|
156
|
-
?assert(
|
158
|
+
Clock1 = ?TESTED_MODULE:create(13, 49),
|
159
|
+
Clock2 = ?TESTED_MODULE:create(-83, 49),
|
160
|
+
?assert(?TESTED_MODULE:is_equal(Clock1, Clock2)).
|
157
161
|
|
158
162
|
equal_clocks_with_minute_overflow_test() ->
|
159
|
-
Clock1 =
|
160
|
-
Clock2 =
|
161
|
-
?assert(
|
163
|
+
Clock1 = ?TESTED_MODULE:create(0, 1),
|
164
|
+
Clock2 = ?TESTED_MODULE:create(0, 1441),
|
165
|
+
?assert(?TESTED_MODULE:is_equal(Clock1, Clock2)).
|
162
166
|
|
163
167
|
equal_clocks_with_minute_overflow_by_several_days_test() ->
|
164
|
-
Clock1 =
|
165
|
-
Clock2 =
|
166
|
-
?assert(
|
168
|
+
Clock1 = ?TESTED_MODULE:create(2, 2),
|
169
|
+
Clock2 = ?TESTED_MODULE:create(2, 4322),
|
170
|
+
?assert(?TESTED_MODULE:is_equal(Clock1, Clock2)).
|
167
171
|
|
168
172
|
equal_clocks_with_negative_minute_test() ->
|
169
|
-
Clock1 =
|
170
|
-
Clock2 =
|
171
|
-
?assert(
|
173
|
+
Clock1 = ?TESTED_MODULE:create(2, 40),
|
174
|
+
Clock2 = ?TESTED_MODULE:create(3, -20),
|
175
|
+
?assert(?TESTED_MODULE:is_equal(Clock1, Clock2)).
|
172
176
|
|
173
177
|
equal_clocks_with_negative_minute_that_wraps_test() ->
|
174
|
-
Clock1 =
|
175
|
-
Clock2 =
|
176
|
-
?assert(
|
178
|
+
Clock1 = ?TESTED_MODULE:create(4, 10),
|
179
|
+
Clock2 = ?TESTED_MODULE:create(5, -1490),
|
180
|
+
?assert(?TESTED_MODULE:is_equal(Clock1, Clock2)).
|
177
181
|
|
178
182
|
equal_clocks_with_negative_minute_that_wraps_multiple_times_test() ->
|
179
|
-
Clock1 =
|
180
|
-
Clock2 =
|
181
|
-
?assert(
|
183
|
+
Clock1 = ?TESTED_MODULE:create(6, 15),
|
184
|
+
Clock2 = ?TESTED_MODULE:create(6, -4305),
|
185
|
+
?assert(?TESTED_MODULE:is_equal(Clock1, Clock2)).
|
182
186
|
|
183
187
|
equal_clocks_with_negative_hours_and_minutes_test() ->
|
184
|
-
Clock1 =
|
185
|
-
Clock2 =
|
186
|
-
?assert(
|
188
|
+
Clock1 = ?TESTED_MODULE:create(7, 32),
|
189
|
+
Clock2 = ?TESTED_MODULE:create(-12, -268),
|
190
|
+
?assert(?TESTED_MODULE:is_equal(Clock1, Clock2)).
|
187
191
|
|
188
192
|
equal_clocks_with_negative_hours_and_minutes_that_wrap_test() ->
|
189
|
-
Clock1 =
|
190
|
-
Clock2 =
|
191
|
-
?assert(
|
192
|
-
|
193
|
+
Clock1 = ?TESTED_MODULE:create(18, 7),
|
194
|
+
Clock2 = ?TESTED_MODULE:create(-54, -11513),
|
195
|
+
?assert(?TESTED_MODULE:is_equal(Clock1, Clock2)).
|
@@ -0,0 +1,30 @@
|
|
1
|
+
%% Erlang compiler options
|
2
|
+
{erl_opts, [debug_info]}.
|
3
|
+
|
4
|
+
{deps, []}.
|
5
|
+
|
6
|
+
{dialyzer, [
|
7
|
+
{warnings, [underspecs, no_return]},
|
8
|
+
{get_warnings, true},
|
9
|
+
{plt_apps, top_level_deps}, % top_level_deps | all_deps
|
10
|
+
{plt_extra_apps, []},
|
11
|
+
{plt_location, local}, % local | "/my/file/name"
|
12
|
+
{plt_prefix, "rebar3"},
|
13
|
+
{base_plt_apps, [stdlib, kernel, crypto]},
|
14
|
+
{base_plt_location, global}, % global | "/my/file/name"
|
15
|
+
{base_plt_prefix, "rebar3"}
|
16
|
+
]}.
|
17
|
+
|
18
|
+
%% eunit:test(Tests)
|
19
|
+
{eunit_tests, [{application, beer_song}]}.
|
20
|
+
%% Options for eunit:test(Tests, Opts)
|
21
|
+
{eunit_opts, [verbose]}.
|
22
|
+
|
23
|
+
%% == xref ==
|
24
|
+
|
25
|
+
{xref_warnings, true}.
|
26
|
+
|
27
|
+
%% xref checks to run
|
28
|
+
{xref_checks, [undefined_function_calls, undefined_functions,
|
29
|
+
locals_not_used, exports_not_used,
|
30
|
+
deprecated_function_calls, deprecated_functions]}.
|
@@ -1,9 +1,13 @@
|
|
1
1
|
-module(difference_of_squares_tests).
|
2
|
+
|
3
|
+
-include("exercism.hrl").
|
2
4
|
-include_lib("eunit/include/eunit.hrl").
|
3
5
|
|
4
|
-
-define(
|
5
|
-
|
6
|
-
-define(
|
6
|
+
-define(TESTED_MODULE, (sut(difference_of_squares))).
|
7
|
+
|
8
|
+
-define(assertSumOfSquares(Expected, Number), ?assertEqual(Expected, ?TESTED_MODULE:sum_of_squares(Number))).
|
9
|
+
-define(assertSquareOfSums(Expected, Number), ?assertEqual(Expected, ?TESTED_MODULE:square_of_sums(Number))).
|
10
|
+
-define(assertDifference(Expected, Number), ?assertEqual(Expected, ?TESTED_MODULE:difference_of_squares(Number))).
|
7
11
|
|
8
12
|
%% Square the sum of the numbers up to the given number
|
9
13
|
|
@@ -0,0 +1,30 @@
|
|
1
|
+
%% Erlang compiler options
|
2
|
+
{erl_opts, [debug_info]}.
|
3
|
+
|
4
|
+
{deps, []}.
|
5
|
+
|
6
|
+
{dialyzer, [
|
7
|
+
{warnings, [underspecs, no_return]},
|
8
|
+
{get_warnings, true},
|
9
|
+
{plt_apps, top_level_deps}, % top_level_deps | all_deps
|
10
|
+
{plt_extra_apps, []},
|
11
|
+
{plt_location, local}, % local | "/my/file/name"
|
12
|
+
{plt_prefix, "rebar3"},
|
13
|
+
{base_plt_apps, [stdlib, kernel, crypto]},
|
14
|
+
{base_plt_location, global}, % global | "/my/file/name"
|
15
|
+
{base_plt_prefix, "rebar3"}
|
16
|
+
]}.
|
17
|
+
|
18
|
+
%% eunit:test(Tests)
|
19
|
+
{eunit_tests, [{application, beer_song}]}.
|
20
|
+
%% Options for eunit:test(Tests, Opts)
|
21
|
+
{eunit_opts, [verbose]}.
|
22
|
+
|
23
|
+
%% == xref ==
|
24
|
+
|
25
|
+
{xref_warnings, true}.
|
26
|
+
|
27
|
+
%% xref checks to run
|
28
|
+
{xref_checks, [undefined_function_calls, undefined_functions,
|
29
|
+
locals_not_used, exports_not_used,
|
30
|
+
deprecated_function_calls, deprecated_functions]}.
|