Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Test on Recursion generated by Fuzzer with int overflow should fail when Treat overflows as errors #1379

Open
Labels
comp-fuzzingIssue is related to the fuzzing ctg-enhancementNew feature, improvement or change request ctg-questionFurther information is requested
@alisevych

Description

Description

Tests generated by Symbolic Execution for OverflowExamples with Treat overflows as errors option on - are supposed to fail with ArithmeticException, but they are passing.

To Reproduce

  1. Install one of the latest plugin build from main in IDEA
  2. Run the 'UTBotJava' project in IntelliJ Idea
  3. Set Overflow detection to Treat overflows as errors and Fuzzing on:

image

  1. Use plugin to generate tests for the sample org.utbot.examples.recursion.Recursion.factorial:

Expected behavior

Test produces int overflow inside factorial method (2^32 => 0) and is supposed to fail.
The test also should go to OVERFLOWS region and should have a comment about int overflow.

Actual behavior

A regular test is generated.
It is added to ///region FUZZER: SUCCESSFUL EXECUTIONS for method factorial(int)
The test is passing.

Visual proofs (screenshots, logs, images)

 /**
 * @utbot.classUnderTest {@link Recursion}
 * @utbot.methodUnderTest {@link Recursion#factorial(int)}
 */
 @Test
 @DisplayName("factorial: n = 1024 (mutated from 0) -> return 0")
 public void testFactorialReturnsZero() {
 Recursion recursion = new Recursion();
 int actual = recursion.factorial(1024);
 assertEquals(0, actual);
 }

Environment

Windows 10 Pro
IntelliJ IDEA 2022年2月3日

Metadata

Metadata

Assignees

No one assigned

    Labels

    comp-fuzzingIssue is related to the fuzzing ctg-enhancementNew feature, improvement or change request ctg-questionFurther information is requested

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /