You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
}
alisevych
changed the title
String concatenation: dynamicinvoke is not implemented
String concatenation: dynamicinvoke is not implemented - JDK 11
Jul 4, 2022
Uh oh!
There was an error while loading. Please reload this page.
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:
Expected behavior
Tests are supposed to be generated.
Actual behavior
The following test class is generated:
Environment
Windows 10 Pro
IntelliJ IDEA 2022.1.3
JDK 11
UTBotJava plugin version
The text was updated successfully, but these errors were encountered: