Fix Value Checker unchecked-bytecode defaults test#1384
Conversation
|
Is this typo intentional then? |
|
Thanks for finding this! I wouldn't call this a typo - it passes an illegal argument to an option. |
Looks like you already noticed this a few years back. See |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a dedicated annotated stub file to support Value Checker tests for unchecked bytecode defaults, and updates the JUnit test configuration to use it.
Changes:
- Added
unchecked-bytecode.astubwith annotated signatures for selected JDK/library APIs used by tests. - Updated
ValueUncheckedDefaultsTestto load the new stub file and corrected the unchecked-code defaults option value.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| framework/tests/value/unchecked-bytecode.astub | Introduces annotated stub declarations used when testing conservative defaults for unchecked bytecode. |
| framework/src/test/java/org/checkerframework/framework/test/junit/ValueUncheckedDefaultsTest.java | Configures the test run to include the new stub file and fixes the option value typo. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This fixes
ValueUncheckedDefaultsTestso it actually exercises-AuseConservativeDefaultsForUncheckedCode=bytecode.The test previously passed
btyecode, so the bytecode conservative-defaults mode was never enabled. Correcting the option exposed that many existing Value Checker tests call unannotated JDK/library bytecode APIs whose parameters then default to bottom. This PR adds a test-local stub file for the APIs used by the suite, so the test can continue checking the intended Value Checker behavior under unchecked bytecode defaults.