Skip to content

Some meaningful test is expected for a regexp #732

@Deuqz

Description

@Deuqz

Description

No strings are generated for a regexp pattern to check.

To Reproduce

  1. IntelliJ IDEA is opened with UTBot plugin installed
  2. Project with JDK 11 and a Java class is opened
  3. Add the following code:
public boolean bar(@NotNull String s) {
    return s.matches("[a-zA-Z]*");
}
  1. Use UTBot plugin to generate tests

Expected behavior

Tests with strings matching and not matching regexp are supposed to be generated.

Actual behavior

There is only one test with the regexp:

@Test
@DisplayName("bar: s = string -> return false")
public void testBarReturnsFalseWithNonEmptyString() {
    Bor1 bor1 = new Bor1();

    boolean actual = bor1.bar("[a-zA-Z]*");

    assertFalse(actual);
}

Environment

JDK: correto-11
Language level: 11
Intellij IDEA: 2021.1.4
Operating system: Windows 10

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