-
-
Notifications
You must be signed in to change notification settings - Fork 242
Expand file tree
/
Copy pathElementPathTest.swift
More file actions
24 lines (18 loc) · 697 Bytes
/
ElementPathTest.swift
File metadata and controls
24 lines (18 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import XCTest
import DifferenceKit
final class ElementPathTestCase: XCTestCase {
func testHashable() {
let e1 = ElementPath(element: 0, section: 0)
let e2 = ElementPath(element: 0, section: 0)
XCTAssertEqual(e1, e2)
XCTAssertEqual(e1.hashValue, e2.hashValue)
let e3 = ElementPath(element: 0, section: 0)
let e4 = ElementPath(element: 0, section: 1)
XCTAssertNotEqual(e3, e4)
XCTAssertNotEqual(e3.hashValue, e4.hashValue)
let e5 = ElementPath(element: 0, section: 0)
let e6 = ElementPath(element: 1, section: 1)
XCTAssertNotEqual(e5, e6)
XCTAssertNotEqual(e5.hashValue, e6.hashValue)
}
}