Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion exercises/concept/freelancer-rates/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ let package = Package(
dependencies: []),
.testTarget(
name: "FreelancerRatesTests",
dependencies: ["FreelancerRates", .product(name: "Numerics", package: "swift-numerics"),]),
dependencies: ["FreelancerRates", .product(name: "RealModule", package: "swift-numerics"),]),
]
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Testing
import Foundation
import Numerics
import RealModule

@testable import FreelancerRates

Expand Down
2 changes: 1 addition & 1 deletion exercises/concept/lasagna-master/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ let package = Package(
dependencies: []),
.testTarget(
name: "LasagnaMasterTests",
dependencies: ["LasagnaMaster", .product(name: "Numerics", package: "swift-numerics")]),
dependencies: ["LasagnaMaster", .product(name: "RealModule", package: "swift-numerics")]),
]
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Testing
import Foundation
import Numerics
import RealModule

@testable import LasagnaMaster

Expand Down
2 changes: 1 addition & 1 deletion exercises/concept/pizza-slices/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ let package = Package(
dependencies: []),
.testTarget(
name: "PizzaSlicesTests",
dependencies: ["PizzaSlices", .product(name: "Numerics", package: "swift-numerics"),]),
dependencies: ["PizzaSlices", .product(name: "RealModule", package: "swift-numerics"),]),
]
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Testing
import Foundation
import Numerics
import RealModule

@testable import PizzaSlices

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
You will have to implement your own equality operator for the `ComplexNumber` object.
This will pose the challenge of comparing two floating point numbers.
It might be useful to use the method `isApproximatelyEqual(to:absoluteTolerance:)` which can be found in the [Numerics][swift-numberics] library.
Due to preformance issues will you only have access to the `RealModule` part.
To import it simply write: `import RealModule` at the top of the file.
A given tolerance of `0.00001` should be enough to pass the tests.
The library is already imported in the project so it is just to import it in your file.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import Numerics
import RealModule

struct ComplexNumbers: Equatable {

Expand Down
5 changes: 2 additions & 3 deletions exercises/practice/complex-numbers/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ let package = Package(
.target(
name: "ComplexNumbers",
dependencies: [
.product(name: "Numerics", package: "swift-numerics")
.product(name: "RealModule", package: "swift-numerics")
]),
.testTarget(
name: "ComplexNumbersTests",
dependencies: [
"ComplexNumbers",
.product(name: "Numerics", package: "swift-numerics"),
"ComplexNumbers"
]),
]
)
2 changes: 1 addition & 1 deletion exercises/practice/space-age/.meta/template.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Testing
import Foundation
import Numerics
import RealModule
@testable import {{exercise|camelCase}}

let RUNALL = Bool(ProcessInfo.processInfo.environment["RUNALL", default: "false"]) ?? false
Expand Down
5 changes: 2 additions & 3 deletions exercises/practice/space-age/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ let package = Package(
],
targets: [
.target(
name: "SpaceAge",
dependencies: [.product(name: "Numerics", package: "swift-numerics")]),
name: "SpaceAge"
.testTarget(
name: "SpaceAgeTests",
dependencies: [.product(name: "Numerics", package: "swift-numerics"), "SpaceAge"]),
dependencies: [.product(name: "RealModule", package: "swift-numerics"), "SpaceAge"]),
]
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation
import Numerics
import RealModule
import Testing

@testable import SpaceAge
Expand Down