Skip to content

Impossible doubles equality found #936

Open
@CaelmBleidd

Description

@CaelmBleidd

Description

There is a mistake in doubles equality, seems like UTBot finds unreachable result value

To Reproduce

Steps to reproduce the behaviour:

  1. Run any project in IntelliJ Idea
  2. Use the plugin to generate tests
  3. Open the generated test

Note: sometimes it takes several attempts to get a wrong result

Expected behaviour

No true branch was found.

Actual behaviour

Failing test with true expected result

Visual proofs

Example:

public boolean listContainsObject(List<Double> list, Double obj) {
    UtMock.assume(list.size() == 1 && list.get(0) == -2.0000000000000004);
    UtMock.assume(obj == -4.9E-324);

    return list.contains(obj);
}

Environment

The latest master, JDK 11

Additional context

There is no additional context.

Metadata

Metadata

Assignees

Labels

comp-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