trackler 2.0.6.15 → 2.0.6.16
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/tracks/go/config.json +5 -1
- data/tracks/go/exercises/clock/clock_test.go +13 -8
- data/tracks/ruby/.github/ISSUE_TEMPLATE.md +43 -0
- data/tracks/ruby/.github/PULL_REQUEST_TEMPLATE.md +36 -0
- data/tracks/swift/.swiftlint.yml +8 -3
- data/tracks/swift/.travis.yml +26 -17
- data/tracks/swift/Dangerfile +0 -7
- data/tracks/swift/Package.swift +26 -0
- data/tracks/swift/README.md +1 -1
- data/tracks/swift/docs/ABOUT.md +9 -1
- data/tracks/swift/docs/INSTALLATION.md +10 -2
- data/tracks/swift/docs/TESTS.md +45 -80
- data/tracks/swift/docs/img/file-inspector.png +0 -0
- data/tracks/swift/docs/img/tests-fail.png +0 -0
- data/tracks/swift/docs/img/tests-pass.png +0 -0
- data/tracks/swift/docs/img/tests.png +0 -0
- data/tracks/swift/exercises/accumulate/.gitignore +4 -0
- data/tracks/swift/exercises/accumulate/Package.swift +5 -0
- data/tracks/swift/exercises/accumulate/{AccumulateExample.swift → Sources/AccumulateExample.swift} +0 -0
- data/tracks/swift/exercises/accumulate/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/accumulate/{AccumulateTest.swift → Tests/AccumulateTests/AccumulateTests.swift} +13 -16
- data/tracks/swift/exercises/accumulate/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/acronym/.gitignore +4 -0
- data/tracks/swift/exercises/acronym/Package.swift +5 -0
- data/tracks/swift/exercises/acronym/{AcronymExample.swift → Sources/AcronymExample.swift} +2 -0
- data/tracks/swift/exercises/acronym/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/acronym/{AcronymTest.swift → Tests/AcronymTests/AcronymTests.swift} +13 -5
- data/tracks/swift/exercises/acronym/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/all-your-base/.gitignore +4 -0
- data/tracks/swift/exercises/all-your-base/Package.swift +5 -0
- data/tracks/swift/exercises/all-your-base/{AllYourBaseExample.swift → Sources/AllYourBaseExample.swift} +0 -0
- data/tracks/swift/exercises/all-your-base/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/all-your-base/{AllYourBaseTest.swift → Tests/AllYourBaseTests/AllYourBaseTests.swift} +27 -6
- data/tracks/swift/exercises/all-your-base/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/allergies/.gitignore +4 -0
- data/tracks/swift/exercises/allergies/Package.swift +5 -0
- data/tracks/swift/exercises/allergies/{AllergiesExample.swift → Sources/AllergiesExample.swift} +0 -0
- data/tracks/swift/exercises/allergies/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/allergies/{AllergiesTest.swift → Tests/AllergiesTests/AllergiesTests.swift} +12 -4
- data/tracks/swift/exercises/allergies/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/anagram/.gitignore +4 -0
- data/tracks/swift/exercises/anagram/Package.swift +5 -0
- data/tracks/swift/exercises/anagram/{AnagramExample.swift → Sources/AnagramExample.swift} +0 -0
- data/tracks/swift/exercises/anagram/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/anagram/{AnagramTest.swift → Tests/AnagramTests/AnagramTests.swift} +17 -4
- data/tracks/swift/exercises/anagram/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/atbash-cipher/.gitignore +4 -0
- data/tracks/swift/exercises/atbash-cipher/Package.swift +5 -0
- data/tracks/swift/exercises/atbash-cipher/{AtbashExample.swift → Sources/AtbashExample.swift} +2 -0
- data/tracks/swift/exercises/atbash-cipher/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/atbash-cipher/{AtbashTest.swift → Tests/AtbashTests/AtbashTests.swift} +15 -4
- data/tracks/swift/exercises/atbash-cipher/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/beer-song/.gitignore +4 -0
- data/tracks/swift/exercises/beer-song/Package.swift +5 -0
- data/tracks/swift/exercises/beer-song/{BeerSongExample.swift → Sources/BeerSongExample.swift} +0 -0
- data/tracks/swift/exercises/beer-song/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/beer-song/{BeerSongTest.swift → Tests/BeerSongTests/BeerSongTests.swift} +12 -4
- data/tracks/swift/exercises/beer-song/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/binary-search-tree/.gitignore +4 -0
- data/tracks/swift/exercises/binary-search-tree/Package.swift +5 -0
- data/tracks/swift/exercises/binary-search-tree/{BinarySearchTreeExample.swift → Sources/BinarySearchTreeExample.swift} +0 -0
- data/tracks/swift/exercises/binary-search-tree/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/binary-search-tree/{BinarySearchTreeTest.swift → Tests/BinarySearchTreeTests/BinarySearchTreeTests.swift} +16 -4
- data/tracks/swift/exercises/binary-search-tree/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/binary-search/.gitignore +4 -0
- data/tracks/swift/exercises/binary-search/Package.swift +5 -0
- data/tracks/swift/exercises/binary-search/{BinarySearchExample.swift → Sources/BinarySearchExample.swift} +0 -0
- data/tracks/swift/exercises/binary-search/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/binary-search/{BinarySearchTest.swift → Tests/BinarySearchTests/BinarySearchTests.swift} +15 -5
- data/tracks/swift/exercises/binary-search/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/binary/.gitignore +4 -0
- data/tracks/swift/exercises/binary/Package.swift +5 -0
- data/tracks/swift/exercises/binary/{BinaryExample.swift → Sources/BinaryExample.swift} +0 -0
- data/tracks/swift/exercises/binary/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/binary/{BinaryTest.swift → Tests/BinaryTests/BinaryTests.swift} +18 -4
- data/tracks/swift/exercises/binary/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/bob/.gitignore +4 -0
- data/tracks/swift/exercises/bob/Package.swift +5 -0
- data/tracks/swift/exercises/bob/{BobExample.swift → Sources/BobExample.swift} +2 -0
- data/tracks/swift/exercises/bob/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/bob/{BobTest.swift → Tests/BobTests/BobTests.swift} +24 -4
- data/tracks/swift/exercises/bob/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/bowling/.gitignore +4 -0
- data/tracks/swift/exercises/bowling/Package.swift +5 -0
- data/tracks/swift/exercises/bowling/{BowlingExample.swift → Sources/BowlingExample.swift} +1 -1
- data/tracks/swift/exercises/bowling/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/bowling/{BowlingTest.swift → Tests/BowlingTests/BowlingTests.swift} +31 -5
- data/tracks/swift/exercises/bowling/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/bracket-push/.gitignore +4 -0
- data/tracks/swift/exercises/bracket-push/Package.swift +5 -0
- data/tracks/swift/exercises/bracket-push/{BracketPushExample.swift → Sources/BracketPushExample.swift} +3 -3
- data/tracks/swift/exercises/bracket-push/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/bracket-push/{BracketPushTest.swift → Tests/BracketPushTests/BracketPushTests.swift} +21 -4
- data/tracks/swift/exercises/bracket-push/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/clock/.gitignore +4 -0
- data/tracks/swift/exercises/clock/Package.swift +5 -0
- data/tracks/swift/exercises/clock/{ClockExample.swift → Sources/ClockExample.swift} +2 -0
- data/tracks/swift/exercises/clock/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/clock/{ClockTest.swift → Tests/ClockTests/ClockTests.swift} +55 -4
- data/tracks/swift/exercises/clock/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/crypto-square/.gitignore +4 -0
- data/tracks/swift/exercises/crypto-square/Package.swift +5 -0
- data/tracks/swift/exercises/crypto-square/{CryptoSquareExample.swift → Sources/CryptoSquareExample.swift} +2 -2
- data/tracks/swift/exercises/crypto-square/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/crypto-square/{CryptoSquareTest.swift → Tests/CryptoSquareTests/CryptoSquareTests.swift} +23 -4
- data/tracks/swift/exercises/crypto-square/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/custom-set/.gitignore +4 -0
- data/tracks/swift/exercises/custom-set/Package.swift +5 -0
- data/tracks/swift/exercises/custom-set/{CustomSetExample.swift → Sources/CustomSetExample.swift} +0 -0
- data/tracks/swift/exercises/custom-set/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/custom-set/{CustomSetTest.swift → Tests/CustomSetTests/CustomSetTests.swift} +21 -5
- data/tracks/swift/exercises/custom-set/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/difference-of-squares/.gitignore +4 -0
- data/tracks/swift/exercises/difference-of-squares/Package.swift +5 -0
- data/tracks/swift/exercises/difference-of-squares/{DifferenceOfSquaresExample.swift → Sources/DifferenceOfSquaresExample.swift} +0 -0
- data/tracks/swift/exercises/difference-of-squares/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/difference-of-squares/{DifferenceOfSquaresTest.swift → Tests/DifferenceOfSquaresTests/DifferenceOfSquaresTests.swift} +16 -4
- data/tracks/swift/exercises/difference-of-squares/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/dominoes/.gitignore +4 -0
- data/tracks/swift/exercises/dominoes/Package.swift +5 -0
- data/tracks/swift/exercises/dominoes/{DominoesExample.swift → Sources/DominoesExample.swift} +0 -0
- data/tracks/swift/exercises/dominoes/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/dominoes/{DominoesTest.swift → Tests/DominoesTests/DominoesTests.swift} +19 -4
- data/tracks/swift/exercises/dominoes/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/etl/.gitignore +4 -0
- data/tracks/swift/exercises/etl/Package.swift +5 -0
- data/tracks/swift/exercises/etl/{EtlExample.swift → Sources/EtlExample.swift} +0 -0
- data/tracks/swift/exercises/etl/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/etl/Tests/EtlTests/EtlTests.swift +59 -0
- data/tracks/swift/exercises/etl/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/flatten-array/.gitignore +4 -0
- data/tracks/swift/exercises/flatten-array/Package.swift +5 -0
- data/tracks/swift/exercises/flatten-array/{FlattenArrayExample.swift → Sources/FlattenArrayExample.swift} +0 -0
- data/tracks/swift/exercises/flatten-array/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/flatten-array/{FlattenArrayTest.swift → Tests/FlattenArrayTests/FlattenArrayTests.swift} +14 -1
- data/tracks/swift/exercises/flatten-array/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/food-chain/.gitignore +4 -0
- data/tracks/swift/exercises/food-chain/Package.swift +5 -0
- data/tracks/swift/exercises/food-chain/{FoodChainExample.swift → Sources/FoodChainExample.swift} +0 -0
- data/tracks/swift/exercises/food-chain/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/food-chain/{FoodChainTest.swift → Tests/FoodChainTests/FoodChainTests.swift} +13 -4
- data/tracks/swift/exercises/food-chain/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/gigasecond/.gitignore +4 -0
- data/tracks/swift/exercises/gigasecond/Package.swift +5 -0
- data/tracks/swift/exercises/gigasecond/{GigasecondExample.swift → Sources/GigasecondExample.swift} +1 -1
- data/tracks/swift/exercises/gigasecond/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/gigasecond/{GigasecondTest.swift → Tests/GigasecondTests/GigasecondTests.swift} +14 -4
- data/tracks/swift/exercises/gigasecond/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/grade-school/.gitignore +4 -0
- data/tracks/swift/exercises/grade-school/Package.swift +5 -0
- data/tracks/swift/exercises/grade-school/{GradeSchoolExample.swift → Sources/GradeSchoolExample.swift} +0 -0
- data/tracks/swift/exercises/grade-school/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/grade-school/{GradeSchoolTest.swift → Tests/GradeSchoolTests/GradeSchoolTests.swift} +17 -13
- data/tracks/swift/exercises/grade-school/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/grains/.gitignore +4 -0
- data/tracks/swift/exercises/grains/Package.swift +5 -0
- data/tracks/swift/exercises/grains/{GrainsExample.swift → Sources/GrainsExample.swift} +1 -1
- data/tracks/swift/exercises/grains/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/grains/{GrainsTest.swift → Tests/GrainsTests/GrainsTests.swift} +19 -5
- data/tracks/swift/exercises/grains/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/hamming/.gitignore +4 -0
- data/tracks/swift/exercises/hamming/Package.swift +5 -0
- data/tracks/swift/exercises/hamming/{HammingExample.swift → Sources/HammingExample.swift} +0 -0
- data/tracks/swift/exercises/hamming/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/hamming/{HammingTest.swift → Tests/HammingTests/HammingTests.swift} +15 -4
- data/tracks/swift/exercises/hamming/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/hello-world/.gitignore +4 -0
- data/tracks/swift/exercises/hello-world/Package.swift +5 -0
- data/tracks/swift/exercises/hello-world/{HelloWorldExample.swift → Sources/HelloWorldExample.swift} +0 -0
- data/tracks/swift/exercises/hello-world/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/hello-world/{helloWorldTest.swift → Tests/HelloWorldTests/HelloWorldTests.swift} +11 -4
- data/tracks/swift/exercises/hello-world/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/hexadecimal/.gitignore +4 -0
- data/tracks/swift/exercises/hexadecimal/Package.swift +5 -0
- data/tracks/swift/exercises/hexadecimal/{HexadecimalExample.swift → Sources/HexadecimalExample.swift} +16 -16
- data/tracks/swift/exercises/hexadecimal/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/hexadecimal/{HexadecimalTest.swift → Tests/HexadecimalTests/HexadecimalTests.swift} +17 -4
- data/tracks/swift/exercises/hexadecimal/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/house/.gitignore +4 -0
- data/tracks/swift/exercises/house/Package.swift +5 -0
- data/tracks/swift/exercises/house/{HouseExample.swift → Sources/HouseExample.swift} +0 -0
- data/tracks/swift/exercises/house/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/house/{HouseTest.swift → Tests/HouseTests/HouseTests.swift} +9 -4
- data/tracks/swift/exercises/house/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/isogram/.gitignore +4 -0
- data/tracks/swift/exercises/isogram/Package.swift +5 -0
- data/tracks/swift/exercises/isogram/{IsogramExample.swift → Sources/IsogramExample.swift} +0 -0
- data/tracks/swift/exercises/isogram/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/isogram/{IsogramTest.swift → Tests/IsogramTests/IsogramTests.swift} +16 -4
- data/tracks/swift/exercises/isogram/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/kindergarten-garden/.gitignore +4 -0
- data/tracks/swift/exercises/kindergarten-garden/Package.swift +5 -0
- data/tracks/swift/exercises/kindergarten-garden/{KindergartenGardenExample.swift → Sources/KindergartenGardenExample.swift} +1 -1
- data/tracks/swift/exercises/kindergarten-garden/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/kindergarten-garden/{KindergartenGardenTest.swift → Tests/KindergartenGardenTests/KindergartenGardenTests.swift} +28 -5
- data/tracks/swift/exercises/kindergarten-garden/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/largest-series-product/.gitignore +4 -0
- data/tracks/swift/exercises/largest-series-product/Package.swift +5 -0
- data/tracks/swift/exercises/largest-series-product/{LargestSeriesProductExample.swift → Sources/LargestSeriesProductExample.swift} +0 -0
- data/tracks/swift/exercises/largest-series-product/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/largest-series-product/{LargestSeriesProductTest.swift → Tests/LargestSeriesProductTests/LargestSeriesProductTests.swift} +24 -4
- data/tracks/swift/exercises/largest-series-product/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/leap/.gitignore +4 -0
- data/tracks/swift/exercises/leap/Package.swift +5 -0
- data/tracks/swift/exercises/leap/{LeapExample.swift → Sources/LeapExample.swift} +0 -0
- data/tracks/swift/exercises/leap/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/leap/{LeapTest.swift → Tests/LeapTests/LeapTests.swift} +11 -4
- data/tracks/swift/exercises/leap/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/linked-list/.gitignore +4 -0
- data/tracks/swift/exercises/linked-list/Package.swift +5 -0
- data/tracks/swift/exercises/linked-list/{LinkedListExample.swift → Sources/LinkedListExample.swift} +3 -3
- data/tracks/swift/exercises/linked-list/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/linked-list/{LinkedListTest.swift → Tests/LinkedListTests/LinkedListTests.swift} +12 -4
- data/tracks/swift/exercises/linked-list/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/luhn/.gitignore +4 -0
- data/tracks/swift/exercises/luhn/Package.swift +5 -0
- data/tracks/swift/exercises/luhn/{LuhnExample.swift → Sources/LuhnExample.swift} +1 -1
- data/tracks/swift/exercises/luhn/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/luhn/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/luhn/{LuhnTest.swift → Tests/LuhnTests/LuhnTests.swift} +16 -4
- data/tracks/swift/exercises/matrix/.gitignore +4 -0
- data/tracks/swift/exercises/matrix/Package.swift +5 -0
- data/tracks/swift/exercises/matrix/{MatrixExample.swift → Sources/MatrixExample.swift} +0 -0
- data/tracks/swift/exercises/matrix/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/matrix/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/matrix/{MatrixTest.swift → Tests/MatrixTests/MatrixTests.swift} +13 -5
- data/tracks/swift/exercises/meetup/.gitignore +4 -0
- data/tracks/swift/exercises/meetup/Package.swift +5 -0
- data/tracks/swift/exercises/meetup/{MeetupExample.swift → Sources/MeetupExample.swift} +1 -1
- data/tracks/swift/exercises/meetup/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/meetup/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/meetup/{MeetupTest.swift → Tests/MeetupTests/MeetupTests.swift} +17 -5
- data/tracks/swift/exercises/minesweeper/.gitignore +4 -0
- data/tracks/swift/exercises/minesweeper/Package.swift +5 -0
- data/tracks/swift/exercises/minesweeper/{MinesweeperExample.swift → Sources/MinesweeperExample.swift} +8 -2
- data/tracks/swift/exercises/minesweeper/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/minesweeper/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/minesweeper/{MinesweeperTest.swift → Tests/MinesweeperTests/MinesweeperTests.swift} +19 -6
- data/tracks/swift/exercises/nth-prime/.gitignore +4 -0
- data/tracks/swift/exercises/nth-prime/Package.swift +5 -0
- data/tracks/swift/exercises/nth-prime/{NthPrimeExample.swift → Sources/NthPrimeExample.swift} +5 -1
- data/tracks/swift/exercises/nth-prime/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/nth-prime/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/nth-prime/Tests/NthPrimeTests/NthPrimeTests.swift +34 -0
- data/tracks/swift/exercises/nucleotide-count/.gitignore +4 -0
- data/tracks/swift/exercises/nucleotide-count/Package.swift +5 -0
- data/tracks/swift/exercises/nucleotide-count/{NucleotideCountExample.swift → Sources/NucleotideCountExample.swift} +1 -1
- data/tracks/swift/exercises/nucleotide-count/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/nucleotide-count/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/nucleotide-count/{NucleotideCountTest.swift → Tests/NucleotideCountTests/NucleotideCountTests.swift} +17 -5
- data/tracks/swift/exercises/ocr-numbers/.gitignore +4 -0
- data/tracks/swift/exercises/ocr-numbers/Package.swift +5 -0
- data/tracks/swift/exercises/ocr-numbers/{OcrNumbersExample.swift → Sources/OcrNumbersExample.swift} +0 -0
- data/tracks/swift/exercises/ocr-numbers/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/ocr-numbers/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/ocr-numbers/{OcrNumbersTest.swift → Tests/OcrNumbersTests/OcrNumbersTests.swift} +25 -5
- data/tracks/swift/exercises/octal/.gitignore +4 -0
- data/tracks/swift/exercises/octal/Package.swift +5 -0
- data/tracks/swift/exercises/octal/{OctalExample.swift → Sources/OctalExample.swift} +5 -1
- data/tracks/swift/exercises/octal/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/octal/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/octal/{OctalTest.swift → Tests/OctalTests/OctalTests.swift} +22 -5
- data/tracks/swift/exercises/palindrome-products/.gitignore +4 -0
- data/tracks/swift/exercises/palindrome-products/Package.swift +5 -0
- data/tracks/swift/exercises/palindrome-products/{PalindromeProductsExample.swift → Sources/PalindromeProductsExample.swift} +1 -0
- data/tracks/swift/exercises/palindrome-products/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/palindrome-products/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/palindrome-products/{PalindromeProductsTest.swift → Tests/PalindromeProductsTests/PalindromeProductsTests.swift} +12 -5
- data/tracks/swift/exercises/pangram/.gitignore +4 -0
- data/tracks/swift/exercises/pangram/Package.swift +5 -0
- data/tracks/swift/exercises/pangram/{PangramExample.swift → Sources/PangramExample.swift} +0 -0
- data/tracks/swift/exercises/pangram/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/pangram/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/pangram/{PangramTest.swift → Tests/PangramTests/PangramTests.swift} +16 -5
- data/tracks/swift/exercises/pascals-triangle/.gitignore +4 -0
- data/tracks/swift/exercises/pascals-triangle/Package.swift +5 -0
- data/tracks/swift/exercises/pascals-triangle/{PascalsTriangleExample.swift → Sources/PascalsTriangleExample.swift} +0 -0
- data/tracks/swift/exercises/pascals-triangle/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/pascals-triangle/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/pascals-triangle/{PascalsTriangleTest.swift → Tests/PascalsTriangleTests/PascalsTriangleTests.swift} +13 -5
- data/tracks/swift/exercises/perfect-numbers/.gitignore +4 -0
- data/tracks/swift/exercises/perfect-numbers/Package.swift +5 -0
- data/tracks/swift/exercises/perfect-numbers/{PerfectNumbersExample.swift → Sources/PerfectNumbersExample.swift} +0 -0
- data/tracks/swift/exercises/perfect-numbers/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/perfect-numbers/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/perfect-numbers/{PerfectNumbersTest.swift → Tests/PerfectNumbersTests/PerfectNumbersTests.swift} +11 -4
- data/tracks/swift/exercises/phone-number/.gitignore +4 -0
- data/tracks/swift/exercises/phone-number/Package.swift +5 -0
- data/tracks/swift/exercises/phone-number/{PhoneNumberExample.swift → Sources/PhoneNumberExample.swift} +2 -0
- data/tracks/swift/exercises/phone-number/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/phone-number/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/phone-number/{PhoneNumberTest.swift → Tests/PhoneNumberTests/PhoneNumberTests.swift} +16 -5
- data/tracks/swift/exercises/pig-latin/.gitignore +4 -0
- data/tracks/swift/exercises/pig-latin/Package.swift +5 -0
- data/tracks/swift/exercises/pig-latin/{PigLatinExample.swift → Sources/PigLatinExample.swift} +2 -0
- data/tracks/swift/exercises/pig-latin/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/pig-latin/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/pig-latin/{PigLatinTest.swift → Tests/PigLatinTests/PigLatinTests.swift} +22 -4
- data/tracks/swift/exercises/poker/.gitignore +4 -0
- data/tracks/swift/exercises/poker/Package.swift +5 -0
- data/tracks/swift/exercises/poker/{PokerExample.swift → Sources/PokerExample.swift} +3 -1
- data/tracks/swift/exercises/poker/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/poker/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/poker/{PokerTest.swift → Tests/PokerTests/PokerTests.swift} +10 -5
- data/tracks/swift/exercises/prime-factors/.gitignore +4 -0
- data/tracks/swift/exercises/prime-factors/Package.swift +5 -0
- data/tracks/swift/exercises/prime-factors/{PrimeFactorsExample.swift → Sources/PrimeFactorsExample.swift} +0 -0
- data/tracks/swift/exercises/prime-factors/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/prime-factors/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/prime-factors/{PrimeFactorsTest.swift → Tests/PrimeFactorsTests/PrimeFactorsTests.swift} +18 -5
- data/tracks/swift/exercises/pythagorean-triplet/.gitignore +4 -0
- data/tracks/swift/exercises/pythagorean-triplet/Package.swift +5 -0
- data/tracks/swift/exercises/pythagorean-triplet/{PythagoreanTripletExample.swift → Sources/PythagoreanTripletExample.swift} +5 -1
- data/tracks/swift/exercises/pythagorean-triplet/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/pythagorean-triplet/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/pythagorean-triplet/{PythagoreanTripletTest.swift → Tests/PythagoreanTripletTests/PythagoreanTripletTests.swift} +15 -4
- data/tracks/swift/exercises/queen-attack/.gitignore +4 -0
- data/tracks/swift/exercises/queen-attack/Package.swift +5 -0
- data/tracks/swift/exercises/queen-attack/{QueenAttackExample.swift → Sources/QueenAttackExample.swift} +0 -0
- data/tracks/swift/exercises/queen-attack/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/queen-attack/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/queen-attack/{QueenAttackTest.swift → Tests/QueenAttackTests/QueenAttackTests.swift} +24 -6
- data/tracks/swift/exercises/raindrops/.gitignore +4 -0
- data/tracks/swift/exercises/raindrops/Package.swift +5 -0
- data/tracks/swift/exercises/raindrops/{RaindropsExample.swift → Sources/RaindropsExample.swift} +0 -0
- data/tracks/swift/exercises/raindrops/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/raindrops/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/raindrops/{RaindropsTest.swift → Tests/RaindropsTests/RaindropsTests.swift} +23 -5
- data/tracks/swift/exercises/rna-transcription/.gitignore +4 -0
- data/tracks/swift/exercises/rna-transcription/Package.swift +5 -0
- data/tracks/swift/exercises/rna-transcription/{RnaTranscriptionExample.swift → Sources/RnaTranscriptionExample.swift} +0 -0
- data/tracks/swift/exercises/rna-transcription/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/rna-transcription/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/rna-transcription/Tests/RnaTranscriptionTests/RnaTranscriptionTests.swift +34 -0
- data/tracks/swift/exercises/robot-name/.gitignore +4 -0
- data/tracks/swift/exercises/robot-name/Package.swift +5 -0
- data/tracks/swift/exercises/robot-name/{RobotNameExample.swift → Sources/RobotNameExample.swift} +9 -4
- data/tracks/swift/exercises/robot-name/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/robot-name/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/robot-name/{RobotNameTest.swift → Tests/RobotNameTests/RobotNameTests.swift} +19 -5
- data/tracks/swift/exercises/robot-simulator/.gitignore +4 -0
- data/tracks/swift/exercises/robot-simulator/Package.swift +5 -0
- data/tracks/swift/exercises/robot-simulator/{RobotSimulatorExample.swift → Sources/RobotSimulatorExample.swift} +0 -0
- data/tracks/swift/exercises/robot-simulator/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/robot-simulator/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/robot-simulator/{RobotSimulatorTest.swift → Tests/RobotSimulatorTests/RobotSimulatorTests.swift} +31 -5
- data/tracks/swift/exercises/roman-numerals/.gitignore +4 -0
- data/tracks/swift/exercises/roman-numerals/Package.swift +5 -0
- data/tracks/swift/exercises/roman-numerals/{RomanNumeralsExample.swift → Sources/RomanNumeralsExample.swift} +0 -0
- data/tracks/swift/exercises/roman-numerals/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/roman-numerals/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/roman-numerals/{RomanNumeralsTest.swift → Tests/RomanNumeralsTests/RomanNumeralsTests.swift} +25 -5
- data/tracks/swift/exercises/run-length-encoding/.gitignore +4 -0
- data/tracks/swift/exercises/run-length-encoding/Package.swift +5 -0
- data/tracks/swift/exercises/run-length-encoding/{RunLengthEncodingExample.swift → Sources/RunLengthEncodingExample.swift} +0 -0
- data/tracks/swift/exercises/run-length-encoding/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/run-length-encoding/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/run-length-encoding/{RunLengthEncodingTest.swift → Tests/RunLengthEncodingTests/RunLengthEncodingTests.swift} +15 -5
- data/tracks/swift/exercises/saddle-points/.gitignore +4 -0
- data/tracks/swift/exercises/saddle-points/Package.swift +5 -0
- data/tracks/swift/exercises/saddle-points/{SaddlePointsExample.swift → Sources/SaddlePointsExample.swift} +0 -0
- data/tracks/swift/exercises/saddle-points/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/saddle-points/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/saddle-points/{SaddlePointsTest.swift → Tests/SaddlePointsTests/SaddlePointsTests.swift} +17 -5
- data/tracks/swift/exercises/scrabble-score/.gitignore +4 -0
- data/tracks/swift/exercises/scrabble-score/Package.swift +5 -0
- data/tracks/swift/exercises/scrabble-score/{ScrabbleScoreExample.swift → Sources/ScrabbleScoreExample.swift} +2 -0
- data/tracks/swift/exercises/scrabble-score/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/scrabble-score/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/scrabble-score/{ScrabbleScoreTest.swift → Tests/ScrabbleScoreTests/ScrabbleScoreTests.swift} +16 -5
- data/tracks/swift/exercises/secret-handshake/.gitignore +4 -0
- data/tracks/swift/exercises/secret-handshake/Package.swift +5 -0
- data/tracks/swift/exercises/secret-handshake/{SecretHandshakeExample.swift → Sources/SecretHandshakeExample.swift} +0 -0
- data/tracks/swift/exercises/secret-handshake/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/secret-handshake/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/secret-handshake/{SecretHandshakeTest.swift → Tests/SecretHandshakeTests/SecretHandshakeTests.swift} +15 -5
- data/tracks/swift/exercises/series/.gitignore +4 -0
- data/tracks/swift/exercises/series/Package.swift +5 -0
- data/tracks/swift/exercises/series/{SeriesExample.swift → Sources/SeriesExample.swift} +0 -0
- data/tracks/swift/exercises/series/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/series/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/series/{SeriesTest.swift → Tests/SeriesTests/SeriesTests.swift} +21 -5
- data/tracks/swift/exercises/sieve/.gitignore +4 -0
- data/tracks/swift/exercises/sieve/Package.swift +5 -0
- data/tracks/swift/exercises/sieve/{SieveExample.swift → Sources/SieveExample.swift} +0 -0
- data/tracks/swift/exercises/sieve/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/sieve/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/sieve/{SieveTest.swift → Tests/SieveTests/SieveTests.swift} +9 -5
- data/tracks/swift/exercises/simple-cipher/.gitignore +4 -0
- data/tracks/swift/exercises/simple-cipher/Package.swift +5 -0
- data/tracks/swift/exercises/simple-cipher/{SimpleCipherExample.swift → Sources/SimpleCipherExample.swift} +14 -3
- data/tracks/swift/exercises/simple-cipher/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/simple-cipher/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/simple-cipher/{SimpleCipherTest.swift → Tests/SimpleCipherTests/SimpleCipherTests.swift} +22 -5
- data/tracks/swift/exercises/simple-linked-list/.gitignore +4 -0
- data/tracks/swift/exercises/simple-linked-list/Package.swift +5 -0
- data/tracks/swift/exercises/simple-linked-list/{SimpleLinkedListExample.swift → Sources/SimpleLinkedListExample.swift} +2 -2
- data/tracks/swift/exercises/simple-linked-list/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/simple-linked-list/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/simple-linked-list/{SimpleLinkedListTest.swift → Tests/SimpleLinkedListTests/SimpleLinkedListTests.swift} +16 -6
- data/tracks/swift/exercises/space-age/.gitignore +4 -0
- data/tracks/swift/exercises/space-age/Package.swift +5 -0
- data/tracks/swift/exercises/space-age/{SpaceAgeExample.swift → Sources/SpaceAgeExample.swift} +5 -1
- data/tracks/swift/exercises/space-age/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/space-age/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/space-age/{SpaceAgeTest.swift → Tests/SpaceAgeTests/SpaceAgeTests.swift} +17 -5
- data/tracks/swift/exercises/strain/.gitignore +4 -0
- data/tracks/swift/exercises/strain/Package.swift +5 -0
- data/tracks/swift/exercises/strain/{StrainExample.swift → Sources/StrainExample.swift} +0 -0
- data/tracks/swift/exercises/strain/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/strain/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/strain/{StrainTest.swift → Tests/StrainTests/StrainTests.swift} +20 -5
- data/tracks/swift/exercises/sublist/.gitignore +4 -0
- data/tracks/swift/exercises/sublist/Package.swift +5 -0
- data/tracks/swift/exercises/sublist/{SublistExample.swift → Sources/SublistExample.swift} +0 -0
- data/tracks/swift/exercises/sublist/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/sublist/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/sublist/{SubListTest.swift → Tests/SublistTests/SublistTests.swift} +24 -2
- data/tracks/swift/exercises/sum-of-multiples/.gitignore +4 -0
- data/tracks/swift/exercises/sum-of-multiples/Package.swift +5 -0
- data/tracks/swift/exercises/sum-of-multiples/{SumOfMultiplesExample.swift → Sources/SumOfMultiplesExample.swift} +0 -0
- data/tracks/swift/exercises/sum-of-multiples/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/sum-of-multiples/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/sum-of-multiples/{SumOfMultiplesTest.swift → Tests/SumOfMultiplesTests/SumOfMultiplesTests.swift} +18 -5
- data/tracks/swift/exercises/tournament/.gitignore +4 -0
- data/tracks/swift/exercises/tournament/Package.swift +5 -0
- data/tracks/swift/exercises/tournament/{TournamentExample.swift → Sources/TournamentExample.swift} +8 -9
- data/tracks/swift/exercises/tournament/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/tournament/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/tournament/{TournamentTest.swift → Tests/TournamentTests/TournamentTests.swift} +12 -8
- data/tracks/swift/exercises/transpose/.gitignore +4 -0
- data/tracks/swift/exercises/transpose/Package.swift +5 -0
- data/tracks/swift/exercises/transpose/{TransposeExample.swift → Sources/TransposeExample.swift} +2 -0
- data/tracks/swift/exercises/transpose/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/transpose/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/transpose/{TransposeTest.swift → Tests/TransposeTests/TransposeTests.swift} +18 -5
- data/tracks/swift/exercises/triangle/.gitignore +4 -0
- data/tracks/swift/exercises/triangle/Package.swift +5 -0
- data/tracks/swift/exercises/triangle/{TriangleExample.swift → Sources/TriangleExample.swift} +0 -0
- data/tracks/swift/exercises/triangle/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/triangle/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/triangle/{TriangleTest.swift → Tests/TriangleTests/TriangleTests.swift} +22 -5
- data/tracks/swift/exercises/trinary/.gitignore +4 -0
- data/tracks/swift/exercises/trinary/Package.swift +5 -0
- data/tracks/swift/exercises/trinary/{TrinaryExample.swift → Sources/TrinaryExample.swift} +5 -1
- data/tracks/swift/exercises/trinary/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/trinary/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/trinary/{TrinaryTest.swift → Tests/TrinaryTests/TrinaryTests.swift} +17 -5
- data/tracks/swift/exercises/twelve-days/.gitignore +4 -0
- data/tracks/swift/exercises/twelve-days/Package.swift +5 -0
- data/tracks/swift/exercises/twelve-days/Sources/TwelveDaysExample.swift +24 -0
- data/tracks/swift/exercises/twelve-days/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/twelve-days/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/twelve-days/{TwelveDaysTest.swift → Tests/TwelveDaysTests/TwelveDaysTests.swift} +21 -4
- data/tracks/swift/exercises/word-count/.gitignore +4 -0
- data/tracks/swift/exercises/word-count/Package.swift +5 -0
- data/tracks/swift/exercises/word-count/{WordCountExample.swift → Sources/WordCountExample.swift} +1 -1
- data/tracks/swift/exercises/word-count/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/word-count/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/word-count/{WordCountTest.swift → Tests/WordCountTests/WordCountTests.swift} +18 -10
- data/tracks/swift/exercises/wordy/.gitignore +4 -0
- data/tracks/swift/exercises/wordy/Package.swift +5 -0
- data/tracks/swift/exercises/wordy/{WordyExample.swift → Sources/WordyExample.swift} +6 -4
- data/tracks/swift/exercises/wordy/Sources/deleteme.swift +1 -0
- data/tracks/swift/exercises/wordy/Tests/LinuxMain.swift +6 -0
- data/tracks/swift/exercises/wordy/{WordyTest.swift → Tests/WordyTests/WordyTests.swift} +23 -5
- data/tracks/swift/xswift-test-spm +5 -0
- metadata +460 -167
- data/tracks/swift/docs/img/tests_001-splash.png +0 -0
- data/tracks/swift/docs/img/tests_002-templateChooser.png +0 -0
- data/tracks/swift/docs/img/tests_003-nameProject.jpg +0 -0
- data/tracks/swift/docs/img/tests_004-saveProject.jpg +0 -0
- data/tracks/swift/docs/img/tests_005-folderLayout.png +0 -0
- data/tracks/swift/docs/img/tests_006-newProjectInitial.jpg +0 -0
- data/tracks/swift/docs/img/tests_007-fileInspectorUpdate.png +0 -0
- data/tracks/swift/docs/img/tests_008-templateChooserSwift.png +0 -0
- data/tracks/swift/docs/img/tests_009-importTestSource.png +0 -0
- data/tracks/swift/docs/img/tests_010-testsImportExample.png +0 -0
- data/tracks/swift/docs/img/tests_011-finalLayoutExample.png +0 -0
- data/tracks/swift/exercises/etl/EtlTest.swift +0 -51
- data/tracks/swift/exercises/nth-prime/NthPrimeTest.swift +0 -27
- data/tracks/swift/exercises/rna-transcription/RnaTranscriptionTest.swift +0 -27
- data/tracks/swift/exercises/twelve-days/TwelveDaysExample.swift +0 -24
- data/tracks/swift/xcodeProject/xSwift Tests/Info.plist +0 -24
- data/tracks/swift/xcodeProject/xSwift.xcodeproj/project.pbxproj +0 -1521
- data/tracks/swift/xcodeProject/xSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- data/tracks/swift/xcodeProject/xSwift.xcodeproj/xcshareddata/xcschemes/xSwiftTests.xcscheme +0 -99
@@ -0,0 +1 @@
|
|
1
|
+
//Solution goes in Sources
|
@@ -1,10 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
#endif
|
4
|
-
|
5
|
-
// Use Optionals and Generic Classes
|
6
|
-
class SimpleLinkedListTest: XCTestCase {
|
1
|
+
import XCTest
|
2
|
+
@testable import SimpleLinkedList
|
7
3
|
|
4
|
+
class SimpleLinkedListTests: XCTestCase {
|
8
5
|
func testConstructorA() {
|
9
6
|
let one = Element(1, nil)
|
10
7
|
let two = Element(2, one)
|
@@ -80,4 +77,17 @@ class SimpleLinkedListTest: XCTestCase {
|
|
80
77
|
XCTAssertEqual(Array(1...10), Element.fromArray(Array(1...10)).toArray())
|
81
78
|
}
|
82
79
|
|
80
|
+
static var allTests: [(String, (SimpleLinkedListTests) -> () throws -> Void)] {
|
81
|
+
return [
|
82
|
+
("testConstructorA", testConstructorA),
|
83
|
+
("testConstructorB", testConstructorB),
|
84
|
+
("testToA", testToA),
|
85
|
+
("testReverseOne", testReverseOne),
|
86
|
+
("testReverseTwo", testReverseTwo),
|
87
|
+
("testFromAOne", testFromAOne),
|
88
|
+
("testFromATwo", testFromATwo),
|
89
|
+
("testFromATen", testFromATen),
|
90
|
+
("testRoundtrip", testRoundtrip),
|
91
|
+
]
|
92
|
+
}
|
83
93
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
//Solution goes in Sources
|
data/tracks/swift/exercises/space-age/{SpaceAgeTest.swift → Tests/SpaceAgeTests/SpaceAgeTests.swift}
RENAMED
@@ -1,9 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
#endif
|
4
|
-
|
5
|
-
class SpaceAgeTest: XCTestCase {
|
1
|
+
import XCTest
|
2
|
+
@testable import SpaceAge
|
6
3
|
|
4
|
+
class SpaceAgeTests: XCTestCase {
|
7
5
|
func testAgeInSeconds() {
|
8
6
|
let age = SpaceAge(1_000_000)
|
9
7
|
XCTAssertEqual(1_000_000, age.seconds)
|
@@ -55,4 +53,18 @@ class SpaceAgeTest: XCTestCase {
|
|
55
53
|
XCTAssertEqual(260.16, age.onEarth)
|
56
54
|
XCTAssertEqual(1.58, age.onNeptune)
|
57
55
|
}
|
56
|
+
|
57
|
+
static var allTests: [(String, (SpaceAgeTests) -> () throws -> Void)] {
|
58
|
+
return [
|
59
|
+
("testAgeInSeconds", testAgeInSeconds),
|
60
|
+
("testAgeInEarthYears", testAgeInEarthYears),
|
61
|
+
("testAgeInMercuryYears", testAgeInMercuryYears),
|
62
|
+
("testAgeInVenusYears", testAgeInVenusYears),
|
63
|
+
("testAgeOnMars", testAgeOnMars),
|
64
|
+
("testAgeOnJupiter", testAgeOnJupiter),
|
65
|
+
("testAgeOnSaturn", testAgeOnSaturn),
|
66
|
+
("testAgeOnUranus", testAgeOnUranus),
|
67
|
+
("testAgeOnNeptune", testAgeOnNeptune),
|
68
|
+
]
|
69
|
+
}
|
58
70
|
}
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
//Solution goes in Sources
|
@@ -1,6 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
import XCTest
|
2
|
+
import Foundation
|
3
|
+
@testable import Strain
|
4
4
|
|
5
5
|
private extension XCTest {
|
6
6
|
func XCTAssertEqualMultiArray(_ aArray1: [[Int]], _ aArray2: [[Int]]) {
|
@@ -8,8 +8,7 @@ private extension XCTest {
|
|
8
8
|
}
|
9
9
|
}
|
10
10
|
|
11
|
-
class
|
12
|
-
|
11
|
+
class StrainTests: XCTestCase {
|
13
12
|
func testEmptyKeep() {
|
14
13
|
|
15
14
|
XCTAssertTrue ([].keep {each -> Bool in each < 10}.isEmpty)
|
@@ -83,4 +82,20 @@ class StrainTest: XCTestCase {
|
|
83
82
|
XCTAssertEqualMultiArray([[1, 2, 3], [2, 1, 2], [2, 2, 1]], result)
|
84
83
|
}
|
85
84
|
|
85
|
+
static var allTests: [(String, (StrainTests) -> () throws -> Void)] {
|
86
|
+
return [
|
87
|
+
("testEmptyKeep", testEmptyKeep),
|
88
|
+
("testKeepEverything", testKeepEverything),
|
89
|
+
("testKeepFirstAndLast", testKeepFirstAndLast),
|
90
|
+
("testKeepNeitherFirstNorLast", testKeepNeitherFirstNorLast),
|
91
|
+
("testKeepStrings", testKeepStrings),
|
92
|
+
("testKeepArrays ", testKeepArrays ),
|
93
|
+
("testEmptyDiscard", testEmptyDiscard),
|
94
|
+
("testDiscardNothing", testDiscardNothing),
|
95
|
+
("testDiscardFirstAndLast", testDiscardFirstAndLast),
|
96
|
+
("testDiscardNeitherFirstNorLast", testDiscardNeitherFirstNorLast),
|
97
|
+
("testDiscardStrings", testDiscardStrings),
|
98
|
+
("testDiscardArrays ", testDiscardArrays ),
|
99
|
+
]
|
100
|
+
}
|
86
101
|
}
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
//Solution goes in Sources
|
data/tracks/swift/exercises/sublist/{SubListTest.swift → Tests/SublistTests/SublistTests.swift}
RENAMED
@@ -1,7 +1,7 @@
|
|
1
1
|
import XCTest
|
2
|
+
@testable import Sublist
|
2
3
|
|
3
|
-
class
|
4
|
-
|
4
|
+
class SublistTests: XCTestCase {
|
5
5
|
func testEmptyLists() {
|
6
6
|
|
7
7
|
XCTAssertEqual(.equal, classifier(listOne: [], listTwo: []) )
|
@@ -92,4 +92,26 @@ class SubListTest: XCTestCase {
|
|
92
92
|
|
93
93
|
XCTAssertEqual(.unequal, classifier(listOne: [1, 0, 1], listTwo: [10, 1]))
|
94
94
|
}
|
95
|
+
|
96
|
+
static var allTests: [(String, (SublistTests) -> () throws -> Void)] {
|
97
|
+
return [
|
98
|
+
("testEmptyLists", testEmptyLists),
|
99
|
+
("testEmptyListWithinNonEmptyList", testEmptyListWithinNonEmptyList),
|
100
|
+
("testNonEmptyListContainingEmptyList", testNonEmptyListContainingEmptyList),
|
101
|
+
("testEqualLists", testEqualLists),
|
102
|
+
("testDifferentLists", testDifferentLists),
|
103
|
+
("testFalseStart", testFalseStart),
|
104
|
+
("testConsecutive", testConsecutive),
|
105
|
+
("testSublistAtStart", testSublistAtStart),
|
106
|
+
("testSublistInMiddle", testSublistInMiddle),
|
107
|
+
("testSublistAtEnd", testSublistAtEnd),
|
108
|
+
("testAtStartOfSuperList", testAtStartOfSuperList),
|
109
|
+
("testInMiddleOfSuperList", testInMiddleOfSuperList),
|
110
|
+
("testAtEndOfSuperList", testAtEndOfSuperList),
|
111
|
+
("testFirstListMissingElementFromSecondList", testFirstListMissingElementFromSecondList),
|
112
|
+
("testSecondListMissingElementFromFirstList", testSecondListMissingElementFromFirstList),
|
113
|
+
("testOrderMattersToAList", testOrderMattersToAList),
|
114
|
+
("testSameDigitsButDifferentNumbers", testSameDigitsButDifferentNumbers),
|
115
|
+
]
|
116
|
+
}
|
95
117
|
}
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
//Solution goes in Sources
|
@@ -1,9 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
#endif
|
4
|
-
|
5
|
-
class SumOfMultiplesTest: XCTestCase {
|
1
|
+
import XCTest
|
2
|
+
@testable import SumOfMultiples
|
6
3
|
|
4
|
+
class SumOfMultiplesTests: XCTestCase {
|
7
5
|
func testSumTo1() {
|
8
6
|
XCTAssertEqual(0, SumOfMultiples.toLimit(1, inMultiples: [3, 5]))
|
9
7
|
}
|
@@ -48,4 +46,19 @@ class SumOfMultiplesTest: XCTestCase {
|
|
48
46
|
XCTAssertEqual(45, SumOfMultiples.toLimit(10, inMultiples: [0, 1]))
|
49
47
|
}
|
50
48
|
|
49
|
+
static var allTests: [(String, (SumOfMultiplesTests) -> () throws -> Void)] {
|
50
|
+
return [
|
51
|
+
("testSumTo1", testSumTo1),
|
52
|
+
("testSumTo3", testSumTo3),
|
53
|
+
("testSumTo10", testSumTo10),
|
54
|
+
("testSumTo100", testSumTo100),
|
55
|
+
("testSumTo1000", testSumTo1000),
|
56
|
+
("testConfigurable_7_13_17_to_20", testConfigurable_7_13_17_to_20),
|
57
|
+
("testConfigurable_4_6_to_15", testConfigurable_4_6_to_15),
|
58
|
+
("testConfigurable_5_6_8_to_150", testConfigurable_5_6_8_to_150),
|
59
|
+
("testConfigurable_43_47_to_10000", testConfigurable_43_47_to_10000),
|
60
|
+
("testConfigurable_0_to_10", testConfigurable_0_to_10),
|
61
|
+
("testConfigurable_0_1_to_10", testConfigurable_0_1_to_10),
|
62
|
+
]
|
63
|
+
}
|
51
64
|
}
|
data/tracks/swift/exercises/tournament/{TournamentExample.swift → Sources/TournamentExample.swift}
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import Foundation
|
2
2
|
|
3
3
|
private extension String {
|
4
4
|
|
@@ -49,7 +49,7 @@ struct Tournament {
|
|
49
49
|
return wins * 3 + draws
|
50
50
|
}
|
51
51
|
|
52
|
-
mutating func addOutcome( _ outcome: Outcome )
|
52
|
+
mutating func addOutcome( _ outcome: Outcome ) {
|
53
53
|
switch outcome {
|
54
54
|
case .loss :
|
55
55
|
losses += 1
|
@@ -63,8 +63,8 @@ struct Tournament {
|
|
63
63
|
}
|
64
64
|
}
|
65
65
|
|
66
|
-
private var teams = [String
|
67
|
-
private mutating func addResult(_ team1: String, team2: String, outcome: Outcome)
|
66
|
+
private var teams = [String: TeamResult]()
|
67
|
+
private mutating func addResult(_ team1: String, team2: String, outcome: Outcome) {
|
68
68
|
// Invert outcome for the second team.
|
69
69
|
let outcome2: Outcome = (outcome == Outcome.win) ? Outcome.loss :
|
70
70
|
(outcome == Outcome.loss) ? Outcome.win :
|
@@ -75,7 +75,7 @@ struct Tournament {
|
|
75
75
|
|
76
76
|
private var teamResult = TeamResult()
|
77
77
|
|
78
|
-
private mutating func addTeamOutcome(_ team: String, _ outcome: Outcome)
|
78
|
+
private mutating func addTeamOutcome(_ team: String, _ outcome: Outcome) {
|
79
79
|
if teams[team] != nil {
|
80
80
|
teamResult = teams[team]!
|
81
81
|
teamResult.addOutcome(outcome)
|
@@ -117,12 +117,12 @@ struct Tournament {
|
|
117
117
|
|
118
118
|
textOutput += header
|
119
119
|
func sortKeysByValue() -> [String] {
|
120
|
-
var sortByValue = [(String, Int)]()
|
120
|
+
var sortByValue = [(team : String, score: Int, mp: Int)]()
|
121
121
|
for each in Array(teams.keys) {
|
122
122
|
let tempVal = teams[each]!
|
123
|
-
sortByValue.append((each, tempVal.score))
|
123
|
+
sortByValue.append((each, tempVal.score, tempVal.played))
|
124
124
|
}
|
125
|
-
sortByValue.sort { $0.1 > $1.1
|
125
|
+
sortByValue.sort { $0.score == $1.score ? $0.mp > $1.mp : $0.score > $1.score }
|
126
126
|
var sortedKeys = [String]()
|
127
127
|
for each in sortByValue {
|
128
128
|
sortedKeys.append(each.0)
|
@@ -185,5 +185,4 @@ struct Tournament {
|
|
185
185
|
|
186
186
|
return tournament.writeResults()
|
187
187
|
}
|
188
|
-
|
189
188
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
//Solution goes in Sources
|
@@ -1,9 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
#endif
|
4
|
-
|
5
|
-
class TournamentTest: XCTestCase {
|
1
|
+
import XCTest
|
2
|
+
@testable import Tournament
|
6
3
|
|
4
|
+
class TournamentTests: XCTestCase {
|
7
5
|
let input1 =
|
8
6
|
"Allegoric Alaskians;Blithering Badgers;win\n" +
|
9
7
|
"Devastating Donkeys;Courageous Californians;draw\n" +
|
@@ -14,15 +12,14 @@ class TournamentTest: XCTestCase {
|
|
14
12
|
|
15
13
|
let input2 =
|
16
14
|
"Allegoric Alaskians;Blithering Badgers;win\n" +
|
17
|
-
"Devastating
|
15
|
+
"Devastating Donkeys;Courageous Californians;draw\n" +
|
18
16
|
"Devastating Donkeys;Allegoric Alaskians;win\n" +
|
19
17
|
"\n" +
|
20
18
|
"Courageous Californians;Blithering Badgers;loss\n" +
|
21
19
|
"Bla;Bla;Bla\n" +
|
22
20
|
"Blithering Badgers;Devastating Donkeys;loss\n" +
|
23
21
|
"# Yackity yackity yack\n" +
|
24
|
-
"Allegoric Alaskians;Courageous Californians;win\n"
|
25
|
-
"Devastating Donkeys;Courageous Californians;draw"
|
22
|
+
"Allegoric Alaskians;Courageous Californians;win\n"
|
26
23
|
|
27
24
|
let input3 =
|
28
25
|
"Allegoric Alaskians;Blithering Badgers;win\n" +
|
@@ -65,4 +62,11 @@ class TournamentTest: XCTestCase {
|
|
65
62
|
XCTAssertEqual(tournament.tally(input3), expected3)
|
66
63
|
}
|
67
64
|
|
65
|
+
static var allTests: [(String, (TournamentTests) -> () throws -> Void)] {
|
66
|
+
return [
|
67
|
+
("testGoodInput", testGoodInput),
|
68
|
+
("testIgnoreBadlines", testIgnoreBadlines),
|
69
|
+
("testinCompleteCompetition", testinCompleteCompetition),
|
70
|
+
]
|
71
|
+
}
|
68
72
|
}
|