Skip to content

tests: update template example test#179

Merged
ianlewis merged 1 commit intomainfrom
template-test-update
Jan 25, 2026
Merged

tests: update template example test#179
ianlewis merged 1 commit intomainfrom
template-test-update

Conversation

@ianlewis
Copy link
Copy Markdown
Owner

@ianlewis ianlewis commented Jan 25, 2026

Description:

Update the example test to include the AST.

Related Issues:

n/a

Checklist:

  • Review the CONTRIBUTING.md documentation.
  • Add a reference to a related issue in the repository.
  • Add a description of the changes proposed in the pull request.
  • Add unit tests if applicable.
  • Update documentation if applicable.
  • Add a note in the CHANGELOG.md if applicable.

Signed-off-by: Ian Lewis <ian@ianlewis.org>
@ianlewis ianlewis force-pushed the template-test-update branch from aba91bc to 715c5ab Compare January 25, 2026 08:35
@ianlewis ianlewis requested a review from Copilot January 25, 2026 08:36
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 updates the template example test to display the AST (Abstract Syntax Tree) structure before executing the template, making the example more educational by showing both the parsed tree structure and the final output.

Changes:

  • Added a String() method to tmplNode for better AST visualization
  • Updated the template example to print the AST before execution
  • Standardized output formatting in the infix calculator example

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
template_example_test.go Added String() method to tmplNode and updated example to print AST structure alongside execution output
infix_example_test.go Changed fmt.Print to fmt.Println and added blank line in expected output for consistency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ianlewis ianlewis merged commit 326b9e0 into main Jan 25, 2026
24 checks passed
@ianlewis ianlewis deleted the template-test-update branch January 25, 2026 08:37
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.

2 participants