trackler 2.2.1.44 → 2.2.1.45
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/problem-specifications/exercises/isbn-verifier/canonical-data.json +88 -0
- data/problem-specifications/exercises/isbn-verifier/description.md +35 -0
- data/problem-specifications/exercises/isbn-verifier/metadata.yml +4 -0
- data/problem-specifications/exercises/robot-simulator/canonical-data.json +125 -32
- data/problem-specifications/exercises/sum-of-multiples/description.md +0 -3
- data/problem-specifications/exercises/two-bucket/canonical-data.json +3 -3
- data/tracks/c/config.json +235 -237
- data/tracks/c/exercises/acronym/README.md +0 -1
- data/tracks/c/exercises/all-your-base/README.md +1 -1
- data/tracks/c/exercises/allergies/README.md +0 -1
- data/tracks/c/exercises/atbash-cipher/README.md +2 -1
- data/tracks/c/exercises/beer-song/README.md +1 -1
- data/tracks/c/exercises/binary/README.md +2 -0
- data/tracks/c/exercises/grains/README.md +0 -1
- data/tracks/c/exercises/isogram/README.md +2 -1
- data/tracks/c/exercises/leap/README.md +1 -1
- data/tracks/c/exercises/meetup/README.md +1 -2
- data/tracks/c/exercises/nucleotide-count/README.md +8 -22
- data/tracks/c/exercises/palindrome-products/README.md +12 -6
- data/tracks/c/exercises/pangram/README.md +1 -1
- data/tracks/c/exercises/pascals-triangle/README.md +1 -1
- data/tracks/c/exercises/perfect-numbers/README.md +2 -2
- data/tracks/c/exercises/phone-number/README.md +3 -2
- data/tracks/c/exercises/roman-numerals/README.md +1 -1
- data/tracks/c/exercises/scrabble-score/README.md +3 -1
- data/tracks/c/exercises/space-age/README.md +2 -1
- data/tracks/c/exercises/triangle/README.md +9 -6
- data/tracks/c/exercises/word-count/README.md +1 -2
- data/tracks/csharp/exercises/accumulate/Accumulate.csproj +2 -2
- data/tracks/csharp/exercises/acronym/Acronym.csproj +2 -2
- data/tracks/csharp/exercises/all-your-base/AllYourBase.csproj +2 -2
- data/tracks/csharp/exercises/allergies/Allergies.csproj +2 -2
- data/tracks/csharp/exercises/alphametics/Alphametics.csproj +2 -2
- data/tracks/csharp/exercises/anagram/Anagram.csproj +2 -2
- data/tracks/csharp/exercises/atbash-cipher/AtbashCipher.csproj +2 -2
- data/tracks/csharp/exercises/bank-account/BankAccount.csproj +2 -2
- data/tracks/csharp/exercises/beer-song/BeerSong.csproj +2 -2
- data/tracks/csharp/exercises/binary-search/BinarySearch.csproj +2 -2
- data/tracks/csharp/exercises/binary-search-tree/BinarySearchTree.csproj +2 -2
- data/tracks/csharp/exercises/bob/Bob.csproj +2 -2
- data/tracks/csharp/exercises/book-store/BookStore.csproj +2 -2
- data/tracks/csharp/exercises/bowling/Bowling.csproj +2 -2
- data/tracks/csharp/exercises/bracket-push/BracketPush.csproj +2 -2
- data/tracks/csharp/exercises/change/Change.csproj +2 -2
- data/tracks/csharp/exercises/circular-buffer/CircularBuffer.csproj +2 -2
- data/tracks/csharp/exercises/clock/Clock.csproj +2 -2
- data/tracks/csharp/exercises/collatz-conjecture/CollatzConjecture.csproj +2 -2
- data/tracks/csharp/exercises/complex-numbers/ComplexNumbers.csproj +2 -2
- data/tracks/csharp/exercises/connect/Connect.cs +1 -1
- data/tracks/csharp/exercises/connect/Connect.csproj +2 -2
- data/tracks/csharp/exercises/connect/ConnectTest.cs +120 -85
- data/tracks/csharp/exercises/connect/Example.cs +11 -7
- data/tracks/csharp/exercises/crypto-square/CryptoSquare.csproj +2 -2
- data/tracks/csharp/exercises/custom-set/CustomSet.csproj +2 -2
- data/tracks/csharp/exercises/diamond/Diamond.csproj +2 -2
- data/tracks/csharp/exercises/difference-of-squares/DifferenceOfSquares.csproj +2 -2
- data/tracks/csharp/exercises/diffie-hellman/DiffieHellman.csproj +2 -2
- data/tracks/csharp/exercises/dominoes/Dominoes.csproj +2 -2
- data/tracks/csharp/exercises/dot-dsl/DotDsl.csproj +2 -2
- data/tracks/csharp/exercises/error-handling/ErrorHandling.csproj +2 -2
- data/tracks/csharp/exercises/etl/Etl.csproj +2 -2
- data/tracks/csharp/exercises/flatten-array/FlattenArray.csproj +2 -2
- data/tracks/csharp/exercises/food-chain/FoodChain.csproj +2 -2
- data/tracks/csharp/exercises/forth/Forth.csproj +2 -2
- data/tracks/csharp/exercises/gigasecond/Gigasecond.csproj +2 -2
- data/tracks/csharp/exercises/go-counting/GoCounting.csproj +2 -2
- data/tracks/csharp/exercises/grade-school/GradeSchool.csproj +2 -2
- data/tracks/csharp/exercises/grains/Grains.csproj +2 -2
- data/tracks/csharp/exercises/grep/Grep.csproj +2 -2
- data/tracks/csharp/exercises/hamming/Hamming.csproj +2 -2
- data/tracks/csharp/exercises/hangman/Hangman.csproj +2 -2
- data/tracks/csharp/exercises/hello-world/HelloWorld.csproj +2 -2
- data/tracks/csharp/exercises/house/House.csproj +2 -2
- data/tracks/csharp/exercises/isogram/Isogram.csproj +2 -2
- data/tracks/csharp/exercises/kindergarten-garden/KindergartenGarden.csproj +2 -2
- data/tracks/csharp/exercises/largest-series-product/LargestSeriesProduct.csproj +2 -2
- data/tracks/csharp/exercises/leap/Leap.csproj +2 -2
- data/tracks/csharp/exercises/ledger/Ledger.csproj +2 -2
- data/tracks/csharp/exercises/linked-list/LinkedList.csproj +2 -2
- data/tracks/csharp/exercises/list-ops/ListOps.csproj +2 -2
- data/tracks/csharp/exercises/luhn/Luhn.csproj +2 -2
- data/tracks/csharp/exercises/markdown/Markdown.csproj +2 -2
- data/tracks/csharp/exercises/matrix/Matrix.csproj +2 -2
- data/tracks/csharp/exercises/meetup/Meetup.csproj +2 -2
- data/tracks/csharp/exercises/minesweeper/Minesweeper.csproj +2 -2
- data/tracks/csharp/exercises/nth-prime/NthPrime.csproj +2 -2
- data/tracks/csharp/exercises/nucleotide-count/NucleotideCount.csproj +2 -2
- data/tracks/csharp/exercises/ocr-numbers/OcrNumbers.csproj +2 -2
- data/tracks/csharp/exercises/palindrome-products/PalindromeProducts.csproj +2 -2
- data/tracks/csharp/exercises/pangram/Pangram.csproj +2 -2
- data/tracks/csharp/exercises/parallel-letter-frequency/ParallelLetterFrequency.csproj +2 -2
- data/tracks/csharp/exercises/pascals-triangle/PascalsTriangle.csproj +2 -2
- data/tracks/csharp/exercises/perfect-numbers/PerfectNumbers.csproj +2 -2
- data/tracks/csharp/exercises/phone-number/PhoneNumber.csproj +2 -2
- data/tracks/csharp/exercises/pig-latin/PigLatin.csproj +2 -2
- data/tracks/csharp/exercises/poker/Poker.csproj +2 -2
- data/tracks/csharp/exercises/pov/Pov.csproj +2 -2
- data/tracks/csharp/exercises/prime-factors/PrimeFactors.csproj +2 -2
- data/tracks/csharp/exercises/protein-translation/ProteinTranslation.csproj +2 -2
- data/tracks/csharp/exercises/proverb/Proverb.csproj +2 -2
- data/tracks/csharp/exercises/pythagorean-triplet/PythagoreanTriplet.csproj +2 -2
- data/tracks/csharp/exercises/queen-attack/QueenAttack.csproj +2 -2
- data/tracks/csharp/exercises/rail-fence-cipher/RailFenceCipher.csproj +2 -2
- data/tracks/csharp/exercises/raindrops/Raindrops.csproj +2 -2
- data/tracks/csharp/exercises/react/React.csproj +2 -2
- data/tracks/csharp/exercises/rectangles/Rectangles.csproj +2 -2
- data/tracks/csharp/exercises/rna-transcription/RnaTranscription.csproj +2 -2
- data/tracks/csharp/exercises/robot-name/RobotName.csproj +2 -2
- data/tracks/csharp/exercises/robot-simulator/RobotSimulator.csproj +2 -2
- data/tracks/csharp/exercises/roman-numerals/RomanNumerals.csproj +2 -2
- data/tracks/csharp/exercises/rotational-cipher/RotationalCipher.csproj +2 -2
- data/tracks/csharp/exercises/run-length-encoding/RunLengthEncoding.csproj +2 -2
- data/tracks/csharp/exercises/saddle-points/SaddlePoints.csproj +2 -2
- data/tracks/csharp/exercises/say/Say.csproj +2 -2
- data/tracks/csharp/exercises/scale-generator/ScaleGenerator.csproj +2 -2
- data/tracks/csharp/exercises/scrabble-score/ScrabbleScore.csproj +2 -2
- data/tracks/csharp/exercises/secret-handshake/SecretHandshake.csproj +2 -2
- data/tracks/csharp/exercises/series/Series.csproj +2 -2
- data/tracks/csharp/exercises/series/SeriesTest.cs +17 -17
- data/tracks/csharp/exercises/sgf-parsing/SgfParsing.csproj +2 -2
- data/tracks/csharp/exercises/sieve/Sieve.csproj +2 -2
- data/tracks/csharp/exercises/simple-cipher/SimpleCipher.csproj +2 -2
- data/tracks/csharp/exercises/simple-linked-list/SimpleLinkedList.csproj +2 -2
- data/tracks/csharp/exercises/space-age/SpaceAge.csproj +2 -2
- data/tracks/csharp/exercises/spiral-matrix/SpiralMatrix.csproj +2 -2
- data/tracks/csharp/exercises/strain/Strain.csproj +2 -2
- data/tracks/csharp/exercises/sublist/Sublist.csproj +2 -2
- data/tracks/csharp/exercises/sum-of-multiples/SumOfMultiples.csproj +2 -2
- data/tracks/csharp/exercises/tournament/Tournament.csproj +2 -2
- data/tracks/csharp/exercises/transpose/Transpose.csproj +2 -2
- data/tracks/csharp/exercises/tree-building/TreeBuilding.csproj +2 -2
- data/tracks/csharp/exercises/triangle/Triangle.cs +0 -11
- data/tracks/csharp/exercises/triangle/Triangle.csproj +2 -2
- data/tracks/csharp/exercises/triangle/TriangleTest.cs +17 -17
- data/tracks/csharp/exercises/twelve-days/TwelveDays.csproj +2 -2
- data/tracks/csharp/exercises/two-bucket/TwoBucket.csproj +2 -2
- data/tracks/csharp/exercises/two-fer/TwoFer.csproj +2 -2
- data/tracks/csharp/exercises/variable-length-quantity/VariableLengthQuantity.csproj +2 -2
- data/tracks/csharp/exercises/word-count/WordCount.csproj +2 -2
- data/tracks/csharp/exercises/word-search/WordSearch.csproj +2 -2
- data/tracks/csharp/exercises/wordy/Wordy.csproj +2 -2
- data/tracks/csharp/exercises/zebra-puzzle/ZebraPuzzle.csproj +2 -2
- data/tracks/csharp/exercises/zipper/Zipper.csproj +2 -2
- data/tracks/csharp/generators/Exercises/Connect.cs +47 -0
- data/tracks/csharp/generators/Exercises/Triangle.cs +1 -1
- data/tracks/dart/config/maintainers.json +27 -1
- data/tracks/dart/pubspec.yaml +3 -0
- data/tracks/dart/tool/create-exercise +144 -5
- data/tracks/elm/.gitattributes +1 -0
- data/tracks/elm/bin/install-elm-format +9 -3
- data/tracks/elm/config.json +30 -0
- data/tracks/elm/exercises/all-your-base/AllYourBase.elm +1 -0
- data/tracks/elm/exercises/all-your-base/AllYourBase.example.elm +68 -0
- data/tracks/elm/exercises/all-your-base/README.md +65 -0
- data/tracks/elm/exercises/all-your-base/elm-package.json +15 -0
- data/tracks/elm/exercises/all-your-base/tests/Tests.elm +53 -0
- data/tracks/elm/exercises/all-your-base/tests/elm-package.json +16 -0
- data/tracks/elm/exercises/collatz-conjecture/CollatzConjecture.elm +2 -0
- data/tracks/elm/exercises/collatz-conjecture/CollatzConjecture.example.elm +19 -0
- data/tracks/elm/exercises/collatz-conjecture/elm-package.json +15 -0
- data/tracks/elm/exercises/collatz-conjecture/package.json +14 -0
- data/tracks/elm/exercises/collatz-conjecture/tests/Tests.elm +38 -0
- data/tracks/elm/exercises/collatz-conjecture/tests/elm-package.json +16 -0
- data/tracks/elm/exercises/isogram/Isogram.elm +1 -0
- data/tracks/elm/exercises/isogram/Isogram.example.elm +76 -0
- data/tracks/elm/exercises/isogram/README.md +50 -0
- data/tracks/elm/exercises/isogram/elm-package.json +14 -0
- data/tracks/elm/exercises/isogram/package.json +14 -0
- data/tracks/elm/exercises/isogram/tests/Tests.elm +46 -0
- data/tracks/elm/exercises/isogram/tests/elm-package.json +16 -0
- data/tracks/fsharp/.gitignore +2 -1
- data/tracks/fsharp/exercises/accumulate/Accumulate.fsproj +3 -2
- data/tracks/fsharp/exercises/acronym/Acronym.fs +1 -1
- data/tracks/fsharp/exercises/acronym/Acronym.fsproj +3 -2
- data/tracks/fsharp/exercises/acronym/AcronymTest.fs +13 -38
- data/tracks/fsharp/exercises/acronym/Example.fs +1 -1
- data/tracks/fsharp/exercises/all-your-base/AllYourBase.fsproj +3 -2
- data/tracks/fsharp/exercises/all-your-base/AllYourBaseTest.fs +64 -61
- data/tracks/fsharp/exercises/all-your-base/Example.fs +4 -1
- data/tracks/fsharp/exercises/allergies/Allergies.fs +2 -2
- data/tracks/fsharp/exercises/allergies/Allergies.fsproj +3 -2
- data/tracks/fsharp/exercises/allergies/AllergiesTest.fs +28 -37
- data/tracks/fsharp/exercises/allergies/Example.fs +3 -3
- data/tracks/fsharp/exercises/alphametics/Alphametics.fsproj +3 -2
- data/tracks/fsharp/exercises/anagram/Anagram.fsproj +3 -2
- data/tracks/fsharp/exercises/atbash-cipher/AtbashCipher.fs +4 -2
- data/tracks/fsharp/exercises/atbash-cipher/AtbashCipher.fsproj +3 -2
- data/tracks/fsharp/exercises/atbash-cipher/AtbashCipherTest.fs +38 -42
- data/tracks/fsharp/exercises/atbash-cipher/Example.fs +5 -3
- data/tracks/fsharp/exercises/bank-account/BankAccount.fsproj +3 -2
- data/tracks/fsharp/exercises/beer-song/BeerSong.fsproj +3 -2
- data/tracks/fsharp/exercises/beer-song/BeerSongTest.fs +36 -32
- data/tracks/fsharp/exercises/beer-song/Example.fs +2 -2
- data/tracks/fsharp/exercises/binary-search/BinarySearch.fsproj +3 -2
- data/tracks/fsharp/exercises/binary-search-tree/BinarySearchTree.fsproj +3 -2
- data/tracks/fsharp/exercises/bob/Bob.fs +1 -1
- data/tracks/fsharp/exercises/bob/Bob.fsproj +3 -2
- data/tracks/fsharp/exercises/bob/BobTest.fs +64 -20
- data/tracks/fsharp/exercises/bob/Example.fs +3 -4
- data/tracks/fsharp/exercises/book-store/BookStore.fs +1 -1
- data/tracks/fsharp/exercises/book-store/BookStore.fsproj +3 -2
- data/tracks/fsharp/exercises/book-store/BookStoreTest.fs +32 -25
- data/tracks/fsharp/exercises/book-store/Example.fs +1 -1
- data/tracks/fsharp/exercises/bowling/Bowling.fsproj +3 -2
- data/tracks/fsharp/exercises/bracket-push/BracketPush.fs +1 -1
- data/tracks/fsharp/exercises/bracket-push/BracketPush.fsproj +3 -2
- data/tracks/fsharp/exercises/bracket-push/BracketPushTest.fs +24 -25
- data/tracks/fsharp/exercises/bracket-push/Example.fs +1 -1
- data/tracks/fsharp/exercises/change/Change.fs +1 -1
- data/tracks/fsharp/exercises/change/Change.fsproj +3 -2
- data/tracks/fsharp/exercises/change/ChangeTest.fs +42 -18
- data/tracks/fsharp/exercises/change/Example.fs +7 -4
- data/tracks/fsharp/exercises/circular-buffer/CircularBuffer.fsproj +3 -2
- data/tracks/fsharp/exercises/clock/Clock.fsproj +3 -2
- data/tracks/fsharp/exercises/connect/Connect.fsproj +3 -2
- data/tracks/fsharp/exercises/crypto-square/CryptoSquare.fs +1 -40
- data/tracks/fsharp/exercises/crypto-square/CryptoSquare.fsproj +3 -2
- data/tracks/fsharp/exercises/crypto-square/CryptoSquareTest.fs +16 -40
- data/tracks/fsharp/exercises/crypto-square/Example.fs +13 -16
- data/tracks/fsharp/exercises/custom-set/CustomSet.fs +12 -12
- data/tracks/fsharp/exercises/custom-set/CustomSet.fsproj +3 -2
- data/tracks/fsharp/exercises/diamond/Diamond.fsproj +3 -2
- data/tracks/fsharp/exercises/difference-of-squares/DifferenceOfSquares.fs +2 -2
- data/tracks/fsharp/exercises/difference-of-squares/DifferenceOfSquares.fsproj +3 -2
- data/tracks/fsharp/exercises/difference-of-squares/DifferenceOfSquaresTest.fs +24 -20
- data/tracks/fsharp/exercises/difference-of-squares/Example.fs +3 -3
- data/tracks/fsharp/exercises/diffie-hellman/DiffieHellman.fsproj +3 -2
- data/tracks/fsharp/exercises/dominoes/Dominoes.fsproj +3 -2
- data/tracks/fsharp/exercises/dot-dsl/DotDsl.fsproj +3 -2
- data/tracks/fsharp/exercises/error-handling/ErrorHandling.fsproj +3 -2
- data/tracks/fsharp/exercises/etl/Etl.fsproj +3 -2
- data/tracks/fsharp/exercises/food-chain/FoodChain.fsproj +3 -2
- data/tracks/fsharp/exercises/forth/Forth.fsproj +3 -2
- data/tracks/fsharp/exercises/gigasecond/Example.fs +1 -3
- data/tracks/fsharp/exercises/gigasecond/Gigasecond.fs +1 -1
- data/tracks/fsharp/exercises/gigasecond/Gigasecond.fsproj +3 -2
- data/tracks/fsharp/exercises/gigasecond/GigasecondTest.fs +21 -12
- data/tracks/fsharp/exercises/go-counting/GoCounting.fsproj +3 -2
- data/tracks/fsharp/exercises/grade-school/GradeSchool.fsproj +3 -2
- data/tracks/fsharp/exercises/grains/Grains.fsproj +3 -2
- data/tracks/fsharp/exercises/grep/Grep.fsproj +3 -2
- data/tracks/fsharp/exercises/hamming/Hamming.fsproj +3 -2
- data/tracks/fsharp/exercises/hangman/Hangman.fsproj +3 -2
- data/tracks/fsharp/exercises/hello-world/HelloWorld.fsproj +3 -2
- data/tracks/fsharp/exercises/hello-world/HelloWorldTest.fs +6 -3
- data/tracks/fsharp/exercises/house/House.fsproj +3 -2
- data/tracks/fsharp/exercises/isogram/Example.fs +1 -1
- data/tracks/fsharp/exercises/isogram/Isogram.fs +1 -1
- data/tracks/fsharp/exercises/isogram/Isogram.fsproj +3 -2
- data/tracks/fsharp/exercises/isogram/IsogramTest.fs +16 -40
- data/tracks/fsharp/exercises/kindergarten-garden/Example.fs +6 -4
- data/tracks/fsharp/exercises/kindergarten-garden/KindergartenGarden.fs +3 -5
- data/tracks/fsharp/exercises/kindergarten-garden/KindergartenGarden.fsproj +3 -2
- data/tracks/fsharp/exercises/kindergarten-garden/KindergartenGardenTest.fs +100 -47
- data/tracks/fsharp/exercises/largest-series-product/LargestSeriesProduct.fsproj +3 -2
- data/tracks/fsharp/exercises/leap/Example.fs +2 -2
- data/tracks/fsharp/exercises/leap/Leap.fs +2 -2
- data/tracks/fsharp/exercises/leap/Leap.fsproj +3 -2
- data/tracks/fsharp/exercises/leap/LeapTest.fs +19 -15
- data/tracks/fsharp/exercises/ledger/Ledger.fsproj +3 -2
- data/tracks/fsharp/exercises/lens-person/LensPerson.fsproj +3 -2
- data/tracks/fsharp/exercises/linked-list/LinkedList.fsproj +3 -2
- data/tracks/fsharp/exercises/list-ops/ListOps.fsproj +3 -2
- data/tracks/fsharp/exercises/luhn/Luhn.fsproj +3 -2
- data/tracks/fsharp/exercises/luhn/LuhnTest.fs +30 -65
- data/tracks/fsharp/exercises/markdown/Markdown.fsproj +3 -2
- data/tracks/fsharp/exercises/matrix/Matrix.fsproj +3 -2
- data/tracks/fsharp/exercises/meetup/Meetup.fsproj +3 -2
- data/tracks/fsharp/exercises/minesweeper/Example.fs +9 -11
- data/tracks/fsharp/exercises/minesweeper/Minesweeper.fsproj +3 -2
- data/tracks/fsharp/exercises/minesweeper/MinesweeperTest.fs +117 -80
- data/tracks/fsharp/exercises/nth-prime/NthPrime.fsproj +3 -2
- data/tracks/fsharp/exercises/nucleotide-count/NucleotideCount.fsproj +3 -2
- data/tracks/fsharp/exercises/ocr-numbers/OcrNumbers.fsproj +3 -2
- data/tracks/fsharp/exercises/palindrome-products/PalindromeProducts.fsproj +3 -2
- data/tracks/fsharp/exercises/pangram/Pangram.fsproj +3 -2
- data/tracks/fsharp/exercises/pangram/PangramTest.fs +15 -27
- data/tracks/fsharp/exercises/parallel-letter-frequency/ParallelLetterFrequency.fsproj +3 -2
- data/tracks/fsharp/exercises/pascals-triangle/PascalsTriangle.fsproj +3 -2
- data/tracks/fsharp/exercises/perfect-numbers/PerfectNumbers.fsproj +3 -2
- data/tracks/fsharp/exercises/phone-number/PhoneNumber.fsproj +3 -2
- data/tracks/fsharp/exercises/pig-latin/Example.fs +1 -1
- data/tracks/fsharp/exercises/pig-latin/PigLatin.fsproj +3 -2
- data/tracks/fsharp/exercises/pig-latin/PigLatinTest.fs +64 -26
- data/tracks/fsharp/exercises/poker/Poker.fsproj +3 -2
- data/tracks/fsharp/exercises/pov/Pov.fsproj +3 -2
- data/tracks/fsharp/exercises/prime-factors/PrimeFactors.fsproj +3 -2
- data/tracks/fsharp/exercises/protein-translation/ProteinTranslation.fsproj +3 -2
- data/tracks/fsharp/exercises/proverb/Proverb.fsproj +3 -2
- data/tracks/fsharp/exercises/pythagorean-triplet/PythagoreanTriplet.fsproj +3 -2
- data/tracks/fsharp/exercises/queen-attack/Example.fs +3 -1
- data/tracks/fsharp/exercises/queen-attack/QueenAttack.fs +2 -0
- data/tracks/fsharp/exercises/queen-attack/QueenAttack.fsproj +3 -2
- data/tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs +50 -20
- data/tracks/fsharp/exercises/rail-fence-cipher/RailFenceCipher.fsproj +3 -2
- data/tracks/fsharp/exercises/raindrops/Raindrops.fsproj +3 -2
- data/tracks/fsharp/exercises/raindrops/RaindropsTest.fs +77 -37
- data/tracks/fsharp/exercises/react/React.fsproj +3 -2
- data/tracks/fsharp/exercises/rectangles/Rectangles.fsproj +3 -2
- data/tracks/fsharp/exercises/rna-transcription/Example.fs +15 -7
- data/tracks/fsharp/exercises/rna-transcription/RnaTranscription.fs +2 -2
- data/tracks/fsharp/exercises/rna-transcription/RnaTranscription.fsproj +3 -2
- data/tracks/fsharp/exercises/rna-transcription/RnaTranscriptionTest.fs +29 -14
- data/tracks/fsharp/exercises/robot-name/RobotName.fsproj +3 -2
- data/tracks/fsharp/exercises/robot-simulator/RobotSimulator.fsproj +3 -2
- data/tracks/fsharp/exercises/roman-numerals/Example.fs +2 -2
- data/tracks/fsharp/exercises/roman-numerals/RomanNumerals.fs +2 -2
- data/tracks/fsharp/exercises/roman-numerals/RomanNumerals.fsproj +3 -2
- data/tracks/fsharp/exercises/roman-numerals/RomanNumeralsTest.fs +79 -26
- data/tracks/fsharp/exercises/run-length-encoding/RunLengthEncoding.fsproj +3 -2
- data/tracks/fsharp/exercises/saddle-points/SaddlePoints.fsproj +3 -2
- data/tracks/fsharp/exercises/say/Say.fsproj +3 -2
- data/tracks/fsharp/exercises/scale-generator/ScaleGenerator.fsproj +3 -2
- data/tracks/fsharp/exercises/scrabble-score/ScrabbleScore.fsproj +3 -2
- data/tracks/fsharp/exercises/scrabble-score/ScrabbleScoreTest.fs +33 -17
- data/tracks/fsharp/exercises/secret-handshake/SecretHandshake.fsproj +3 -2
- data/tracks/fsharp/exercises/series/Series.fsproj +3 -2
- data/tracks/fsharp/exercises/sgf-parsing/SgfParsing.fsproj +3 -2
- data/tracks/fsharp/exercises/sieve/Sieve.fsproj +3 -2
- data/tracks/fsharp/exercises/simple-cipher/SimpleCipher.fsproj +3 -2
- data/tracks/fsharp/exercises/simple-linked-list/SimpleLinkedList.fsproj +3 -2
- data/tracks/fsharp/exercises/space-age/SpaceAge.fsproj +3 -2
- data/tracks/fsharp/exercises/strain/Strain.fsproj +3 -2
- data/tracks/fsharp/exercises/sublist/Sublist.fsproj +3 -2
- data/tracks/fsharp/exercises/sum-of-multiples/SumOfMultiples.fsproj +3 -2
- data/tracks/fsharp/exercises/tournament/Tournament.fsproj +3 -2
- data/tracks/fsharp/exercises/transpose/Transpose.fsproj +3 -2
- data/tracks/fsharp/exercises/tree-building/TreeBuilding.fsproj +3 -2
- data/tracks/fsharp/exercises/triangle/Triangle.fsproj +3 -2
- data/tracks/fsharp/exercises/twelve-days/TwelveDays.fsproj +3 -2
- data/tracks/fsharp/exercises/two-bucket/TwoBucket.fsproj +3 -2
- data/tracks/fsharp/exercises/two-fer/TwoFer.fsproj +3 -2
- data/tracks/fsharp/exercises/variable-length-quantity/VariableLengthQuantity.fsproj +3 -2
- data/tracks/fsharp/exercises/word-count/WordCount.fsproj +3 -2
- data/tracks/fsharp/exercises/word-search/WordSearch.fsproj +3 -2
- data/tracks/fsharp/exercises/wordy/Wordy.fsproj +3 -2
- data/tracks/fsharp/exercises/zebra-puzzle/ZebraPuzzle.fsproj +3 -2
- data/tracks/fsharp/exercises/zipper/Zipper.fsproj +3 -2
- data/tracks/fsharp/generators/Common.fs +96 -0
- data/tracks/fsharp/generators/Exercise.fs +250 -0
- data/tracks/fsharp/generators/Generators.fs +210 -0
- data/tracks/fsharp/generators/Generators.fsproj +32 -0
- data/tracks/fsharp/generators/Generators.sln +24 -0
- data/tracks/fsharp/generators/Input.fs +99 -0
- data/tracks/fsharp/generators/Options.fs +31 -0
- data/tracks/fsharp/generators/Output.fs +224 -0
- data/tracks/fsharp/generators/Program.fs +35 -0
- data/tracks/fsharp/generators/Properties/launchSettings.json +8 -0
- data/tracks/fsharp/generators/Templates/_AssertEmpty.liquid +1 -0
- data/tracks/fsharp/generators/Templates/_AssertEqual.liquid +1 -0
- data/tracks/fsharp/generators/Templates/_TestClass.liquid +13 -0
- data/tracks/fsharp/generators/Templates/_TestMethod.liquid +3 -0
- data/tracks/fsharp/generators/Templates/_TestMethodBody.liquid +4 -0
- data/tracks/go/.travis.yml +3 -3
- data/tracks/groovy/CONTRIBUTING.md +2 -2
- data/tracks/groovy/config.json +12 -0
- data/tracks/groovy/exercises/scrabble-score/Example.groovy +18 -0
- data/tracks/groovy/exercises/scrabble-score/README.md +63 -0
- data/tracks/groovy/exercises/scrabble-score/ScrabbleScore.groovy +7 -0
- data/tracks/groovy/exercises/scrabble-score/ScrabbleScoreSpec.groovy +45 -0
- data/tracks/groovy/exercises/two-fer/TwoFer.groovy +2 -2
- data/tracks/haskell/exercises/change/README.md +1 -1
- data/tracks/haskell/exercises/lens-person/README.md +1 -1
- data/tracks/haskell/exercises/palindrome-products/README.md +5 -12
- data/tracks/haskell/exercises/sum-of-multiples/README.md +0 -3
- data/tracks/idris/config.json +12 -0
- data/tracks/idris/exercises/accumulate/Accumulate.ipkg +5 -0
- data/tracks/idris/exercises/accumulate/Makefile +23 -0
- data/tracks/idris/exercises/accumulate/README.md +32 -0
- data/tracks/idris/exercises/accumulate/src/Example.idr +6 -0
- data/tracks/idris/exercises/accumulate/src/Test/Accumulate.idr +35 -0
- data/tracks/java/config/maintainers.json +4 -7
- data/tracks/java/config.json +99 -22
- data/tracks/java/exercises/binary-search-tree/.meta/src/reference/java/{BST.java → BinarySearchTree.java} +1 -1
- data/tracks/java/exercises/binary-search-tree/src/test/java/{BSTTest.java → BinarySearchTreeTest.java} +34 -36
- data/tracks/java/exercises/robot-simulator/src/main/java/GridPosition.java +19 -15
- data/tracks/java/exercises/saddle-points/.meta/src/reference/java/MatrixCoordinate.java +7 -1
- data/tracks/java/exercises/saddle-points/src/main/java/MatrixCoordinate.java +7 -1
- data/tracks/java/exercises/settings.gradle +1 -0
- data/tracks/java/exercises/tournament/.meta/src/reference/java/Result.java +5 -0
- data/tracks/java/exercises/tournament/.meta/src/reference/java/TeamResult.java +41 -0
- data/tracks/java/exercises/tournament/.meta/src/reference/java/Tournament.java +62 -0
- data/tracks/java/exercises/tournament/README.md +78 -0
- data/tracks/java/exercises/tournament/build.gradle +18 -0
- data/tracks/java/{.Rhistory → exercises/tournament/src/main/java/.keep} +0 -0
- data/tracks/java/exercises/tournament/src/test/java/TournamentTest.java +160 -0
- data/tracks/php/config.json +14 -0
- data/tracks/php/exercises/collatz-conjecture/collatz-conjecture_test.php +44 -0
- data/tracks/php/exercises/collatz-conjecture/example.php +18 -0
- data/tracks/python/exercises/circular-buffer/circular_buffer.py +1 -1
- data/tracks/python/exercises/clock/clock.py +1 -1
- data/tracks/python/exercises/etl/etl.py +1 -1
- data/tracks/python/exercises/grade-school/grade_school.py +1 -1
- data/tracks/python/exercises/grains/grains.py +2 -2
- data/tracks/python/exercises/kindergarten-garden/kindergarten_garden.py +1 -1
- data/tracks/python/exercises/linked-list/linked_list.py +1 -1
- data/tracks/python/exercises/rectangles/rectangles.py +1 -1
- data/tracks/python/exercises/sum-of-multiples/sum_of_multiples.py +1 -1
- data/tracks/rust/exercises/bob/tests/bob.rs +1 -0
- data/tracks/rust/exercises/crypto-square/tests/crypto-square.rs +7 -0
- data/tracks/rust/exercises/gigasecond/tests/gigasecond.rs +1 -1
- data/tracks/rust/exercises/phone-number/Cargo.lock +1 -1
- data/tracks/rust/exercises/phone-number/Cargo.toml +1 -1
- data/tracks/rust/exercises/phone-number/example.rs +17 -23
- data/tracks/rust/exercises/phone-number/tests/phone-number.rs +31 -40
- data/tracks/rust/exercises/say/tests/say.rs +2 -0
- data/tracks/rust/exercises/sum-of-multiples/README.md +0 -3
- data/tracks/scala/config.json +11 -0
- data/tracks/scala/exercises/collatz-conjecture/README.md +43 -0
- data/tracks/scala/exercises/collatz-conjecture/build.sbt +3 -0
- data/tracks/scala/exercises/collatz-conjecture/example.scala +17 -0
- data/tracks/scala/exercises/collatz-conjecture/src/main/scala/.keep +0 -0
- data/tracks/scala/exercises/collatz-conjecture/src/test/scala/CollatzConjectureTest.scala +34 -0
- data/tracks/scala/testgen/src/main/scala/CollatzConjectureTestGenerator.scala +35 -0
- data/tracks/scheme/config.json +8 -0
- data/tracks/scheme/exercises/word-count/README.md +19 -0
- data/tracks/scheme/exercises/word-count/example.scm +27 -0
- data/tracks/scheme/exercises/word-count/word-count-test.scm +90 -0
- data/tracks/scheme/exercises/word-count/word-count.scm +5 -0
- data/tracks/sml/README.md +20 -1
- data/tracks/sml/bin/generate +74 -20
- data/tracks/sml/exercises/binary/README.md +23 -5
- data/tracks/sml/exercises/binary/binary.sml +2 -0
- data/tracks/sml/exercises/binary/example.sml +10 -21
- data/tracks/sml/exercises/binary/test.sml +55 -30
- data/tracks/sml/exercises/binary/testlib.sml +159 -0
- data/tracks/sml/exercises/flatten-array/HINTS.md +8 -0
- data/tracks/sml/exercises/flatten-array/README.md +31 -6
- data/tracks/sml/exercises/flatten-array/example.sml +3 -4
- data/tracks/sml/exercises/flatten-array/flatten-array.sml +4 -5
- data/tracks/sml/exercises/flatten-array/test.sml +76 -52
- data/tracks/sml/exercises/flatten-array/testlib.sml +159 -0
- data/tracks/sml/exercises/nth-prime/HINTS.md +9 -0
- data/tracks/sml/exercises/nth-prime/README.md +32 -5
- data/tracks/sml/exercises/nth-prime/example.sml +28 -46
- data/tracks/sml/exercises/nth-prime/nth-prime.sml +1 -1
- data/tracks/sml/exercises/nth-prime/test.sml +19 -63
- data/tracks/sml/exercises/nth-prime/testlib.sml +159 -0
- data/tracks/sml/exercises/raindrops/README.md +21 -5
- data/tracks/typescript/config.json +14 -0
- data/tracks/typescript/exercises/triangle/README.md +55 -0
- data/tracks/typescript/exercises/triangle/package.json +36 -0
- data/tracks/typescript/exercises/triangle/triangle.example.ts +56 -0
- data/tracks/typescript/exercises/triangle/triangle.test.ts +79 -0
- data/tracks/typescript/exercises/triangle/triangle.ts +12 -0
- data/tracks/typescript/exercises/triangle/tsconfig.json +22 -0
- data/tracks/typescript/exercises/triangle/tslint.json +127 -0
- data/tracks/typescript/exercises/triangle/yarn.lock +2305 -0
- metadata +85 -6
- data/tracks/d/exercises/crypto-square/.dub/dub.json +0 -6
@@ -14,9 +14,10 @@
|
|
14
14
|
|
15
15
|
<ItemGroup>
|
16
16
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
17
|
-
<PackageReference Include="xunit" Version="2.3.0
|
18
|
-
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0
|
17
|
+
<PackageReference Include="xunit" Version="2.3.0" />
|
18
|
+
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0" />
|
19
19
|
<PackageReference Include="FsUnit.xUnit" Version="3.0.0" />
|
20
|
+
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0" />
|
20
21
|
</ItemGroup>
|
21
22
|
|
22
23
|
</Project>
|
@@ -14,9 +14,10 @@
|
|
14
14
|
|
15
15
|
<ItemGroup>
|
16
16
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
17
|
-
<PackageReference Include="xunit" Version="2.3.0
|
18
|
-
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0
|
17
|
+
<PackageReference Include="xunit" Version="2.3.0" />
|
18
|
+
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0" />
|
19
19
|
<PackageReference Include="FsUnit.xUnit" Version="3.0.0" />
|
20
|
+
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0" />
|
20
21
|
</ItemGroup>
|
21
22
|
|
22
23
|
</Project>
|
@@ -1,45 +1,49 @@
|
|
1
|
+
// This file was auto-generated based on version 1.0.0 of the canonical data.
|
2
|
+
|
1
3
|
module BeerSongTest
|
2
4
|
|
3
|
-
open Xunit
|
4
5
|
open FsUnit.Xunit
|
6
|
+
open Xunit
|
7
|
+
|
5
8
|
open BeerSong
|
6
|
-
|
9
|
+
|
7
10
|
[<Fact>]
|
8
|
-
let ``
|
9
|
-
let expected =
|
10
|
-
|
11
|
-
|
12
|
-
|
11
|
+
let ``First generic verse`` () =
|
12
|
+
let expected = "99 bottles of beer on the wall, 99 bottles of beer.\nTake one down and pass it around, 98 bottles of beer on the wall.\n"
|
13
|
+
verse 99 |> should equal expected
|
14
|
+
|
13
15
|
[<Fact(Skip = "Remove to run test")>]
|
14
|
-
let ``
|
15
|
-
let expected =
|
16
|
-
"3 bottles of beer on the wall, 3 bottles of beer.\nTake one down and pass it around, 2 bottles of beer on the wall.\n"
|
16
|
+
let ``Last generic verse`` () =
|
17
|
+
let expected = "3 bottles of beer on the wall, 3 bottles of beer.\nTake one down and pass it around, 2 bottles of beer on the wall.\n"
|
17
18
|
verse 3 |> should equal expected
|
18
|
-
|
19
|
-
[<Fact(Skip = "Remove to run test")>]
|
20
|
-
let ``Test verse 1`` () =
|
21
|
-
let expected =
|
22
|
-
"1 bottle of beer on the wall, 1 bottle of beer.\nTake it down and pass it around, no more bottles of beer on the wall.\n"
|
23
|
-
verse 1 |> should equal expected
|
24
|
-
|
19
|
+
|
25
20
|
[<Fact(Skip = "Remove to run test")>]
|
26
|
-
let ``
|
27
|
-
let expected =
|
28
|
-
"2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n"
|
21
|
+
let ``Verse 2`` () =
|
22
|
+
let expected = "2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n"
|
29
23
|
verse 2 |> should equal expected
|
30
|
-
|
24
|
+
|
31
25
|
[<Fact(Skip = "Remove to run test")>]
|
32
|
-
let ``
|
33
|
-
let expected =
|
34
|
-
|
26
|
+
let ``Verse 1`` () =
|
27
|
+
let expected = "1 bottle of beer on the wall, 1 bottle of beer.\nTake it down and pass it around, no more bottles of beer on the wall.\n"
|
28
|
+
verse 1 |> should equal expected
|
29
|
+
|
30
|
+
[<Fact(Skip = "Remove to run test")>]
|
31
|
+
let ``Verse 0`` () =
|
32
|
+
let expected = "No more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.\n"
|
35
33
|
verse 0 |> should equal expected
|
36
|
-
|
34
|
+
|
37
35
|
[<Fact(Skip = "Remove to run test")>]
|
38
|
-
let ``
|
39
|
-
let expected =
|
40
|
-
|
41
|
-
|
42
|
-
|
36
|
+
let ``First two verses`` () =
|
37
|
+
let expected = "99 bottles of beer on the wall, 99 bottles of beer.\nTake one down and pass it around, 98 bottles of beer on the wall.\n\n98 bottles of beer on the wall, 98 bottles of beer.\nTake one down and pass it around, 97 bottles of beer on the wall.\n"
|
38
|
+
verses 99 98 |> should equal expected
|
39
|
+
|
40
|
+
[<Fact(Skip = "Remove to run test")>]
|
41
|
+
let ``Last three verses`` () =
|
42
|
+
let expected = "2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n\n1 bottle of beer on the wall, 1 bottle of beer.\nTake it down and pass it around, no more bottles of beer on the wall.\n\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.\n"
|
43
|
+
verses 2 0 |> should equal expected
|
44
|
+
|
43
45
|
[<Fact(Skip = "Remove to run test")>]
|
44
|
-
let ``
|
45
|
-
verses 99 0 |> should equal sing
|
46
|
+
let ``All verses`` () =
|
47
|
+
let expected = "99 bottles of beer on the wall, 99 bottles of beer.\nTake one down and pass it around, 98 bottles of beer on the wall.\n\n98 bottles of beer on the wall, 98 bottles of beer.\nTake one down and pass it around, 97 bottles of beer on the wall.\n\n97 bottles of beer on the wall, 97 bottles of beer.\nTake one down and pass it around, 96 bottles of beer on the wall.\n\n96 bottles of beer on the wall, 96 bottles of beer.\nTake one down and pass it around, 95 bottles of beer on the wall.\n\n95 bottles of beer on the wall, 95 bottles of beer.\nTake one down and pass it around, 94 bottles of beer on the wall.\n\n94 bottles of beer on the wall, 94 bottles of beer.\nTake one down and pass it around, 93 bottles of beer on the wall.\n\n93 bottles of beer on the wall, 93 bottles of beer.\nTake one down and pass it around, 92 bottles of beer on the wall.\n\n92 bottles of beer on the wall, 92 bottles of beer.\nTake one down and pass it around, 91 bottles of beer on the wall.\n\n91 bottles of beer on the wall, 91 bottles of beer.\nTake one down and pass it around, 90 bottles of beer on the wall.\n\n90 bottles of beer on the wall, 90 bottles of beer.\nTake one down and pass it around, 89 bottles of beer on the wall.\n\n89 bottles of beer on the wall, 89 bottles of beer.\nTake one down and pass it around, 88 bottles of beer on the wall.\n\n88 bottles of beer on the wall, 88 bottles of beer.\nTake one down and pass it around, 87 bottles of beer on the wall.\n\n87 bottles of beer on the wall, 87 bottles of beer.\nTake one down and pass it around, 86 bottles of beer on the wall.\n\n86 bottles of beer on the wall, 86 bottles of beer.\nTake one down and pass it around, 85 bottles of beer on the wall.\n\n85 bottles of beer on the wall, 85 bottles of beer.\nTake one down and pass it around, 84 bottles of beer on the wall.\n\n84 bottles of beer on the wall, 84 bottles of beer.\nTake one down and pass it around, 83 bottles of beer on the wall.\n\n83 bottles of beer on the wall, 83 bottles of beer.\nTake one down and pass it around, 82 bottles of beer on the wall.\n\n82 bottles of beer on the wall, 82 bottles of beer.\nTake one down and pass it around, 81 bottles of beer on the wall.\n\n81 bottles of beer on the wall, 81 bottles of beer.\nTake one down and pass it around, 80 bottles of beer on the wall.\n\n80 bottles of beer on the wall, 80 bottles of beer.\nTake one down and pass it around, 79 bottles of beer on the wall.\n\n79 bottles of beer on the wall, 79 bottles of beer.\nTake one down and pass it around, 78 bottles of beer on the wall.\n\n78 bottles of beer on the wall, 78 bottles of beer.\nTake one down and pass it around, 77 bottles of beer on the wall.\n\n77 bottles of beer on the wall, 77 bottles of beer.\nTake one down and pass it around, 76 bottles of beer on the wall.\n\n76 bottles of beer on the wall, 76 bottles of beer.\nTake one down and pass it around, 75 bottles of beer on the wall.\n\n75 bottles of beer on the wall, 75 bottles of beer.\nTake one down and pass it around, 74 bottles of beer on the wall.\n\n74 bottles of beer on the wall, 74 bottles of beer.\nTake one down and pass it around, 73 bottles of beer on the wall.\n\n73 bottles of beer on the wall, 73 bottles of beer.\nTake one down and pass it around, 72 bottles of beer on the wall.\n\n72 bottles of beer on the wall, 72 bottles of beer.\nTake one down and pass it around, 71 bottles of beer on the wall.\n\n71 bottles of beer on the wall, 71 bottles of beer.\nTake one down and pass it around, 70 bottles of beer on the wall.\n\n70 bottles of beer on the wall, 70 bottles of beer.\nTake one down and pass it around, 69 bottles of beer on the wall.\n\n69 bottles of beer on the wall, 69 bottles of beer.\nTake one down and pass it around, 68 bottles of beer on the wall.\n\n68 bottles of beer on the wall, 68 bottles of beer.\nTake one down and pass it around, 67 bottles of beer on the wall.\n\n67 bottles of beer on the wall, 67 bottles of beer.\nTake one down and pass it around, 66 bottles of beer on the wall.\n\n66 bottles of beer on the wall, 66 bottles of beer.\nTake one down and pass it around, 65 bottles of beer on the wall.\n\n65 bottles of beer on the wall, 65 bottles of beer.\nTake one down and pass it around, 64 bottles of beer on the wall.\n\n64 bottles of beer on the wall, 64 bottles of beer.\nTake one down and pass it around, 63 bottles of beer on the wall.\n\n63 bottles of beer on the wall, 63 bottles of beer.\nTake one down and pass it around, 62 bottles of beer on the wall.\n\n62 bottles of beer on the wall, 62 bottles of beer.\nTake one down and pass it around, 61 bottles of beer on the wall.\n\n61 bottles of beer on the wall, 61 bottles of beer.\nTake one down and pass it around, 60 bottles of beer on the wall.\n\n60 bottles of beer on the wall, 60 bottles of beer.\nTake one down and pass it around, 59 bottles of beer on the wall.\n\n59 bottles of beer on the wall, 59 bottles of beer.\nTake one down and pass it around, 58 bottles of beer on the wall.\n\n58 bottles of beer on the wall, 58 bottles of beer.\nTake one down and pass it around, 57 bottles of beer on the wall.\n\n57 bottles of beer on the wall, 57 bottles of beer.\nTake one down and pass it around, 56 bottles of beer on the wall.\n\n56 bottles of beer on the wall, 56 bottles of beer.\nTake one down and pass it around, 55 bottles of beer on the wall.\n\n55 bottles of beer on the wall, 55 bottles of beer.\nTake one down and pass it around, 54 bottles of beer on the wall.\n\n54 bottles of beer on the wall, 54 bottles of beer.\nTake one down and pass it around, 53 bottles of beer on the wall.\n\n53 bottles of beer on the wall, 53 bottles of beer.\nTake one down and pass it around, 52 bottles of beer on the wall.\n\n52 bottles of beer on the wall, 52 bottles of beer.\nTake one down and pass it around, 51 bottles of beer on the wall.\n\n51 bottles of beer on the wall, 51 bottles of beer.\nTake one down and pass it around, 50 bottles of beer on the wall.\n\n50 bottles of beer on the wall, 50 bottles of beer.\nTake one down and pass it around, 49 bottles of beer on the wall.\n\n49 bottles of beer on the wall, 49 bottles of beer.\nTake one down and pass it around, 48 bottles of beer on the wall.\n\n48 bottles of beer on the wall, 48 bottles of beer.\nTake one down and pass it around, 47 bottles of beer on the wall.\n\n47 bottles of beer on the wall, 47 bottles of beer.\nTake one down and pass it around, 46 bottles of beer on the wall.\n\n46 bottles of beer on the wall, 46 bottles of beer.\nTake one down and pass it around, 45 bottles of beer on the wall.\n\n45 bottles of beer on the wall, 45 bottles of beer.\nTake one down and pass it around, 44 bottles of beer on the wall.\n\n44 bottles of beer on the wall, 44 bottles of beer.\nTake one down and pass it around, 43 bottles of beer on the wall.\n\n43 bottles of beer on the wall, 43 bottles of beer.\nTake one down and pass it around, 42 bottles of beer on the wall.\n\n42 bottles of beer on the wall, 42 bottles of beer.\nTake one down and pass it around, 41 bottles of beer on the wall.\n\n41 bottles of beer on the wall, 41 bottles of beer.\nTake one down and pass it around, 40 bottles of beer on the wall.\n\n40 bottles of beer on the wall, 40 bottles of beer.\nTake one down and pass it around, 39 bottles of beer on the wall.\n\n39 bottles of beer on the wall, 39 bottles of beer.\nTake one down and pass it around, 38 bottles of beer on the wall.\n\n38 bottles of beer on the wall, 38 bottles of beer.\nTake one down and pass it around, 37 bottles of beer on the wall.\n\n37 bottles of beer on the wall, 37 bottles of beer.\nTake one down and pass it around, 36 bottles of beer on the wall.\n\n36 bottles of beer on the wall, 36 bottles of beer.\nTake one down and pass it around, 35 bottles of beer on the wall.\n\n35 bottles of beer on the wall, 35 bottles of beer.\nTake one down and pass it around, 34 bottles of beer on the wall.\n\n34 bottles of beer on the wall, 34 bottles of beer.\nTake one down and pass it around, 33 bottles of beer on the wall.\n\n33 bottles of beer on the wall, 33 bottles of beer.\nTake one down and pass it around, 32 bottles of beer on the wall.\n\n32 bottles of beer on the wall, 32 bottles of beer.\nTake one down and pass it around, 31 bottles of beer on the wall.\n\n31 bottles of beer on the wall, 31 bottles of beer.\nTake one down and pass it around, 30 bottles of beer on the wall.\n\n30 bottles of beer on the wall, 30 bottles of beer.\nTake one down and pass it around, 29 bottles of beer on the wall.\n\n29 bottles of beer on the wall, 29 bottles of beer.\nTake one down and pass it around, 28 bottles of beer on the wall.\n\n28 bottles of beer on the wall, 28 bottles of beer.\nTake one down and pass it around, 27 bottles of beer on the wall.\n\n27 bottles of beer on the wall, 27 bottles of beer.\nTake one down and pass it around, 26 bottles of beer on the wall.\n\n26 bottles of beer on the wall, 26 bottles of beer.\nTake one down and pass it around, 25 bottles of beer on the wall.\n\n25 bottles of beer on the wall, 25 bottles of beer.\nTake one down and pass it around, 24 bottles of beer on the wall.\n\n24 bottles of beer on the wall, 24 bottles of beer.\nTake one down and pass it around, 23 bottles of beer on the wall.\n\n23 bottles of beer on the wall, 23 bottles of beer.\nTake one down and pass it around, 22 bottles of beer on the wall.\n\n22 bottles of beer on the wall, 22 bottles of beer.\nTake one down and pass it around, 21 bottles of beer on the wall.\n\n21 bottles of beer on the wall, 21 bottles of beer.\nTake one down and pass it around, 20 bottles of beer on the wall.\n\n20 bottles of beer on the wall, 20 bottles of beer.\nTake one down and pass it around, 19 bottles of beer on the wall.\n\n19 bottles of beer on the wall, 19 bottles of beer.\nTake one down and pass it around, 18 bottles of beer on the wall.\n\n18 bottles of beer on the wall, 18 bottles of beer.\nTake one down and pass it around, 17 bottles of beer on the wall.\n\n17 bottles of beer on the wall, 17 bottles of beer.\nTake one down and pass it around, 16 bottles of beer on the wall.\n\n16 bottles of beer on the wall, 16 bottles of beer.\nTake one down and pass it around, 15 bottles of beer on the wall.\n\n15 bottles of beer on the wall, 15 bottles of beer.\nTake one down and pass it around, 14 bottles of beer on the wall.\n\n14 bottles of beer on the wall, 14 bottles of beer.\nTake one down and pass it around, 13 bottles of beer on the wall.\n\n13 bottles of beer on the wall, 13 bottles of beer.\nTake one down and pass it around, 12 bottles of beer on the wall.\n\n12 bottles of beer on the wall, 12 bottles of beer.\nTake one down and pass it around, 11 bottles of beer on the wall.\n\n11 bottles of beer on the wall, 11 bottles of beer.\nTake one down and pass it around, 10 bottles of beer on the wall.\n\n10 bottles of beer on the wall, 10 bottles of beer.\nTake one down and pass it around, 9 bottles of beer on the wall.\n\n9 bottles of beer on the wall, 9 bottles of beer.\nTake one down and pass it around, 8 bottles of beer on the wall.\n\n8 bottles of beer on the wall, 8 bottles of beer.\nTake one down and pass it around, 7 bottles of beer on the wall.\n\n7 bottles of beer on the wall, 7 bottles of beer.\nTake one down and pass it around, 6 bottles of beer on the wall.\n\n6 bottles of beer on the wall, 6 bottles of beer.\nTake one down and pass it around, 5 bottles of beer on the wall.\n\n5 bottles of beer on the wall, 5 bottles of beer.\nTake one down and pass it around, 4 bottles of beer on the wall.\n\n4 bottles of beer on the wall, 4 bottles of beer.\nTake one down and pass it around, 3 bottles of beer on the wall.\n\n3 bottles of beer on the wall, 3 bottles of beer.\nTake one down and pass it around, 2 bottles of beer on the wall.\n\n2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n\n1 bottle of beer on the wall, 1 bottle of beer.\nTake it down and pass it around, no more bottles of beer on the wall.\n\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.\n"
|
48
|
+
verses 99 0 |> should equal expected
|
49
|
+
|
@@ -14,9 +14,10 @@
|
|
14
14
|
|
15
15
|
<ItemGroup>
|
16
16
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
17
|
-
<PackageReference Include="xunit" Version="2.3.0
|
18
|
-
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0
|
17
|
+
<PackageReference Include="xunit" Version="2.3.0" />
|
18
|
+
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0" />
|
19
19
|
<PackageReference Include="FsUnit.xUnit" Version="3.0.0" />
|
20
|
+
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0" />
|
20
21
|
</ItemGroup>
|
21
22
|
|
22
23
|
</Project>
|
@@ -14,9 +14,10 @@
|
|
14
14
|
|
15
15
|
<ItemGroup>
|
16
16
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
17
|
-
<PackageReference Include="xunit" Version="2.3.0
|
18
|
-
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0
|
17
|
+
<PackageReference Include="xunit" Version="2.3.0" />
|
18
|
+
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0" />
|
19
19
|
<PackageReference Include="FsUnit.xUnit" Version="3.0.0" />
|
20
|
+
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0" />
|
20
21
|
</ItemGroup>
|
21
22
|
|
22
23
|
</Project>
|
@@ -14,9 +14,10 @@
|
|
14
14
|
|
15
15
|
<ItemGroup>
|
16
16
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
17
|
-
<PackageReference Include="xunit" Version="2.3.0
|
18
|
-
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0
|
17
|
+
<PackageReference Include="xunit" Version="2.3.0" />
|
18
|
+
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0" />
|
19
19
|
<PackageReference Include="FsUnit.xUnit" Version="3.0.0" />
|
20
|
+
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0" />
|
20
21
|
</ItemGroup>
|
21
22
|
|
22
23
|
</Project>
|
@@ -1,65 +1,109 @@
|
|
1
|
+
// This file was auto-generated based on version 1.0.0 of the canonical data.
|
2
|
+
|
1
3
|
module BobTest
|
2
4
|
|
3
|
-
open Xunit
|
4
5
|
open FsUnit.Xunit
|
6
|
+
open Xunit
|
7
|
+
|
5
8
|
open Bob
|
6
|
-
|
9
|
+
|
7
10
|
[<Fact>]
|
8
11
|
let ``Stating something`` () =
|
9
|
-
|
12
|
+
response "Tom-ay-to, tom-aaaah-to." |> should equal "Whatever."
|
10
13
|
|
11
14
|
[<Fact(Skip = "Remove to run test")>]
|
12
15
|
let ``Shouting`` () =
|
13
|
-
|
16
|
+
response "WATCH OUT!" |> should equal "Whoa, chill out!"
|
17
|
+
|
18
|
+
[<Fact(Skip = "Remove to run test")>]
|
19
|
+
let ``Shouting gibberish`` () =
|
20
|
+
response "FCECDFCAAB" |> should equal "Whoa, chill out!"
|
14
21
|
|
15
22
|
[<Fact(Skip = "Remove to run test")>]
|
16
23
|
let ``Asking a question`` () =
|
17
|
-
|
24
|
+
response "Does this cryogenic chamber make me look fat?" |> should equal "Sure."
|
18
25
|
|
19
26
|
[<Fact(Skip = "Remove to run test")>]
|
20
27
|
let ``Asking a numeric question`` () =
|
21
|
-
|
28
|
+
response "You are, what, like 15?" |> should equal "Sure."
|
29
|
+
|
30
|
+
[<Fact(Skip = "Remove to run test")>]
|
31
|
+
let ``Asking gibberish`` () =
|
32
|
+
response "fffbbcbeab?" |> should equal "Sure."
|
33
|
+
|
34
|
+
[<Fact(Skip = "Remove to run test")>]
|
35
|
+
let ``Talking forcefully`` () =
|
36
|
+
response "Let's go make out behind the gym!" |> should equal "Whatever."
|
37
|
+
|
38
|
+
[<Fact(Skip = "Remove to run test")>]
|
39
|
+
let ``Using acronyms in regular speech`` () =
|
40
|
+
response "It's OK if you don't want to go to the DMV." |> should equal "Whatever."
|
22
41
|
|
23
42
|
[<Fact(Skip = "Remove to run test")>]
|
24
|
-
let ``Forceful
|
25
|
-
|
43
|
+
let ``Forceful question`` () =
|
44
|
+
response "WHAT THE HELL WERE YOU THINKING?" |> should equal "Whoa, chill out!"
|
26
45
|
|
27
46
|
[<Fact(Skip = "Remove to run test")>]
|
28
47
|
let ``Shouting numbers`` () =
|
29
|
-
|
48
|
+
response "1, 2, 3 GO!" |> should equal "Whoa, chill out!"
|
30
49
|
|
31
50
|
[<Fact(Skip = "Remove to run test")>]
|
32
51
|
let ``Only numbers`` () =
|
33
|
-
|
52
|
+
response "1, 2, 3" |> should equal "Whatever."
|
34
53
|
|
35
54
|
[<Fact(Skip = "Remove to run test")>]
|
36
|
-
let ``Question only
|
37
|
-
|
55
|
+
let ``Question with only numbers`` () =
|
56
|
+
response "4?" |> should equal "Sure."
|
38
57
|
|
39
58
|
[<Fact(Skip = "Remove to run test")>]
|
40
59
|
let ``Shouting with special characters`` () =
|
41
|
-
|
60
|
+
response "ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!" |> should equal "Whoa, chill out!"
|
42
61
|
|
43
62
|
[<Fact(Skip = "Remove to run test")>]
|
44
|
-
let ``Shouting with no
|
45
|
-
|
63
|
+
let ``Shouting with no exclamation mark`` () =
|
64
|
+
response "I HATE YOU" |> should equal "Whoa, chill out!"
|
46
65
|
|
47
66
|
[<Fact(Skip = "Remove to run test")>]
|
48
67
|
let ``Statement containing question mark`` () =
|
49
|
-
|
68
|
+
response "Ending with ? means a question." |> should equal "Whatever."
|
69
|
+
|
70
|
+
[<Fact(Skip = "Remove to run test")>]
|
71
|
+
let ``Non-letters with question`` () =
|
72
|
+
response ":) ?" |> should equal "Sure."
|
50
73
|
|
51
74
|
[<Fact(Skip = "Remove to run test")>]
|
52
75
|
let ``Prattling on`` () =
|
53
|
-
|
76
|
+
response "Wait! Hang on. Are you going to be OK?" |> should equal "Sure."
|
54
77
|
|
55
78
|
[<Fact(Skip = "Remove to run test")>]
|
56
79
|
let ``Silence`` () =
|
57
|
-
|
80
|
+
response "" |> should equal "Fine. Be that way!"
|
58
81
|
|
59
82
|
[<Fact(Skip = "Remove to run test")>]
|
60
83
|
let ``Prolonged silence`` () =
|
61
|
-
|
84
|
+
response " " |> should equal "Fine. Be that way!"
|
85
|
+
|
86
|
+
[<Fact(Skip = "Remove to run test")>]
|
87
|
+
let ``Alternate silence`` () =
|
88
|
+
response "\t\t\t\t\t\t\t\t\t\t" |> should equal "Fine. Be that way!"
|
62
89
|
|
63
90
|
[<Fact(Skip = "Remove to run test")>]
|
64
91
|
let ``Multiple line question`` () =
|
65
|
-
|
92
|
+
response "\nDoes this cryogenic chamber make me look fat?\nno" |> should equal "Whatever."
|
93
|
+
|
94
|
+
[<Fact(Skip = "Remove to run test")>]
|
95
|
+
let ``Starting with whitespace`` () =
|
96
|
+
response " hmmmmmmm..." |> should equal "Whatever."
|
97
|
+
|
98
|
+
[<Fact(Skip = "Remove to run test")>]
|
99
|
+
let ``Ending with whitespace`` () =
|
100
|
+
response "Okay if like my spacebar quite a bit? " |> should equal "Sure."
|
101
|
+
|
102
|
+
[<Fact(Skip = "Remove to run test")>]
|
103
|
+
let ``Other whitespace`` () =
|
104
|
+
response "\n\r \t" |> should equal "Fine. Be that way!"
|
105
|
+
|
106
|
+
[<Fact(Skip = "Remove to run test")>]
|
107
|
+
let ``Non-question ending with whitespace`` () =
|
108
|
+
response "This is a statement ending with whitespace " |> should equal "Whatever."
|
109
|
+
|
@@ -2,14 +2,13 @@
|
|
2
2
|
|
3
3
|
open System
|
4
4
|
|
5
|
-
let
|
5
|
+
let response (input: string) =
|
6
6
|
let isEmpty = String.IsNullOrWhiteSpace input
|
7
7
|
let isYell = Seq.exists Char.IsLetter input && input = input.ToUpperInvariant()
|
8
|
-
let isQuestion = input.EndsWith "?"
|
8
|
+
let isQuestion = input.Trim().EndsWith "?"
|
9
9
|
|
10
10
|
match input with
|
11
11
|
| _ when isEmpty -> "Fine. Be that way!"
|
12
12
|
| _ when isYell -> "Whoa, chill out!"
|
13
13
|
| _ when isQuestion -> "Sure."
|
14
|
-
| _ -> "Whatever."
|
15
|
-
|
14
|
+
| _ -> "Whatever."
|
@@ -14,9 +14,10 @@
|
|
14
14
|
|
15
15
|
<ItemGroup>
|
16
16
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
17
|
-
<PackageReference Include="xunit" Version="2.3.0
|
18
|
-
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0
|
17
|
+
<PackageReference Include="xunit" Version="2.3.0" />
|
18
|
+
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0" />
|
19
19
|
<PackageReference Include="FsUnit.xUnit" Version="3.0.0" />
|
20
|
+
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0" />
|
20
21
|
</ItemGroup>
|
21
22
|
|
22
23
|
</Project>
|
@@ -1,54 +1,61 @@
|
|
1
|
+
// This file was auto-generated based on version 1.0.1 of the canonical data.
|
2
|
+
|
1
3
|
module BookStoreTest
|
2
4
|
|
3
|
-
open System
|
4
|
-
open Xunit
|
5
5
|
open FsUnit.Xunit
|
6
|
+
open Xunit
|
7
|
+
|
6
8
|
open BookStore
|
7
9
|
|
8
10
|
[<Fact>]
|
9
|
-
let ``
|
10
|
-
|
11
|
+
let ``Only a single book`` () =
|
12
|
+
total [1] |> should equal 8.00
|
11
13
|
|
12
14
|
[<Fact(Skip = "Remove to run test")>]
|
13
|
-
let ``
|
14
|
-
|
15
|
+
let ``Two of the same book`` () =
|
16
|
+
total [2; 2] |> should equal 16.00
|
15
17
|
|
16
18
|
[<Fact(Skip = "Remove to run test")>]
|
17
19
|
let ``Empty basket`` () =
|
18
|
-
|
20
|
+
total [] |> should equal 0.00
|
19
21
|
|
20
22
|
[<Fact(Skip = "Remove to run test")>]
|
21
|
-
let ``
|
22
|
-
|
23
|
+
let ``Two different books`` () =
|
24
|
+
total [1; 2] |> should equal 15.20
|
23
25
|
|
24
26
|
[<Fact(Skip = "Remove to run test")>]
|
25
|
-
let ``
|
26
|
-
|
27
|
+
let ``Three different books`` () =
|
28
|
+
total [1; 2; 3] |> should equal 21.60
|
27
29
|
|
28
30
|
[<Fact(Skip = "Remove to run test")>]
|
29
|
-
let ``
|
30
|
-
|
31
|
+
let ``Four different books`` () =
|
32
|
+
total [1; 2; 3; 4] |> should equal 25.60
|
31
33
|
|
32
34
|
[<Fact(Skip = "Remove to run test")>]
|
33
|
-
let ``
|
34
|
-
|
35
|
+
let ``Five different books`` () =
|
36
|
+
total [1; 2; 3; 4; 5] |> should equal 30.00
|
35
37
|
|
36
38
|
[<Fact(Skip = "Remove to run test")>]
|
37
|
-
let ``
|
38
|
-
|
39
|
+
let ``Two groups of four is cheaper than group of five plus group of three`` () =
|
40
|
+
total [1; 1; 2; 2; 3; 3; 4; 5] |> should equal 51.20
|
39
41
|
|
40
42
|
[<Fact(Skip = "Remove to run test")>]
|
41
|
-
let ``
|
42
|
-
|
43
|
+
let ``Group of four plus group of two is cheaper than two groups of three`` () =
|
44
|
+
total [1; 1; 2; 2; 3; 4] |> should equal 40.80
|
43
45
|
|
44
46
|
[<Fact(Skip = "Remove to run test")>]
|
45
|
-
let ``
|
46
|
-
|
47
|
+
let ``Two each of first 4 books and 1 copy each of rest`` () =
|
48
|
+
total [1; 1; 2; 2; 3; 3; 4; 4; 5] |> should equal 55.60
|
47
49
|
|
48
50
|
[<Fact(Skip = "Remove to run test")>]
|
49
|
-
let ``
|
50
|
-
|
51
|
+
let ``Two copies of each book`` () =
|
52
|
+
total [1; 1; 2; 2; 3; 3; 4; 4; 5; 5] |> should equal 60.00
|
51
53
|
|
52
54
|
[<Fact(Skip = "Remove to run test")>]
|
53
|
-
let ``
|
54
|
-
|
55
|
+
let ``Three copies of first book and 2 each of remaining`` () =
|
56
|
+
total [1; 1; 2; 2; 3; 3; 4; 4; 5; 5; 1] |> should equal 68.00
|
57
|
+
|
58
|
+
[<Fact(Skip = "Remove to run test")>]
|
59
|
+
let ``Three each of first 2 books and 2 each of remaining books`` () =
|
60
|
+
total [1; 1; 2; 2; 3; 3; 4; 4; 5; 5; 1; 2] |> should equal 75.20
|
61
|
+
|
@@ -14,9 +14,10 @@
|
|
14
14
|
|
15
15
|
<ItemGroup>
|
16
16
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
17
|
-
<PackageReference Include="xunit" Version="2.3.0
|
18
|
-
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0
|
17
|
+
<PackageReference Include="xunit" Version="2.3.0" />
|
18
|
+
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0" />
|
19
19
|
<PackageReference Include="FsUnit.xUnit" Version="3.0.0" />
|
20
|
+
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0" />
|
20
21
|
</ItemGroup>
|
21
22
|
|
22
23
|
</Project>
|
@@ -14,9 +14,10 @@
|
|
14
14
|
|
15
15
|
<ItemGroup>
|
16
16
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
17
|
-
<PackageReference Include="xunit" Version="2.3.0
|
18
|
-
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0
|
17
|
+
<PackageReference Include="xunit" Version="2.3.0" />
|
18
|
+
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0" />
|
19
19
|
<PackageReference Include="FsUnit.xUnit" Version="3.0.0" />
|
20
|
+
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0" />
|
20
21
|
</ItemGroup>
|
21
22
|
|
22
23
|
</Project>
|
@@ -1,66 +1,65 @@
|
|
1
|
+
// This file was auto-generated based on version 1.1.0 of the canonical data.
|
2
|
+
|
1
3
|
module BracketPushTest
|
2
4
|
|
3
|
-
open Xunit
|
4
5
|
open FsUnit.Xunit
|
6
|
+
open Xunit
|
5
7
|
|
6
8
|
open BracketPush
|
7
9
|
|
8
10
|
[<Fact>]
|
9
11
|
let ``Paired square brackets`` () =
|
10
|
-
|
11
|
-
matched actual |> should equal true
|
12
|
+
isPaired "[]" |> should equal true
|
12
13
|
|
13
14
|
[<Fact(Skip = "Remove to run test")>]
|
14
15
|
let ``Empty string`` () =
|
15
|
-
|
16
|
-
matched actual |> should equal true
|
16
|
+
isPaired "" |> should equal true
|
17
17
|
|
18
18
|
[<Fact(Skip = "Remove to run test")>]
|
19
19
|
let ``Unpaired brackets`` () =
|
20
|
-
|
21
|
-
matched actual |> should equal false
|
20
|
+
isPaired "[[" |> should equal false
|
22
21
|
|
23
22
|
[<Fact(Skip = "Remove to run test")>]
|
24
23
|
let ``Wrong ordered brackets`` () =
|
25
|
-
|
26
|
-
|
24
|
+
isPaired "}{" |> should equal false
|
25
|
+
|
26
|
+
[<Fact(Skip = "Remove to run test")>]
|
27
|
+
let ``Wrong closing bracket`` () =
|
28
|
+
isPaired "{]" |> should equal false
|
27
29
|
|
28
30
|
[<Fact(Skip = "Remove to run test")>]
|
29
31
|
let ``Paired with whitespace`` () =
|
30
|
-
|
31
|
-
matched actual |> should equal true
|
32
|
+
isPaired "{ }" |> should equal true
|
32
33
|
|
33
34
|
[<Fact(Skip = "Remove to run test")>]
|
34
35
|
let ``Simple nested brackets`` () =
|
35
|
-
|
36
|
-
matched actual |> should equal true
|
36
|
+
isPaired "{[]}" |> should equal true
|
37
37
|
|
38
38
|
[<Fact(Skip = "Remove to run test")>]
|
39
39
|
let ``Several paired brackets`` () =
|
40
|
-
|
41
|
-
matched actual |> should equal true
|
40
|
+
isPaired "{}[]" |> should equal true
|
42
41
|
|
43
42
|
[<Fact(Skip = "Remove to run test")>]
|
44
43
|
let ``Paired and nested brackets`` () =
|
45
|
-
|
46
|
-
|
44
|
+
isPaired "([{}({}[])])" |> should equal true
|
45
|
+
|
46
|
+
[<Fact(Skip = "Remove to run test")>]
|
47
|
+
let ``Unopened closing brackets`` () =
|
48
|
+
isPaired "{[)][]}" |> should equal false
|
47
49
|
|
48
50
|
[<Fact(Skip = "Remove to run test")>]
|
49
51
|
let ``Unpaired and nested brackets`` () =
|
50
|
-
|
51
|
-
matched actual |> should equal false
|
52
|
+
isPaired "([{])" |> should equal false
|
52
53
|
|
53
54
|
[<Fact(Skip = "Remove to run test")>]
|
54
55
|
let ``Paired and wrong nested brackets`` () =
|
55
|
-
|
56
|
-
matched actual |> should equal false
|
56
|
+
isPaired "[({]})" |> should equal false
|
57
57
|
|
58
58
|
[<Fact(Skip = "Remove to run test")>]
|
59
59
|
let ``Math expression`` () =
|
60
|
-
|
61
|
-
matched actual |> should equal true
|
60
|
+
isPaired "(((185 + 223.85) * 15) - 543)/2" |> should equal true
|
62
61
|
|
63
62
|
[<Fact(Skip = "Remove to run test")>]
|
64
63
|
let ``Complex latex expression`` () =
|
65
|
-
|
66
|
-
|
64
|
+
isPaired "\left(\begin{array}{cc} \frac{1}{3} & x\\ \mathrm{e}^{x} &... x^2 \end{array}\right)" |> should equal true
|
65
|
+
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
open System
|
4
4
|
|
5
|
-
let
|
5
|
+
let isPaired (input: string) =
|
6
6
|
let brackets = "[]{}()" |> Set.ofSeq
|
7
7
|
let filtered = input.ToCharArray() |> Array.filter brackets.Contains |> String
|
8
8
|
let replaceMatchingBrackets (str: string) = str.Replace("[]", "").Replace("{}", "").Replace("()", "")
|
@@ -14,9 +14,10 @@
|
|
14
14
|
|
15
15
|
<ItemGroup>
|
16
16
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
17
|
-
<PackageReference Include="xunit" Version="2.3.0
|
18
|
-
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0
|
17
|
+
<PackageReference Include="xunit" Version="2.3.0" />
|
18
|
+
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0" />
|
19
19
|
<PackageReference Include="FsUnit.xUnit" Version="3.0.0" />
|
20
|
+
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0" />
|
20
21
|
</ItemGroup>
|
21
22
|
|
22
23
|
</Project>
|