-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed an issue where optional comparisons would not be ordered correctly
- Loading branch information
1 parent
a877838
commit c686708
Showing
2 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// OptionalTests.swift | ||
// CodableDatastore | ||
// | ||
// Created by Dimitri Bouniol on 2024-04-20. | ||
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved. | ||
// | ||
|
||
import XCTest | ||
@testable import CodableDatastore | ||
|
||
final class OptionalTests: XCTestCase { | ||
func testComparable() throws { | ||
XCTAssertTrue(Int?.some(5) < Int?.some(10)) | ||
XCTAssertTrue(Int?.none < Int?.some(10)) | ||
XCTAssertFalse(Int?.some(5) < Int?.none) | ||
XCTAssertFalse(Int?.none < Int?.none) | ||
} | ||
} |