Skip to content

Commit 47a81fd

Browse files
committed
Add swift-numerics dependency
1 parent acbee3c commit 47a81fd

File tree

2 files changed

+28
-13
lines changed

2 files changed

+28
-13
lines changed

Package.resolved

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -125,20 +125,26 @@ if attributeGraphCondition {
125125
// Remove this when swift-testing is 1.0.0
126126
let swiftTestingCondition = envEnable("OPENGRAPH_SWIFT_TESTING", default: true)
127127
if swiftTestingCondition {
128-
package.dependencies.append(
129-
.package(url: "https://github.com/apple/swift-testing", exact: "0.6.0")
130-
)
131-
openGraphTestTarget.dependencies.append(
132-
.product(name: "Testing", package: "swift-testing")
133-
)
128+
var dependencies = package.dependencies
129+
dependencies.append(contentsOf: [
130+
.package(url: "https://github.com/apple/swift-testing", exact: "0.6.0"),
131+
.package(url: "https://github.com/apple/swift-numerics", from: "1.0.2"),
132+
])
133+
package.dependencies = dependencies
134+
135+
func addTestDependency(_ target: Target) {
136+
var dependencies = target.dependencies
137+
dependencies.append(contentsOf: [
138+
.product(name: "Testing", package: "swift-testing"),
139+
.product(name: "RealModule", package: "swift-numerics"),
140+
])
141+
target.dependencies = dependencies
142+
}
143+
addTestDependency(openGraphTestTarget)
134144
package.targets.append(openGraphTestTarget)
135-
openGraphCompatibilityTestTarget.dependencies.append(
136-
.product(name: "Testing", package: "swift-testing")
137-
)
145+
addTestDependency(openGraphCompatibilityTestTarget)
138146
package.targets.append(openGraphCompatibilityTestTarget)
139-
openGraphTempTestTarget.dependencies.append(
140-
.product(name: "Testing", package: "swift-testing")
141-
)
147+
addTestDependency(openGraphTempTestTarget)
142148
package.targets.append(openGraphTempTestTarget)
143149
}
144150

0 commit comments

Comments
 (0)