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
{{ message }}
Repository navigation
ArrayList.toString() - fails to generate tests #391
Presence of ArrayList.toString() method leads to test generation failure.
To Reproduce
Steps to reproduce the behavior:
Open IntelliJ IDEA
Plugin is installed
A project with JDK 8/11 is opened
Add a class using ArrayList.toString() method, like:
public class ListToStringExample {
public void toStringList() {
Arrays.asList("a", "b", "c").toString();
}
}
Expected behavior
Tests should be successfully generated
Actual behavior
Failed to generate unit tests... popup is shown.
Timeout increasing is suggested, but that doesn't help. Failure is displayed in 2-3 seconds , timeout is not reached.
Visual proofs (screenshots, logs, images)
Environment
Windows 10 Pro
IntelliJ IDEA 2022.1.3
JDK 8, 11
Additional context
Same AbstractCollection.toString() implementation is called for this code - same error is displayed:
public class ListToStringExample {
public void toStringList() {
List<String> list = new ArrayList<>();
list.add("a");
list.add("b");
list.add("c");
list.toString();
}
}
Activity
ToString support for abstract collection using makeSymbolic #391
ToString support for abstract collection using makeSymbolic #391
ToString support for abstract collection using makeSymbolic #391
ToString support for abstract collection using makeSymbolic #391
ToString support for abstract collection using makeSymbolic #391
ToString support for abstract collection using makeSymbolic #391
alisevych commentedon Jul 5, 2022
Verified on the latest plugin - NOT reproducing
Squashed commit of the following: