Skip to content

Identical or contradictory@utbot.executesCondition for assert in user code #2414

Open
@tyuldashev

Description

@tyuldashev

Description
When there is assert in user code there could be @utbot.executesCondition which are either the same or contradictory.

To Reproduce

  1. Install UnitTestBot plugin built from main in IntelliJ IDEA
  2. Set Symbolic = 100%
  3. Generate tests for following code:
    public int separatorEquality(String s) {
        assert(s == null);

        if (s.equals("1")) {
            return 1;
        } else {
            return 0;
        }
    }

Expected behavior
There are NO identical or incompatible values for @utbot.executesCondition tag values. In this case it's one of: {@code (assert (s == null);): True} or {@code (assert (s == null);): False}

Actual behavior
Two tests are generated one contains contrary tags:

     * @utbot.executesCondition {@code (assert (s == null);): True}
     * @utbot.executesCondition {@code (assert (s == null);): False}

Second one the same tags:

     * @utbot.executesCondition {@code (assert (s == null);): True}
     * @utbot.executesCondition {@code (assert (s == null);): True}

Screenshots, logs
image

Metadata

Metadata

Assignees

Labels

comp-summariesSomething related to the method names, code comments and display names generationcomp-symbolic-engineIssue is related to the symbolic execution enginectg-bugIssue is a bug

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions