Skip to content

Commit

Permalink
♻️ Use Equatable
Browse files Browse the repository at this point in the history
  • Loading branch information
oschrenk committed Jan 19, 2025
1 parent eb8d682 commit 3740daa
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Tests/OrderTests.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Foundation
@testable import plan
import Testing

Expand All @@ -10,9 +11,9 @@ import Testing
#expect(throws: Never.self) {
let order = Order.parse(s: "title.full")!
let comparator = EventComparator(order: order)
let output = events.sorted(using: comparator)[0].title.full
let output = events.sorted(using: comparator)

#expect(output == eventA.title.full)
#expect(output == [eventA, eventB])
}
}

Expand All @@ -24,9 +25,9 @@ import Testing
#expect(throws: Never.self) {
let order = Order.parse(s: "title.full:desc")!
let comparator = EventComparator(order: order)
let output = events.sorted(using: comparator)[0].title.full
let output = events.sorted(using: comparator)

#expect(output == eventB.title.full)
#expect(output == [eventB, eventA])
}
}
}

0 comments on commit 3740daa

Please sign in to comment.