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

Generated code tries to use private class as a type #528

Closed
sofurihafe opened this issue Jul 15, 2022 · 0 comments · Fixed by #529
Closed

Generated code tries to use private class as a type #528

sofurihafe opened this issue Jul 15, 2022 · 0 comments · Fixed by #529
Assignees
Labels
comp-codegen Issue is related to code generator ctg-bug Issue is a bug

Comments

@sofurihafe
Copy link
Member

Description

Generated code tries to use private class as a type for expectedResult argument.

To Reproduce

  1. Generate parametrized tests for VoidStaticMethodsTest from utbot-samples.

Actual behavior

ClassWithStaticAndInnerClasses.PrivateInnerClassWithPrivateField type for expectedResult in arguments cannot be accessed because it's private.

@ParameterizedTest
@MethodSource("provideDataForUsePrivateInnerClassWithPrivateField")
public void parameterizedTestsForUsePrivateInnerClassWithPrivateField(
    ClassWithStaticAndInnerClasses classWithStaticAndInnerClasses,
    int int1,
    ClassWithStaticAndInnerClasses.PrivateInnerClassWithPrivateField expectedResult,
    Class<Throwable> expectedError
) throws IllegalAccessException, NoSuchFieldException  {
    <...>
}
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
2 participants