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

test: upgrade test suite to use latest JUnit version #326

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

algomaster99
Copy link
Member

I need to upgrade in order to write good tests. I could use https://github.com/MartinWitt/laughing-train for this problem, but I was not able to build it on my system :/

The refactoring was pretty straightforward. I changed import statements, Ignore is now called Disabled, and reason argument is not the last - after expected and actual.

@algomaster99 algomaster99 removed the request for review from monperrus September 19, 2024 15:33
@algomaster99
Copy link
Member Author

algomaster99 commented Sep 19, 2024

This PR is a reminder that even the simplest of problems can take a bit of your time 😢

The only test that fails it is because of a diff UPDATE: TestCase to junit.framework.TestCase. In the left version, TestCase is imported using wildcard and in the right version, TestCase is imported using its fully qualified name.

With JUnit4 in the classpath, gumtree-spoon resolves that TestCase is same as junit.framework.TestCase since junit.framework,TestCase is an API from JUnit4. However, when we update the JUnit version, spoon model cannot infer the same. If we also include junit.junit:4.13.2, the problem goes away, but I don't want to have dependencies to test resources in pom.xml.

@MartinWitt @I-Al-Istannen, did you see such a bug when porting JUnit 4 to JUnit 5 in spoon?

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.

1 participant