File tree 1 file changed +17
-0
lines changed
utbot-framework/src/main/kotlin/org/utbot/engine
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -517,6 +517,20 @@ class UtBotSymbolicEngine(
517
517
return
518
518
}
519
519
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
+
520
534
// It's possible that symbolic and concrete stateAfter/results are diverged.
521
535
// So we trust concrete results more.
522
536
try {
@@ -648,3 +662,6 @@ private fun UtConcreteExecutionResult.violatesUtMockAssumption(): Boolean {
648
662
// so we can't cast them to each other.
649
663
return result.exceptionOrNull()?.javaClass?.name == UtMockAssumptionViolatedException ::class .java.name
650
664
}
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