File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
utbot-framework/src/main/kotlin/org/utbot/engine Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -517,6 +517,20 @@ class UtBotSymbolicEngine(
517517 return
518518 }
519519
520+ if (checkStaticMethodsMock(symbolicUtExecution)) {
521+ logger.debug {
522+ buildString {
523+ append(" processResult<${methodUnderTest} >: library static methods mock found " )
524+ append(" (we do not support it in concrete execution yet), " )
525+ append(" emit purely symbolic result $symbolicUtExecution " )
526+ }
527+ }
528+
529+ emit(symbolicUtExecution)
530+ return
531+ }
532+
533+
520534 // It's possible that symbolic and concrete stateAfter/results are diverged.
521535 // So we trust concrete results more.
522536 try {
@@ -648,3 +662,6 @@ private fun UtConcreteExecutionResult.violatesUtMockAssumption(): Boolean {
648662 // so we can't cast them to each other.
649663 return result.exceptionOrNull()?.javaClass?.name == UtMockAssumptionViolatedException ::class .java.name
650664}
665+
666+ private fun checkStaticMethodsMock (execution : UtSymbolicExecution ) =
667+ execution.instrumentation.any { it is UtStaticMethodInstrumentation }
You can’t perform that action at this time.
0 commit comments