-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Labels
comp-codegenIssue is related to code generatorIssue is related to code generatorcomp-springIssue is related to Spring projects supportIssue is related to Spring projects supportcomp-symbolic-engineIssue is related to the symbolic execution engineIssue is related to the symbolic execution enginectg-bugIssue is a bugIssue is a bug
Description
Description
Variable objectType
with Class is used but not created.
To Reproduce
- Install UnitTestBot plugin built from main in IntelliJ IDEA
- Open
sm***t
project - Press Ctrl+Shift+N, input
rdi
- Generate tests for all methods of the class with
@SpringBootApplication
andUnit tests
selected
Expected behavior
- Variable
objectType
is initialized with object's class.
OrObject.class
should be used instead. - Assert of
finalObjectType
is (probably) expected.
Actual behavior
Variable objectType
with Class is used to pass the Class of the first object.
finalObjectType
is created, but not checked
Screenshots, logs
///region OTHER: EXPLICITLY THROWN UNCHECKED EXCEPTIONS for method query(java.lang.Object, java.lang.Class)
@Test
public void testQuery1() {
Object value = new Object();
assertThrows(IllegalArgumentException.class, () -> rdi.query(value, Object.class));
Class finalObjectType = objectType;
}
///endregion
Environment
IntelliJ IDEA version - Ultimate 2023.1.4
Project - Maven
JDK - 1.8
Metadata
Metadata
Assignees
Labels
comp-codegenIssue is related to code generatorIssue is related to code generatorcomp-springIssue is related to Spring projects supportIssue is related to Spring projects supportcomp-symbolic-engineIssue is related to the symbolic execution engineIssue is related to the symbolic execution enginectg-bugIssue is a bugIssue is a bug
Type
Projects
Status
Todo