Skip to content

Engine doesn't cover branch instanceof String #957

Open
@SBOne-Kenobi

Description

@SBOne-Kenobi

Description

Engine generates 1 execution for this method, but doesn't cover throw statement.

public static void charSeqIsNotString(CharSequence cs) {
    if (cs instanceof String) {
        throw new IllegalStateException("CharSequence must be not String!");
    }
}

To Reproduce

Steps to reproduce the behavior:

Steps to reproduce the behavior:

  1. Create the mentioned method
  2. Make sure that fuzzing turned of (Tools -> UnitTestBot -> Code analysis, toggle must be in the rightest position)
  3. Use plugin to generate tests
  4. Open the generated test
  5. Run tests with coverage

Expected behavior

2 tests are supposed to be generated witch cover all statements.

Actual behavior

1 test generated that don't covers throw statement.

Visual proofs (screenshots, logs, images)

image

Additional context

This bug is a part of issue #820

Metadata

Metadata

Assignees

Labels

comp-symbolic-engineIssue is related to the symbolic execution enginectg-bugIssue is a bug

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions