Skip to content

Commit 3c02b0b

Browse files
MarkoutteAbdullinAM
authored andcommitted
Concrete execution fails for a static method using a static field UnitTestBot#711 (UnitTestBot#1143)
1 parent 12616ac commit 3c02b0b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

utbot-framework/src/main/kotlin/org/utbot/engine/UtBotSymbolicEngine.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,10 @@ class UtBotSymbolicEngine(
497497
var attempts = 0
498498
val attemptsLimit = UtSettings.fuzzingMaxAttempts
499499
val hasMethodUnderTestParametersToFuzz = executableId.parameters.isNotEmpty()
500+
if (!hasMethodUnderTestParametersToFuzz && executableId.isStatic) {
501+
// Currently, fuzzer doesn't work with static methods with empty parameters
502+
return@flow
503+
}
500504
val fuzzedValues = if (hasMethodUnderTestParametersToFuzz) {
501505
fuzz(methodUnderTestDescription, modelProvider(defaultModelProviders(defaultIdGenerator)))
502506
} else {

0 commit comments

Comments
 (0)