Skip to content

Cannot generate tests for infix method  #1259

Open
@tyuldashev

Description

@tyuldashev

Description
No tests are created when user tries to generate test for infix function or for class with only infix methods.

To Reproduce

Steps to reproduce the behavior:

  1. In UTBot settings set Generated test language to Kotlin other leave default
  2. Generate tests for following code
class InfixFuncs {
    infix fun Int.times(str: String) = str.repeat(this)
    infix fun String.onto(other: String) = Pair(this, other)
    infix fun Int.mult(other: Int) = other * this
}

Expected behavior

Tests are supposed to be generated.

Actual behavior

Error "No methods for test generation found" shown.

Visual proofs (screenshots, logs, images)

image

Additional context

Metadata

Metadata

Labels

ctg-bugIssue is a buglang-kotlinIssue is related to Kotlin language support

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions