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

How to test for compiler errors? #11

Open
lolgab opened this issue Sep 17, 2023 · 0 comments
Open

How to test for compiler errors? #11

lolgab opened this issue Sep 17, 2023 · 0 comments

Comments

@lolgab
Copy link

lolgab commented Sep 17, 2023

How can I test that my compiler plugin fails for some specific code?
Given this code:

  compilerTest("should fail")(
    "def func tion = ()",
    None
  ) { case (tree, given Context) =>
    println("HERE")
  }

The println is never executed and the test passes. How can I run the compiler, let it fail and assert that a specific error message is returned?

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

No branches or pull requests

1 participant