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

ValidatorTester and AssertableDiagnostics deprecated #2860

Closed
LorenzoBettini opened this issue Nov 28, 2023 · 3 comments · Fixed by #2861
Closed

ValidatorTester and AssertableDiagnostics deprecated #2860

LorenzoBettini opened this issue Nov 28, 2023 · 3 comments · Fixed by #2861

Comments

@LorenzoBettini
Copy link
Contributor

https://github.com/eclipse/xtext/blob/652c2c41499387ab87737143d12939a8bdab41ab/org.eclipse.xtext.junit4/src/org/eclipse/xtext/junit4/validation/AssertableDiagnostics.java and https://github.com/eclipse/xtext/blob/652c2c41499387ab87737143d12939a8bdab41ab/org.eclipse.xtext.junit4/src/org/eclipse/xtext/junit4/validation/ValidatorTester.java were deprecated in 2.30 as part as the old org.eclipse.xtext.junit4 bundle.

In org.eclipse.xtext.testing we now have
https://github.com/eclipse/xtext/blob/652c2c41499387ab87737143d12939a8bdab41ab/org.eclipse.xtext.testing/src/org/eclipse/xtext/testing/validation/AssertableDiagnostics.java but no corresponding ValidatorTester, which was the only one creating objects of AssertableDiagnostics.

We still use ValidatorTester in our own tests (we copied it there): https://github.com/eclipse/xtext/blob/652c2c41499387ab87737143d12939a8bdab41ab/org.eclipse.xtext.tests/src/org/eclipse/xtext/validation/ValidatorTester.java#L29

Why don't we put the latter in org.eclipse.xtext.testing?

It is not straightforward to port existing tests using ValidatorTester to ValidationTestHelper.

@szarnekow
Copy link
Contributor

Please add a convenient substitute for the deprecated ValidationTester.

@LorenzoBettini
Copy link
Contributor Author

I was suggesting to use the one we already use in our tests https://github.com/eclipse/xtext/blob/652c2c41499387ab87737143d12939a8bdab41ab/org.eclipse.xtext.tests/src/org/eclipse/xtext/validation/ValidatorTester.java#L29

I mean: put that one in the org.eclipse.xtext.testing. I seem to understand that it is exactly the same as the deprecated one.

@szarnekow
Copy link
Contributor

Yes, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants