Update test expectations after switch to SoftFloat library in the extractor#1042
Update test expectations after switch to SoftFloat library in the extractor#1042jketema wants to merge 1 commit intogithub:nextfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates C++ AUTOSAR rule unit test expected outputs to align with the extractor’s new SoftFloat-based floating-point formatting, preventing test failures due to numeric rendering differences.
Changes:
- Adjust floating-point literal renderings in
.expectedfiles (e.g., normalized scientific notation / exponent casing). - Update expected-result row numbering where output ordering/formatting shifted.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| cpp/autosar/test/rules/M5-0-6/ImplicitConstConversionToSmallerUnderlyingType.expected | Updates expected float conversion output formatting for SoftFloat extractor output. |
| cpp/autosar/test/rules/M2-13-4/LiteralSuffixNotUpperCase.expected | Updates expected floating-point literal value formatting for suffix diagnostics. |
| cpp/autosar/test/rules/A13-6-1/UseCorrectIntervalForDigitSequencesSeparators.expected | Updates expected floating-point digit-separator diagnostics value formatting to match SoftFloat output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | test.cpp:18:3:18:13 | 1254450 | Numeric literal 0x13'24'32l has the lower case suffix l. | | ||
| | test.cpp:22:3:22:15 | 1.123122995e+10 | Numeric literal 1.123'123e10f has the lower case suffix f. | | ||
| | test.cpp:23:3:23:15 | 11231230000.0 | Numeric literal 1.123'123e10l has the lower case suffix l. | | ||
| | test.cpp:22:3:22:15 | 1.123123E10 | Numeric literal 1.123'123e10f has the lower case suffix f. | |
There was a problem hiding this comment.
Do you know if any of our queries depend on the fact that the representation is e+10 instead of E+10, for example for coding style or formatting checks?
There was a problem hiding this comment.
E10 sorry (without the +)
There was a problem hiding this comment.
That's the internal CodeQL representation, so that's not something that can be depended upon for style issues. Note that in the result updated here the alert message uses the original string as it occurred in the source code (which we also have access to in the case of constants).
Description
please enter the description of your change here
Change request type
.ql,.qll,.qlsor unit tests)Rules with added or modified queries
Release change checklist
A change note (development_handbook.md#change-notes) is required for any pull request which modifies:
If you are only adding new rule queries, a change note is not required.
Author: Is a change note required?
🚨🚨🚨
Reviewer: Confirm that format of shared queries (not the .qll file, the
.ql file that imports it) is valid by running them within VS Code.
Reviewer: Confirm that either a change note is not required or the change note is required and has been added.
Query development review checklist
For PRs that add new queries or modify existing queries, the following checklist should be completed by both the author and reviewer:
Author
As a rule of thumb, predicates specific to the query should take no more than 1 minute, and for simple queries be under 10 seconds. If this is not the case, this should be highlighted and agreed in the code review process.
Reviewer
As a rule of thumb, predicates specific to the query should take no more than 1 minute, and for simple queries be under 10 seconds. If this is not the case, this should be highlighted and agreed in the code review process.