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

Conflict in users and junit names leads to compilation errors #1038

Closed
EgorkaKulikov opened this issue Sep 30, 2022 · 0 comments
Closed

Conflict in users and junit names leads to compilation errors #1038

EgorkaKulikov opened this issue Sep 30, 2022 · 0 comments
Assignees
Labels
comp-codegen Issue is related to code generator ctg-bug Issue is a bug

Comments

@EgorkaKulikov
Copy link
Collaborator

To Reproduce

Run UtBot via plugin on the following class

public class Test {
    public boolean foo(boolean b) {
        return !b;
    }
}

Generated tests looks like

@Test
  @DisplayName("foo: return !b : False -> return !b")
  public void testFoo_NotB() {
      Test test = new Test();

      boolean actual = test.foo(true);

      assertFalse(actual);
  }

Actual behavior

This code does not compile because Test as a name of the class conflicts with a name from JUnit imports org.junit.jupiter.api.Test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-codegen Issue is related to code generator ctg-bug Issue is a bug
Projects
Archived in project
Development

No branches or pull requests

1 participant