Skip to content

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

@sofurihafe

Description

@sofurihafe

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 { <...> }

Metadata

Metadata

Labels

comp-codegenIssue is related to code generatorctg-bugIssue is a bug

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions