Use Austruck literals instead of JSON in e2e tests#42
Merged
MidnightDesign merged 1 commit into0.2.xfrom Oct 14, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR converts e2e test files from using JSON syntax to Austruck literals for better consistency with the language being tested. The changes update test input and output data format while adding proper parsing support for boolean literals and extending the literal hierarchy.
Key changes:
- Updated test files to use Austruck literal syntax instead of JSON (removing quotes from object keys)
- Added boolean literal parsing support (
true/falsekeywords) - Introduced
AbstractLiteralbase class withvalue()method for literal value extraction
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/cases/struct/field-access-on-aliased-struct-in-lambda.txt | Updated JSON syntax to Austruck literals in test data |
| tests/unit/cases/struct/equality/*.txt | Converted JSON object syntax to Austruck struct literals |
| tests/unit/cases/or/*.txt | Updated boolean test data from JSON to Austruck format |
| tests/unit/cases/map/equals-three.txt | Changed array test data to use Austruck syntax |
| tests/unit/cases/eq/*.txt | Updated integer comparison test inputs to Austruck format |
| tests/unit/cases/atomic/literal/*.txt | Added new boolean literal test cases |
| tests/unit/cases/atomic/get/with-inline-type.txt | Updated string test data to Austruck format |
| tests/unit/E2eCase.php | Modified test parser to use ExpressionParser instead of JSON parsing |
| src/StructLiteral.php | Extended AbstractLiteral and added value() method implementation |
| src/Parser/Token.php | Updated type annotations to include boolean literals |
| src/Parser/ParsedToken.php | Extended generic type to include boolean values |
| src/Parser/Literal.php | Updated type constraints to support boolean literals |
| src/Parser/ExpressionParser.php | Added parsing support for true and false keywords |
| src/Literal.php | Extended AbstractLiteral and implemented value() method |
| src/ListLiteral.php | Extended AbstractLiteral and added value() method implementation |
| src/AbstractLiteral.php | New abstract base class for all literal expressions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
rieschl
approved these changes
Oct 14, 2025
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.
No description provided.