File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -133,25 +133,29 @@ public func run_MapReduceShortString(_ N: Int) {
133
133
134
134
@inline ( never)
135
135
public func run_MapReduceClass( _ N: Int ) {
136
- let numbers = ( 0 ..< 1000 ) . map { NSDecimalNumber ( integerLiteral: $0) }
136
+ #if _runtime(_ObjC)
137
+ let numbers = ( 0 ..< 1000 ) . map { NSDecimalNumber ( value: $0) }
137
138
138
139
var c = 0
139
140
for _ in 1 ... N*100 {
140
141
let mapped = numbers. map { $0. intValue &+ 5 }
141
142
c += mapped. reduce ( 0 , &+ )
142
143
}
143
144
CheckResults ( c != 0 , " IncorrectResults in MapReduce " )
145
+ #endif
144
146
}
145
147
146
148
@inline ( never)
147
149
public func run_MapReduceClassShort( _ N: Int ) {
148
- let numbers = ( 0 ..< 10 ) . map { NSDecimalNumber ( integerLiteral: $0) }
150
+ #if _runtime(_ObjC)
151
+ let numbers = ( 0 ..< 10 ) . map { NSDecimalNumber ( value: $0) }
149
152
150
153
var c = 0
151
154
for _ in 1 ... N*10000 {
152
155
let mapped = numbers. map { $0. intValue &+ 5 }
153
156
c += mapped. reduce ( 0 , &+ )
154
157
}
155
158
CheckResults ( c != 0 , " IncorrectResults in MapReduce " )
159
+ #endif
156
160
}
157
161
You can’t perform that action at this time.
0 commit comments