forked from OpenCombine/OpenCombine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update Subscribers.Demand Align the implementation with Xcode 15 SDK Combine’s swiftinterface * Update Demand.assertNonZero * [Optimize] Align with Combine interface * Fix WASM platform build issue * Fix flacky test case on Xcode 14.3.1
- Loading branch information
Showing
5 changed files
with
112 additions
and
70 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// ViolationsTests.swift | ||
// | ||
// | ||
// Created by Kyle on 2023/11/18. | ||
// | ||
|
||
#if !OPENCOMBINE_COMPATIBILITY_TEST | ||
@testable import OpenCombine | ||
import XCTest | ||
|
||
final class ViolationsTests: XCTestCase { | ||
func testDemandAssertNonZero() { | ||
let d0 = Subscribers.Demand.none | ||
let d1 = Subscribers.Demand.max(1) | ||
let d2 = Subscribers.Demand.unlimited | ||
|
||
assertCrashes { | ||
d0.assertNonZero() | ||
} | ||
d1.assertNonZero() | ||
d2.assertNonZero() | ||
} | ||
} | ||
#endif |