Description
We don't generate tests for autogenerated Kotlin getters/setters in plugin, we shouldn't do this in cli/contest estimator as well.
To Reproduce
Launch UtBot from cli for the following class:
classCheckedAddition(varx:Int) {
funaddWithCheck(y:Int): Int? {
val res = x.toLong() + y.toLong()
if (res >=Int.MIN_VALUE&& res <=Int.MAX_VALUE) {
this.x = res.toInt()
return res.toInt()
}
returnnull
}
}Expected behavior
Correct tests are generated
Actual behavior
UtBot tries to generate tests for setX() and getX() and produce incorrect tests:
Visual proofs (screenshots, logs, images)
@Test
funtestGetX1() {
val checkedAddition =CheckedAddition(1409199696)
val actual = checkedAddition.getX()
assertEquals(1409199696, actual)
}Additional context
I think this should be changed in a way similar to #1192
Description
We don't generate tests for autogenerated Kotlin getters/setters in plugin, we shouldn't do this in cli/contest estimator as well.
To Reproduce
Launch UtBot from cli for the following class:
Expected behavior
Correct tests are generated
Actual behavior
UtBot tries to generate tests for
setX()andgetX()and produce incorrect tests:Visual proofs (screenshots, logs, images)
Additional context
I think this should be changed in a way similar to #1192