UTBotJava icon indicating copy to clipboard operation
UTBotJava copied to clipboard

Concrete execution error on usage of stream `.toArray`

Open tyuldashev opened this issue 3 years ago • 2 comments

Description For example when user code contains IntStream.toArray() concrete executor fails during test generation

To Reproduce

  1. Install UnitTestBot plugin built from main in IntelliJ IDEA
  2. Open UTBotJava project
  3. Set 100% Symbolic execution
  4. Generate tests for org.utbot.examples.stream.IntStreamExample#useParameterStream or 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

tyuldashev avatar Jul 13 '23 13:07 tyuldashev

Probably related pull request - https://github.com/UnitTestBot/UTBotJava/pull/912

tyuldashev avatar Jul 13 '23 13:07 tyuldashev

The same with other stream samples:

  • DoubleStreamExample
  • LongStreamExample

tyuldashev avatar Oct 02 '23 14:10 tyuldashev