Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve core testing infrastructure #323

Merged
merged 7 commits into from
Dec 1, 2023
Merged

Conversation

marzipankaiser
Copy link
Contributor

@marzipankaiser marzipankaiser commented Nov 30, 2023

Changes:

  • Renamer also renames type parameters
  • There are tests for Renamer
  • Add mock Context for CoreTests
  • Add CorePhaseTests which allows to write tests for phases on core with minimal boilerplate

@marzipankaiser
Copy link
Contributor Author

With the last commit, we can now write tests for a phase on CoreTransformed by simply:

class MyPhaseTests extends CorePhaseTests(MyPhase) {
    test("my test"){
        // definitions etc
        assertTransformsTo(inputAsString, outputAsString)
    }
}

@marzipankaiser marzipankaiser marked this pull request as ready for review November 30, 2023 14:47
Also double map `renamed...` to `$...` in RenamerTests to allow
testing for this.
@marzipankaiser marzipankaiser merged commit 4d2e486 into master Dec 1, 2023
2 checks passed
@marzipankaiser marzipankaiser deleted the feature/core-testing branch December 1, 2023 14:39
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.

None yet

1 participant