Open Maartz opened 9 months ago
Exercism/swift/pythagorean-triplet via 🐦 v5.9.2 took 5s
❯ RUNALL=true swift test
Building for debugging...
[3/3] Linking PythagoreanTripletPackageTests
Build complete! (0.55s)
Test Suite 'All tests' started at 2023-12-31 09:26:20.774.
Test Suite 'PythagoreanTripletPackageTests.xctest' started at 2023-12-31 09:26:20.775.
Test Suite 'PythagoreanTripletTests' started at 2023-12-31 09:26:20.775.
Test Case '-[PythagoreanTripletTests.PythagoreanTripletTests testNoMatchingTripletsFor1001]' started.
Test Case '-[PythagoreanTripletTests.PythagoreanTripletTests testNoMatchingTripletsFor1001]' passed (0.006 seconds).
Test Case '-[PythagoreanTripletTests.PythagoreanTripletTests testReturnsAllMatchingTriplets]' started.
Test Case '-[PythagoreanTripletTests.PythagoreanTripletTests testReturnsAllMatchingTriplets]' passed (0.000 seconds).
Test Case '-[PythagoreanTripletTests.PythagoreanTripletTests testSeveralMatchingTriplets]' started.
Test Case '-[PythagoreanTripletTests.PythagoreanTripletTests testSeveralMatchingTriplets]' passed (0.004 seconds).
Test Case '-[PythagoreanTripletTests.PythagoreanTripletTests testTripletsForLargeNumber]' started.
Test Case '-[PythagoreanTripletTests.PythagoreanTripletTests testTripletsForLargeNumber]' passed (3.673 seconds).
Test Case '-[PythagoreanTripletTests.PythagoreanTripletTests testTripletsWhoseSumIs1000]' started.
Test Case '-[PythagoreanTripletTests.PythagoreanTripletTests testTripletsWhoseSumIs1000]' passed (0.006 seconds).
Test Case '-[PythagoreanTripletTests.PythagoreanTripletTests testTripletsWhoseSumIs108]' started.
Test Case '-[PythagoreanTripletTests.PythagoreanTripletTests testTripletsWhoseSumIs108]' passed (0.000 seconds).
Test Case '-[PythagoreanTripletTests.PythagoreanTripletTests testTripletsWhoseSumIs12]' started.
Test Case '-[PythagoreanTripletTests.PythagoreanTripletTests testTripletsWhoseSumIs12]' passed (0.000 seconds).
Test Suite 'PythagoreanTripletTests' passed at 2023-12-31 09:26:24.465.
Executed 7 tests, with 0 failures (0 unexpected) in 3.689 (3.690) seconds
Test Suite 'PythagoreanTripletPackageTests.xctest' passed at 2023-12-31 09:26:24.465.
Executed 7 tests, with 0 failures (0 unexpected) in 3.689 (3.690) seconds
Test Suite 'All tests' passed at 2023-12-31 09:26:24.465.
Executed 7 tests, with 0 failures (0 unexpected) in 3.689 (3.691) seconds
For the Pythagorean Triplet exericse, it could be great to make it leverage async/DispatchGroup/Actors/withTaskGroup.
The idea comes from translating the Elixir code into Swift.
It was nice and easy but the test suite itself is not ready to handle this.
As the exercise is tagged as Medium, I assume asynchronous code fit in this tier of "difficulty".
Locally I've updated the code to handle async and because of this, sorting of the results.
Cheers