-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Labels
ctg-bugIssue is a bugIssue is a bugpriority-top-focusTop priority chosen by dev teamTop priority chosen by dev team
Description
Description
Concatenation of Strings - with "+" operator - with JDK 11. Test generation reports an error in test file:
dynamicinvoke is not implemented "makeConcatWithConstants"
To Reproduce
Steps to reproduce the behavior:
- Open IntelliJ IDEA
- Plugin is installed
- A Maven/Gradle/Idea project with JDK 11 is opened
- Add a class using concatenation of Strings (with one stored in a variable) like:
public class StringExample {
public void output() {
String example = "Some text";
System.out.println("Plus " + example);
}
}
Expected behavior
Tests are supposed to be generated.
Actual behavior
The following test class is generated:
public class StringExampleTest {
///region Test suites for executable org.example.StringExample.output
///region Errors report for output
public void testOutput_errors() {
// Couldn't generate some tests. List of errors:
//
// 1 occurrences of:
/* An operation is not implemented: dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String)>("Some text")
<java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("Plus \u0001") */
}
///endregion
///endregion
}
Environment
Windows 10 Pro
IntelliJ IDEA 2022.1.3
JDK 11
UTBotJava plugin version
Metadata
Metadata
Assignees
Labels
ctg-bugIssue is a bugIssue is a bugpriority-top-focusTop priority chosen by dev teamTop priority chosen by dev team