Skip to content

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

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:compare-unified-open-tests
Open

Add tests for the unified diff compare editor open path#2807
vogella wants to merge 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

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
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Test Results

   36 files   -    18     36 suites   - 18   42m 36s ⏱️ - 16m 29s
4 688 tests +    3  4 643 ✅  -    20   45 💤 +23  0 ❌ ±0 
7 972 runs   - 3 977  7 861 ✅  - 3 935  111 💤  - 42  0 ❌ ±0 

Results for commit 0ce2899. ± Comparison against base commit fe3597d.

This pull request skips 23 tests.
org.eclipse.core.tests.resources.regression.Bug_026294 ‑ testDeleteClosedProjectLinux
org.eclipse.core.tests.resources.regression.Bug_026294 ‑ testDeleteFolderLinux
org.eclipse.core.tests.resources.regression.Bug_026294 ‑ testDeleteOpenProjectLinux
org.eclipse.core.tests.resources.regression.Bug_044106 ‑ testDeleteLinkedFile
org.eclipse.core.tests.resources.regression.Bug_044106 ‑ testDeleteLinkedFileKeepHistory
org.eclipse.core.tests.resources.regression.Bug_044106 ‑ testDeleteLinkedFolder
org.eclipse.core.tests.resources.regression.Bug_044106 ‑ testDeleteLinkedFolderKeepHistory
org.eclipse.core.tests.resources.regression.Bug_044106 ‑ testDeleteLinkedFolderParentKeepHistory
org.eclipse.core.tests.resources.regression.Bug_044106 ‑ testDeleteLinkedResourceInProject
org.eclipse.core.tests.resources.regression.Bug_044106 ‑ testDeleteLinkedResourceInProjectKeepHistory
…

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