Skip to content

Commit 135b9b0

Browse files
author
Lance Parker
committed
Max's feedback
1 parent 09d73a8 commit 135b9b0

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

validation-test/stdlib/Arrays.swift.gyb

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,9 @@ ArrayTestSuite.test("BridgedFromObjC.Nonverbatim.ImmutableArrayIsCopied") {
313313
unsafeBitCast(nsa, to: Int.self),
314314
unsafeBitCast(bridgedBack, to: Int.self))
315315

316-
_fixLifetime(nsa)
317-
_fixLifetime(a)
318-
_fixLifetime(bridgedBack)
316+
_blackHole(nsa)
317+
_blackHole(a)
318+
_blackHole(bridgedBack)
319319
}
320320

321321
ArrayTestSuite.test("BridgedFromObjC.Verbatim.Subscript") {
@@ -432,7 +432,7 @@ ArrayTestSuite.test("BridgedFromObjC.Verbatim.RemoveAll") {
432432
expectNotEqual(identity2, identity1)
433433
expectEqual(3, a1.count)
434434
expectEqual(1010, (a1[0] as! TestObjCValueTy).value)
435-
assert(a2._buffer.capacity < originalCapacity)
435+
expectLT(a2._buffer.capacity, originalCapacity)
436436
expectEqual(0, a2.count)
437437
}
438438

@@ -500,7 +500,7 @@ ArrayTestSuite.test("BridgedFromObjC.Nonverbatim.RemoveAll") {
500500
expectNotEqual(identity2, identity1)
501501
expectEqual(3, a1.count)
502502
expectEqual(1010, a1[0].value)
503-
assert(a2._buffer.capacity < originalCapacity)
503+
expectLT(a2._buffer.capacity, originalCapacity)
504504
expectEqual(0, a2.count)
505505
}
506506

@@ -519,7 +519,7 @@ ArrayTestSuite.test("BridgedFromObjC.Nonverbatim.RemoveAll") {
519519
expectNotEqual(identity2, identity1)
520520
expectEqual(3, a1.count)
521521
expectEqual(1010, a1[0].value)
522-
assert(a2._buffer.capacity >= originalCapacity)
522+
expectGE(a2._buffer.capacity, originalCapacity)
523523
expectEqual(0, a2.count)
524524
}
525525
}
@@ -553,8 +553,6 @@ ArrayTestSuite.test("BridgedFromObjC.Verbatim.Generate") {
553553
values.append((value as! TestObjCValueTy).value)
554554
}
555555
expectEqual(values, [1010, 1020, 1030])
556-
// The following is not required by the IteratorProtocol protocol, but
557-
// it is a nice QoI.
558556
expectNil(iter.next())
559557
expectNil(iter.next())
560558
expectNil(iter.next())
@@ -783,7 +781,7 @@ ArrayTestSuite.test("BridgedFromObjC.Verbatim.EqualityTest_Small") {
783781
ArrayTestSuite.test("BridgedToObjC.Verbatim.Count") {
784782
let d = getBridgedNSArrayOfRefTypesBridgedVerbatim()
785783

786-
assert(d.count == 3)
784+
expectEqual(3, d.count)
787785
}
788786

789787
ArrayTestSuite.test("BridgedToObjC.Verbatim.ObjectForKey") {

0 commit comments

Comments
 (0)