-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Labels
comp-summariesSomething related to the method names, code comments and display names generationSomething related to the method names, code comments and display names generationctg-bugIssue is a bugIssue is a buglang-javaIssue is related to Java supportIssue is related to Java support
Milestone
Description
Description
Some tests have @utbot.invokes {@link soot.dummy.InvokeDynamic in JavaDocs even though there is no calls to it. This seems happens only for JDK11+ and not happens with JDK 1.8.
To Reproduce
Steps to reproduce the behavior:
- Create new project with JDK11 (for some reason it's not reproducible in UTBot project)
- Copy there
org.utbot.examples.exceptions.ExceptionExamplesclass from UTBot project. - Invoke test generation for
IllegalArgumentException createException()method
Expected behavior
JavaDoc for generated tests contains actual information about invoked methods
Actual behavior
@utbot.invoke tag linked to soot method which actually is not called in test or in user code.
Visual proofs (screenshots, logs, images)
/**
* @utbot.classUnderTest {@link ExceptionExamples}
* @utbot.methodUnderTest {@link ExceptionExamples#createException()}
* @utbot.invokes {@link Math#sqrt(double)}
* @utbot.invokes {@link soot.dummy.InvokeDynamic#makeConcatWithConstants(double)}
* @utbot.returnsFrom {@code return new IllegalArgumentException("Here we are: " + Math.sqrt(10));}
*/
@Test
@DisplayName("createException: MathSqrt -> return new IllegalArgumentException(\"Here we are: \" + Math.sqrt(10))")
public void testCreateException_InvokeDynamicMakeConcatWithConstants() throws Exception {
ExceptionExamples exceptionExamples = new ExceptionExamples();
IllegalArgumentException actual = exceptionExamples.createException();
IllegalArgumentException expected = ((IllegalArgumentException) createInstance("java.lang.IllegalArgumentException"));
}Additional context
That's pre-existing problem, reproducible in 2022.12 release.
Metadata
Metadata
Assignees
Labels
comp-summariesSomething related to the method names, code comments and display names generationSomething related to the method names, code comments and display names generationctg-bugIssue is a bugIssue is a buglang-javaIssue is related to Java supportIssue is related to Java support
Type
Projects
Status
Done