Skip to content

Commit 2551385

Browse files
authored
Concrete execution fails for a static method using a static field #711 (#1143)
1 parent e1fe8da commit 2551385

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

+4
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,10 @@ class UtBotSymbolicEngine(
436436
var attempts = 0
437437
val attemptsLimit = UtSettings.fuzzingMaxAttempts
438438
val hasMethodUnderTestParametersToFuzz = methodUnderTest.parameters.isNotEmpty()
439+
if (!hasMethodUnderTestParametersToFuzz && methodUnderTest.isStatic) {
440+
// Currently, fuzzer doesn't work with static methods with empty parameters
441+
return@flow
442+
}
439443
val fuzzedValues = if (hasMethodUnderTestParametersToFuzz) {
440444
fuzz(methodUnderTestDescription, modelProvider(defaultModelProviders(defaultIdGenerator)))
441445
} else {

0 commit comments

Comments
 (0)