UTBotJava
UTBotJava copied to clipboard
Concrete execution error on usage of stream `.toArray`
Description
For example when user code contains IntStream.toArray() concrete executor fails during test generation
To Reproduce
- Install UnitTestBot plugin built from main in IntelliJ IDEA
- Open UTBotJava project
- Set 100% Symbolic execution
- Generate tests for
org.utbot.examples.stream.IntStreamExample#useParameterStreamor for following code:
int[] useParameterStream(IntStream s) {
return s.toArray();
}
Expected behavior Tests are generated
Actual behavior There are errors in the tests
public void testUseParameterStream_errors() {
// Couldn't generate some tests. List of errors:
//
// 2 occurrences of:
// Default concrete execution failed
}
Screenshots, logs utbot-engine-current.zip
Probably related pull request - https://github.com/UnitTestBot/UTBotJava/pull/912
The same with other stream samples:
- DoubleStreamExample
- LongStreamExample