Skip to content

Commit a7ce884

Browse files
committed
Use appropriate engine in flow
1 parent 4e3ae14 commit a7ce884

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package org.utbot.engine
2+
3+
import kotlinx.coroutines.flow.Flow
4+
import kotlinx.coroutines.flow.emptyFlow
5+
import org.utbot.framework.plugin.api.UtResult
6+
7+
class UsvmSymbolicEngine {
8+
9+
fun generateWithUsvm(): Flow<UtResult> = emptyFlow()
10+
}

utbot-framework/src/main/kotlin/org/utbot/framework/plugin/api/TestFlow.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import kotlinx.coroutines.flow.Flow
44
import kotlinx.coroutines.flow.emptyFlow
55
import kotlinx.coroutines.flow.flattenConcat
66
import kotlinx.coroutines.flow.flowOf
7+
import org.utbot.engine.UsvmSymbolicEngine
78
import org.utbot.engine.UtBotSymbolicEngine
89
import org.utbot.framework.UtSettings
910
import org.utbot.framework.codegen.domain.SymbolicEngineSource
10-
import org.utbot.framework.process.generated.GenerateParams
1111

1212
/**
1313
* Constructs [TestFlow] for customization and creates flow producer.
@@ -73,7 +73,12 @@ class TestFlow internal constructor(block: TestFlow.() -> Unit) {
7373
).flattenConcat()
7474
}
7575
}
76-
isSymbolicEngineEnabled -> engine.traverse()
76+
isSymbolicEngineEnabled -> {
77+
when (symbolicEngineType) {
78+
SymbolicEngineSource.UnitTestBot -> engine.traverse()
79+
SymbolicEngineSource.Usvm -> UsvmSymbolicEngine().generateWithUsvm()
80+
}
81+
}
7782
else -> emptyFlow()
7883
}
7984
}

0 commit comments

Comments
 (0)