Fix the failing LexOptionsDlg InitializeUIModeControls shift test - #1048
Merged
Conversation
Measure the shift delta from m_labelAdvanced's observed move instead of recomputing it with a hardcoded padding literal, so the test asserts the one-shift invariant rather than the production arithmetic. Add an assertion that the injected group box clears m_labelAdvanced to keep proof the shift was sufficient, and drop the label position check. Also rename the Advanced heading from label4 to m_labelAdvanced so the layout code names the control it moves. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jasonleenaylor
enabled auto-merge (squash)
August 7, 2026 00:51
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1048 +/- ##
==========================================
+ Coverage 36.44% 36.45% +0.01%
==========================================
Files 1354 1354
Lines 295676 295676
Branches 40223 40223
==========================================
+ Hits 107757 107788 +31
+ Misses 158645 158625 -20
+ Partials 29274 29263 -11
🚀 New features to boost your workflow:
|
thejambi
approved these changes
Aug 7, 2026
thejambi
left a comment
Contributor
There was a problem hiding this comment.
@thejambi reviewed 4 files and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on jasonleenaylor).
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.
Measure the shift delta from m_labelAdvanced's observed move instead of recomputing it with a hardcoded padding literal, this will keep the test from drifting from the actual code. Add an assertion that the injected group box clears m_labelAdvanced to keep proof the shift was sufficient, and drop the label position check.
Also rename the Advanced heading from label4 to m_labelAdvanced so the layout code names the control it moves.
Why the test was failing
PR #964 changed InitializeUIModeControls to derive its padding from the dialog font (
Font.Height / 2) instead of a literal 8, but the test kept recomputing its expected positions with the old literal. WhereverFont.Height / 2 != 8the expectations are off by the difference (at 96 DPI,13 / 2 = 6, hence "Expected: 217 / But was: 215"), so the test could pass on one machine and fail on another.🤖 Generated with Claude Code
This change is