File tree Expand file tree Collapse file tree
main/java/org/utbot/examples/manual
test/kotlin/org/utbot/examples/manual Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package org.utbot.examples.manual
22
3- import org.utbot.common.FileUtil
43import org.utbot.framework.plugin.api.ClassId
54import org.utbot.framework.plugin.api.FieldId
65import org.utbot.framework.plugin.api.UtModel
76import org.utbot.framework.plugin.api.UtPrimitiveModel
8- import java.nio.file.Path
97
108object SootUtils {
119 @JvmStatic
1210 fun runSoot (clazz : Class <* >) {
13- val buildDir = FileUtil .locateClassPath(clazz.kotlin) ? : FileUtil .isolateClassFiles(clazz.kotlin)
14- val buildDirPath = buildDir.toPath()
15-
16- if (buildDirPath != previousBuildDir) {
17- org.utbot.framework.util.runSoot(buildDirPath, null )
18- previousBuildDir = buildDirPath
19- }
11+ org.utbot.framework.SootUtils .runSoot(clazz.kotlin)
2012 }
21-
22- private var previousBuildDir: Path ? = null
2313}
2414
2515fun fields (
Original file line number Diff line number Diff line change 3131import java .lang .reflect .Method ;
3232import java .net .URISyntaxException ;
3333import java .net .URL ;
34- import java .util .*;
34+ import java .net .URLClassLoader ;
35+ import java .util .Arrays ;
36+ import java .util .Collections ;
37+ import java .util .HashMap ;
38+ import java .util .IdentityHashMap ;
39+ import java .util .List ;
40+ import java .util .Map ;
3541import java .util .stream .Collectors ;
3642
3743import static org .utbot .external .api .UtModelFactoryKt .classIdForType ;
@@ -60,7 +66,6 @@ public class UtBotJavaApiTest {
6066
6167 @ BeforeEach
6268 public void setUp () {
63- SootUtils .runSoot (PrimitiveFields .class );
6469 context = UtContext .Companion .setUtContext (new UtContext (PrimitiveFields .class .getClassLoader ()));
6570 modelFactory = new UtModelFactory ();
6671 }
@@ -1221,6 +1226,7 @@ public void testOnObjectWithArrayOfComplexArrays() {
12211226
12221227 @ Test
12231228 public void testFuzzingSimple () {
1229+ SootUtils .runSoot (StringSwitchExample .class );
12241230 UtBotJavaApi .setStopConcreteExecutorOnExit (false );
12251231
12261232 String classpath = getClassPath (StringSwitchExample .class );
You can’t perform that action at this time.
0 commit comments