test: round-4 coverage expansion across 10 more sync operators#168
Closed
glennawatson wants to merge 1 commit into
Closed
test: round-4 coverage expansion across 10 more sync operators#168glennawatson wants to merge 1 commit into
glennawatson wants to merge 1 commit into
Conversation
- DetectStaleObservable: error / completion forwarding - BufferUntilIdleObservable: error path flushes pending buffer before forwarding - DebounceImmediateObservable: first-inline + debounce, flush-then-complete, flush-then-error - DebounceUntilObservable: condition-true immediate bypass + condition-false debounce - ScheduledValueObservable: relative-delay + absolute-due-time value scheduling - ScheduledSourceObservable: relative-delay + absolute-due-time per-emission scheduling - LatestOrDefaultObservable: seed + distinct + error forwarding - PairwiseObservable: adjacent pairs, single-element completes empty, error forwarding - WaitUntilObservable (sync): first-match emit-and-complete, error forwarding - SwitchIfEmptyObservable: fallback on empty, passthrough on non-empty, error forwarding
| public async Task WhenDetectStaleSourceErrors_ThenForwardsError() | ||
| { | ||
| var scheduler = new TestScheduler(); | ||
| var subject = new Subject<int>(); |
| public async Task WhenDetectStaleSourceCompletes_ThenForwardsCompletion() | ||
| { | ||
| var scheduler = new TestScheduler(); | ||
| var subject = new Subject<int>(); |
| public async Task WhenBufferUntilIdleSourceErrors_ThenFlushesThenForwardsError() | ||
| { | ||
| var scheduler = new TestScheduler(); | ||
| var subject = new Subject<int>(); |
| public async Task WhenDebounceImmediate_ThenFirstInlineThenDebouncedTail() | ||
| { | ||
| var scheduler = new TestScheduler(); | ||
| var subject = new Subject<int>(); |
| public async Task WhenDebounceImmediateCompletesWithPending_ThenFlushesThenCompletes() | ||
| { | ||
| var scheduler = new TestScheduler(); | ||
| var subject = new Subject<int>(); |
| public async Task WhenDebounceImmediateSourceErrors_ThenFlushesThenForwardsError() | ||
| { | ||
| var scheduler = new TestScheduler(); | ||
| var subject = new Subject<int>(); |
| public async Task WhenDebounceUntilConditionTrue_ThenImmediate() | ||
| { | ||
| var scheduler = new TestScheduler(); | ||
| var subject = new Subject<int>(); |
| public async Task WhenDebounceUntilConditionFalse_ThenDebounced() | ||
| { | ||
| var scheduler = new TestScheduler(); | ||
| var subject = new Subject<int>(); |
| [Test] | ||
| public async Task WhenLatestOrDefault_ThenSeedThenDistinctValues() | ||
| { | ||
| var subject = new Subject<int>(); |
| [Test] | ||
| public async Task WhenLatestOrDefaultSourceErrors_ThenForwardsError() | ||
| { | ||
| var subject = new Subject<int>(); |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #168 +/- ##
==========================================
+ Coverage 92.61% 92.75% +0.14%
==========================================
Files 224 224
Lines 8503 8503
Branches 930 930
==========================================
+ Hits 7875 7887 +12
+ Misses 410 400 -10
+ Partials 218 216 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
Folding into #167 — single PR for the test-coverage initiative. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Fourth round of coverage tests, prioritised by uncovered-line count. All 10 targets are small synchronous operators where the existing happy-path tests already cover the main flow — these tests fill in the terminal-notification (error / completion / dispose) and conditional branches.
Classes covered
Notes
Scheduleoverloads for values and sources have intentionally different semantics; tests assert against the actual contract (e.g.ScheduledValueObservabledoes not auto-complete after emit;ScheduledSourceObservablesubscribes synchronously and only delays per-emission dispatch).Test plan
dotnet build ReactiveUI.Extensions.slnx -c Release -warnaserror— cleandotnet test --solution ReactiveUI.Extensions.slnx -c Release— 4677 tests, 0 failed across net8.0 / net9.0 / net10.0