We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c825eed commit e9b9dbcCopy full SHA for e9b9dbc
1 file changed
Tests/JSONAPITests/SwiftIdentifiableTests.swift
@@ -25,6 +25,19 @@ final class SwiftIdentifiableTests: XCTestCase {
25
XCTAssertEqual(hash[t1.id], String(describing: t1.id))
26
XCTAssertEqual(hash[t2.id], String(describing: t2.id))
27
}
28
+
29
+ func test_Id_ID_equivalence() {
30
+ // it's not at all great to have both of these names for
31
+ // the Id type, but I could not do better than this and
32
+ // still have a typealias for the Id type on the
33
+ // ResourceObjectProxy protocol. One protocol's typealias
34
+ // will collide with anotehr protocol's associatedtype in
35
+ // very ugly ways.
36
37
+ XCTAssert(TestType.ID.self == TestType.Id.self)
38
39
+ XCTAssertEqual(TestType.ID(rawValue: "hello"), TestType.Id(rawValue: "hello"))
40
+ }
41
42
43
fileprivate enum TestDescription: JSONAPI.ResourceObjectDescription {
0 commit comments