File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -267,6 +267,19 @@ public func run_ArrayPlusEqualFiveElementCollection(_ N: Int) {
267
267
}
268
268
}
269
269
270
+ @inline ( never)
271
+ public func appendThreeElements( _ a: inout [ Int ] ) {
272
+ a += [ 1 , 2 , 3 ]
273
+ }
274
+
275
+ @inline ( never)
276
+ public func run_ArrayPlusEqualThreeElements( _ N: Int ) {
277
+ for _ in 0 ..< ( 10_000 * N) {
278
+ var a : [ Int ] = [ ]
279
+ appendThreeElements ( & a)
280
+ }
281
+ }
282
+
270
283
// Append the utf8 elements of an ascii string to a [UInt8]
271
284
@inline ( never)
272
285
public func run_ArrayAppendAscii( _ N: Int ) {
Original file line number Diff line number Diff line change @@ -167,6 +167,7 @@ addPrecommitTest("ArrayOfRef", run_ArrayOfRef)
167
167
addPrecommitTest ( " ArrayPlusEqualArrayOfInt " , run_ArrayPlusEqualArrayOfInt)
168
168
addPrecommitTest ( " ArrayPlusEqualFiveElementCollection " , run_ArrayPlusEqualFiveElementCollection)
169
169
addPrecommitTest ( " ArrayPlusEqualSingleElementCollection " , run_ArrayPlusEqualSingleElementCollection)
170
+ addPrecommitTest ( " ArrayPlusEqualThreeElements " , run_ArrayPlusEqualThreeElements)
170
171
addPrecommitTest ( " ArraySubscript " , run_ArraySubscript)
171
172
addPrecommitTest ( " ArrayValueProp " , run_ArrayValueProp)
172
173
addPrecommitTest ( " ArrayValueProp2 " , run_ArrayValueProp2)
You can’t perform that action at this time.
0 commit comments