Skip to content

Fuzzer fails to find combinations with constants from switch-case #291

Closed
@Markoutte

Description

@Markoutte

Description

Given a method that has switch-case block. Fuzzer doesn't generate combinations that can cover all switch-case branches.

To Reproduce

Try to generate test with fuzzer for this example:

public int test(int x) {
    switch(x) {
        case 1:
            return 1;
        case 2:
            return 2;
        case 3:
            return 3;
    }
    return 0;
}

Expected behavior

Fuzzer generates tests with values: 1, 2, 3 and another int (for example: -1)

Actual behavior

Fuzzer generates test with values: -1, 1. Values 2 and 3 are absent.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions