Skip to content

Calls to Kotlin autogenerated setter isn't changed to direct property access for tests from fuzzer #1241

Description

@volivan239

Description

Fixes from #1002 seems not to work properly if the model is produced by fuzzer.

To Reproduce

Launch action on the following class (use only fuzzer):

classExample() {
var x:Int=3funf(): Int {
return x
}
}

Expected behavior

Tests are generated properly.

Actual behavior

Incorrect tests with calls to .setX() are generated.

Visual proofs (screenshots, logs, images)

Example of generated test:

@Test
@DisplayName("f: arg_0 = Example() -> return 1409199696")
funtestF() {
val example =Example()
example.setX(1409199696)
val actual = example.f()
assertEquals(1409199696, actual)
}

Environment

Test generation method -- Fuzzing 100%

Metadata

Metadata

Assignees

Labels

comp-codegenIssue is related to code generatorcomp-fuzzingIssue is related to the fuzzingctg-bugIssue is a buglang-kotlinIssue is related to Kotlin language support

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions