Skip to content

Commit

Permalink
Add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
stephencelis committed Feb 1, 2024
1 parent e072139 commit c01f5f6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Tests/CasePathsTests/CasePathsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ final class CasePathsTests: XCTestCase {
guard let b = caseB(valueA) else { return XCTFail() }
XCTAssertEqual(b, .b("Hello"))
}

func testExistentials_Optional() {
let foo: PartialCaseKeyPath<Foo> = \.foo
XCTAssertNotNil(foo(String?.none as Any))
XCTAssertNotNil(foo(String?.some("Blob") as Any))
XCTAssertNotNil(foo("Blob"))
}
#endif
}

Expand Down

0 comments on commit c01f5f6

Please sign in to comment.