Skip to content

Commit

Permalink
Fix build issue on older versions of swift
Browse files Browse the repository at this point in the history
  • Loading branch information
younata committed Dec 13, 2024
1 parent 6639400 commit 8ce89c7
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Tests/NimbleTests/Matchers/BeIdenticalToObjectTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,10 @@ final class BeIdenticalToObjectTest: XCTestCase {
}

func testBeIdenticalToAnyObjectProtocol() {
protocol SomeObject: AnyObject {}
class ConcreteImpl: SomeObject {
init() {}
}

let object = ConcreteImpl()
let object = AnObjectImplementation()

expect(object as SomeObject).to(be(object))
expect(object as SomeObject).to(beIdenticalTo(object))
expect(object as AnObjectProtocol).to(be(object))
expect(object as AnObjectProtocol).to(beIdenticalTo(object))
}

func testBeIdenticalToNegative() {
Expand Down Expand Up @@ -70,5 +65,9 @@ final class BeIdenticalToObjectTest: XCTestCase {
expect(self.testObjectA) === testObjectA
expect(self.testObjectA) !== testObjectB
}
}

private protocol AnObjectProtocol: AnyObject {}
private final class AnObjectImplementation: AnObjectProtocol {
init() {}
}

0 comments on commit 8ce89c7

Please sign in to comment.