Skip to content

operator overloading is not supported #1260

Open
@tyuldashev

Description

@tyuldashev

Description
No tests are created when user tries to generate test for operator 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 Operators {
    operator fun Int.times(str: String) = str.repeat(this)      
    operator fun String.get(range: IntRange) = substring(range) 

}

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