Skip to content

Use Austruck literals instead of JSON in e2e tests#42

Merged
MidnightDesign merged 1 commit into0.2.xfrom
test-input-output-ausdruck-literals
Oct 14, 2025
Merged

Use Austruck literals instead of JSON in e2e tests#42
MidnightDesign merged 1 commit into0.2.xfrom
test-input-output-ausdruck-literals

Conversation

@MidnightDesign
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/false keywords)
  • Introduced AbstractLiteral base class with value() 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.

@MidnightDesign MidnightDesign merged commit 327c711 into 0.2.x Oct 14, 2025
25 checks passed
@MidnightDesign MidnightDesign deleted the test-input-output-ausdruck-literals branch October 14, 2025 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants