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 runner doesn't work with backticked JUnit test cases #5378

Closed
rochala opened this issue Jun 27, 2023 · 1 comment · Fixed by #5485
Closed

Test runner doesn't work with backticked JUnit test cases #5378

rochala opened this issue Jun 27, 2023 · 1 comment · Fixed by #5485
Assignees
Labels
bug Something that is making a piece of functionality unusable good first issue test-explorer
Milestone

Comments

@rochala
Copy link
Collaborator

rochala commented Jun 27, 2023

Describe the bug

//> using test.dep com.github.sbt:junit-interface:0.13.3

import org.junit.Test

class Tests {
  @Test
  def test: Unit = {
    junit.framework.Assert.assertEquals(1, 2)
  }

  @Test
  def `test-backticked`: Unit = {
    junit.framework.Assert.assertEquals(1, 2)
  }

}

Running the first test case via code lens works only on non-backticked test cases.
The output:

Test Tests.test ignored
Test Tests.test$minusbackticked ignored
Execution took 0ms
2 tests, 2 ignored
All tests in Tests passed

===============================================
Total duration: 0ms
All 1 test suites passed.
===============================================

Expected behavior

It should work on backticked test cases for both running and debugging.

Operating system

macOS

Editor/Extension

VS Code

Version of Metals

metals 0.11.12+134-80315695-SNAPSHOT

Extra context or search terms

No response

@rochala rochala changed the title Test runner doesn't work with backticked JUnit tests Test runner doesn't work with backticked JUnit test cases Jun 27, 2023
@tgodzik tgodzik added test-explorer bug Something that is making a piece of functionality unusable labels Jun 27, 2023
@tgodzik
Copy link
Contributor

tgodzik commented Jun 27, 2023

Thanks for reporting! I wonder if the change to $minus is something common to all the frameworks or just junit 🤔

@tgodzik tgodzik added this to Triage in Metals Issue Board via automation Jun 27, 2023
@kasiaMarek kasiaMarek self-assigned this Jul 26, 2023
Metals Issue Board automation moved this from Triage to Done Aug 7, 2023
@jkciesluk jkciesluk added this to the Metals v1.0.1 milestone Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is making a piece of functionality unusable good first issue test-explorer
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants