test(es/minifier): Add execution tests for issue #11517#11530
Conversation
Add 113 execution tests to verify the fix for incorrect if statement merging when local variables have different values. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
This PR extends the minifier’s execution test suite to comprehensively cover the fix for issue #11517 (incorrect merging of if statements when their local variables differ), ensuring both the original regression and a wide matrix of variants are protected. The changes are entirely in test code and exercise many language and control-flow patterns to validate that if-merging only occurs when it is semantics-preserving.
Changes:
- Add an execution test for the original reproduction of #11517 and a simplified core variant.
- Add a large family of execution tests spanning variable kinds, control-flow constructs, data structures, and modern JS features, all structured to catch incorrect
if-merging when local variable values differ. - Include a positive test that verifies that merging still works when branch-local values are intentionally identical.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Binary Sizes
Commit: 8849810 |
CodSpeed Performance ReportMerging this PR will not alter performanceComparing Summary
|
|
@claude Remove unnecessary tests. e.g. Duplicate (verified by other test case) |
This comment has been minimized.
This comment has been minimized.
Remove redundant tests that were functionally equivalent variations of the same core bug test. Kept essential tests covering: - Original and simplified reproduction cases - Verification that valid merging still works - Variable types (const, let, var) - Control flow (continue, break, throw) - Class methods and closures - Real-world HTTP status pattern Co-authored-by: Donny/강동윤 <kdy1@users.noreply.github.com> Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
PR Review: test(es/minifier): Add execution tests for issue #11517OverviewThis PR adds execution tests to verify the fix for issue #11517, which involves incorrect if-statement merging when local variables have different values. The tests are well-structured and cover a good variety of scenarios. 👍 Strengths
|
Summary
This PR adds comprehensive test coverage for PR #11526.
Test Coverage
Core Issue Tests:
Variable Type Variations:
const,let,vardeclarationsStatement Type Variations:
return,continue,break,throwstatementsData Structure Variations:
Function Variations:
Control Flow Variations:
Real-World Patterns:
Test plan
🤖 Generated with Claude Code