Skip to content

Wrong names for enum constants #1745

@CaelmBleidd

Description

@CaelmBleidd

Description

It seems like we have a mistake in enum constants name generation. If we have a code that returns a name for an enum constant, it will return an empty line. Moreover, if we try to check whether this name is equal to some line, it will never be true

To Reproduce

Steps to reproduce the behavior:

Example:

  1. Run generation for org.utbot.examples.enums.ClassWithEnum#checkName
  2. Check the results

Expected behavior

Correctly generated three branches with correct returned names.

Actual behavior

Something strange like two results or empty lines in them are generated.

Visual proofs (screenshots, logs, images)

    public String checkName(String s) {
        final String name = READY.name();
        if (s.equals(name)) {
            return ERROR.name();
        }

        return READY.name();
    }

Environment

There is no specific environment.

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