Skip to content

Add tests for the unified diff compare editor open path - #2807

Merged
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:compare-unified-open-tests
Jul 28, 2026
Merged

Add tests for the unified diff compare editor open path#2807
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:compare-unified-open-tests

Conversation

@vogella

@vogella vogella commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

The unified diff display had no functional test coverage. UnifiedDiffOpenTest pins the behavior of opening a compare editor with the unified diff preference enabled: a workspace-file input with shared document adapters opens a plain text editor with unified diff annotations instead of the classic compare editor, prepareInput runs exactly once, and an input without shared document adapters falls back to the classic compare editor. One test documents that the unified path currently runs prepareInput synchronously on the UI thread; its assertion is written to flip when a follow-up change moves the preparation onto the background-job pattern the classic editor already uses. This lands ahead of that threading change so the refactoring PR is reviewable against existing, passing pins.

Contributes to #2795

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Test Results

    54 files  ±0      54 suites  ±0   1h 2m 43s ⏱️ + 2m 57s
 4 690 tests +3   4 668 ✅ +3   22 💤 ±0  0 ❌ ±0 
11 964 runs  +9  11 811 ✅ +9  153 💤 ±0  0 ❌ ±0 

Results for commit aca8f85. ± Comparison against base commit 1d9741f.

♻️ This comment has been updated with latest results.

UnifiedDiffOpenTest pins the behavior of opening a compare editor with
the unified diff preference enabled: a workspace-file input with shared
document adapters opens a plain text editor with unified diff
annotations instead of the compare editor, prepareInput runs exactly
once, and an input without shared document adapters falls back to the
classic compare editor. One test documents that the unified path
currently runs prepareInput on the UI thread; its assertion flips when
the preparation moves to a background job.

Contributes to eclipse-platform#2795
@vogella
vogella force-pushed the compare-unified-open-tests branch from 0ce2899 to aca8f85 Compare July 28, 2026 14:19
@vogella
vogella merged commit 77eecda into eclipse-platform:master Jul 28, 2026
18 checks passed
@vogella
vogella deleted the compare-unified-open-tests branch July 28, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant