Skip to content

Commit 72b7caa

Browse files
committed
Merge pull request #10 from apple/stdlib-unittest-expect-nil
StdlibUnittest renamed 'expectEmpty()' and 'expectNotEmpty()' to 'expectNil()' and 'expectNotNil()'
2 parents f4f5da2 + 0765e21 commit 72b7caa

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

PlaygroundLogger/PlaygroundLogger/TestCases.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,11 +350,11 @@ class StackWorksTestCase : TestCase {
350350
expectEqual(2, stack.pop())
351351
expectEqual(1, stack.pop())
352352
expectTrue(stack.empty)
353-
expectEmpty(stack.tryPop())
353+
expectNil(stack.tryPop())
354354
stack.push(4)
355355
expectFalse(stack.empty)
356356
TestHelpers.unwrapOrFail(stack.tryPop())
357-
expectEmpty(stack.tryPop())
357+
expectNil(stack.tryPop())
358358
}
359359
}
360360

@@ -372,7 +372,7 @@ class NeverLoggingPolicyTestCase : TestCase {
372372
logdata = playground_log (object, "object", 1, 0,0,0,0)
373373
decoded = TestHelpers.unwrapOrFail( playground_log_decode(logdata) )
374374
let gap2 = decoded.object as? PlaygroundDecodedObject_Gap
375-
expectEmpty(gap2)
375+
expectNil(gap2)
376376
}
377377
}
378378

@@ -715,7 +715,7 @@ class StructLoggingTestCase : TestCase {
715715
func doTest() {
716716
struct S { var a = 1 }
717717
let mirror = LoggerMirror.reflect(S())
718-
expectEmpty(mirror.quickLookObject)
718+
expectNil(mirror.quickLookObject)
719719
}
720720
}
721721

PlaygroundLogger/PlaygroundLogger/TestInfrastructure.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ struct TestHelpers {
178178

179179
@discardableResult
180180
static func unwrapOrFail<T>(_ x: T?) -> T {
181-
let _ = expectNotEmpty(x)
181+
let _ = expectNotNil(x)
182182
return x!
183183
}
184184

0 commit comments

Comments
 (0)