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

Uncompilable test for inner class, due improper naming #2515

Closed
tyuldashev opened this issue Aug 15, 2023 · 0 comments · Fixed by #2518
Closed

Uncompilable test for inner class, due improper naming #2515

tyuldashev opened this issue Aug 15, 2023 · 0 comments · Fixed by #2518
Assignees
Labels
comp-codegen Issue is related to code generator ctg-bug Issue is a bug status-verified Bug fix is verified

Comments

@tyuldashev
Copy link
Collaborator

Description
When generate test for nested class its generated with name like this Outer_InnerTest while file name is InnerTest.java, which makes is uncompilable.

To Reproduce

  1. Install UnitTestBot plugin built from main in IntelliJ IDEA
  2. Add code sample shown below.
  3. Set caret inside Inner class.
  4. Invoke test generation.
class Outer {
    public static class Inner {
          public int f() {
              return 0;
          } // put  caret here
    }
}

Expected behavior
Generated tests could be executed.

Actual behavior
Generated test public final class Outer_InnerTest {... is inside file InnerTest.java and fails during compilation.

Additional context
Same problem for fuzzing/symbolic, pre-existing in 2023.3 plugin version.

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 status-verified Bug fix is verified
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants