Closed
Description
Description
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();
}
}
Metadata
Metadata
Assignees
Type
Projects
Status
Done