-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* doesnt work * works * doesn't work This reverts commit f2eb2d5. * wip * wip * Revert "wip" This reverts commit dff88f5. * Revert "wip" This reverts commit 361345c. * Revert "doesn't work" This reverts commit 64a9c38. * wip * wip * wip * wip * wip * clean up tests * clean up * fix test --------- Co-authored-by: Brandon Williams <[email protected]>
- Loading branch information
1 parent
18d5db4
commit 4d04eb0
Showing
11 changed files
with
304 additions
and
46 deletions.
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
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
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
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
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 |
---|---|---|
@@ -1,16 +1,28 @@ | ||
#if swift(>=6) | ||
import SwiftNavigation | ||
import XCTest | ||
import SwiftNavigation | ||
import XCTest | ||
|
||
class ObserveTests: XCTestCase { | ||
class ObserveTests: XCTestCase { | ||
#if swift(>=6) | ||
@MainActor | ||
func testCompiles() { | ||
func testIsolation() { | ||
var count = 0 | ||
let token = SwiftNavigation.observe { | ||
count = 1 | ||
} | ||
XCTAssertEqual(count, 1) | ||
_ = token | ||
} | ||
#endif | ||
|
||
@MainActor | ||
func testTokenStorage() { | ||
var count = 0 | ||
observe { | ||
count += 1 | ||
} | ||
observe { | ||
count += 1 | ||
} | ||
XCTAssertEqual(count, 2) | ||
} | ||
#endif | ||
} |
Oops, something went wrong.