Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tyuldashev opened this issue Jul 13, 2023 · 0 comments
Assignees
Labels
comp-summaries Something related to the method names, code comments and display names generation comp-symbolic-engine Issue is related to the symbolic execution engine ctg-bug Issue is a bug

Comments

@tyuldashev
Copy link
Collaborator

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

@tyuldashev tyuldashev added ctg-bug Issue is a bug comp-summaries Something related to the method names, code comments and display names generation labels Jul 13, 2023
@alisevych alisevych added this to the Upcoming Release milestone Jul 14, 2023
@alisevych alisevych added the comp-symbolic-engine Issue is related to the symbolic execution engine label Jul 14, 2023
@alisevych alisevych removed this from the October Release milestone Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-summaries Something related to the method names, code comments and display names generation comp-symbolic-engine Issue is related to the symbolic execution engine ctg-bug Issue is a bug
Projects
Status: Todo
Development

No branches or pull requests

4 participants