@@ -125,20 +125,26 @@ if attributeGraphCondition {
125
125
// Remove this when swift-testing is 1.0.0
126
126
let swiftTestingCondition = envEnable ( " OPENGRAPH_SWIFT_TESTING " , default: true )
127
127
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)
134
144
package . targets. append ( openGraphTestTarget)
135
- openGraphCompatibilityTestTarget. dependencies. append (
136
- . product( name: " Testing " , package : " swift-testing " )
137
- )
145
+ addTestDependency ( openGraphCompatibilityTestTarget)
138
146
package . targets. append ( openGraphCompatibilityTestTarget)
139
- openGraphTempTestTarget. dependencies. append (
140
- . product( name: " Testing " , package : " swift-testing " )
141
- )
147
+ addTestDependency ( openGraphTempTestTarget)
142
148
package . targets. append ( openGraphTempTestTarget)
143
149
}
144
150
0 commit comments