@@ -10,6 +10,9 @@ final class BeEmptyTest: XCTestCase, XCTestCaseProvider {
1010 expect ( [ ] as [ CInt ] ) . to ( beEmpty ( ) )
1111 expect ( [ 1 ] as [ CInt ] ) . toNot ( beEmpty ( ) )
1212
13+ expect ( [ ] as Set < Int > ) . to ( beEmpty ( ) )
14+ expect ( [ 1 ] as Set < Int > ) . toNot ( beEmpty ( ) )
15+
1316#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
1417 expect ( NSDictionary ( ) as? [ Int : Int ] ) . to ( beEmpty ( ) )
1518 expect ( NSDictionary ( object: 1 , forKey: 1 as NSNumber ) as? [ Int : Int ] ) . toNot ( beEmpty ( ) )
@@ -47,6 +50,13 @@ final class BeEmptyTest: XCTestCase, XCTestCaseProvider {
4750 expect ( [ 1 ] ) . to ( beEmpty ( ) )
4851 }
4952
53+ failsWithErrorMessage ( " expected to not be empty, got <Set([])> " ) {
54+ expect ( [ ] as Set < Int > ) . toNot ( beEmpty ( ) )
55+ }
56+ failsWithErrorMessage ( " expected to be empty, got <Set([1])> " ) {
57+ expect ( [ 1 ] as Set < Int > ) . to ( beEmpty ( ) )
58+ }
59+
5060#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
5161 failsWithErrorMessage ( " expected to not be empty, got <{()}> " ) {
5262 expect ( NSSet ( ) ) . toNot ( beEmpty ( ) )
@@ -93,6 +103,13 @@ final class BeEmptyTest: XCTestCase, XCTestCaseProvider {
93103 expect ( nil as [ CInt ] ? ) . toNot ( beEmpty ( ) )
94104 }
95105
106+ failsWithErrorMessageForNil ( " expected to be empty, got <nil> " ) {
107+ expect ( nil as Set < Int > ? ) . to ( beEmpty ( ) )
108+ }
109+ failsWithErrorMessageForNil ( " expected to not be empty, got <nil> " ) {
110+ expect ( nil as Set < Int > ? ) . toNot ( beEmpty ( ) )
111+ }
112+
96113 failsWithErrorMessageForNil ( " expected to be empty, got <nil> " ) {
97114 expect ( nil as TestOptionSet ? ) . to ( beEmpty ( ) )
98115 }
0 commit comments