File tree Expand file tree Collapse file tree 2 files changed +9
-13
lines changed
main/java/org/utbot/examples/manual
test/kotlin/org/utbot/examples/manual Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Original file line number Diff line number Diff line change 1
1
package org.utbot.examples.manual
2
2
3
- import org.utbot.common.FileUtil
4
3
import org.utbot.framework.plugin.api.ClassId
5
4
import org.utbot.framework.plugin.api.FieldId
6
5
import org.utbot.framework.plugin.api.UtModel
7
6
import org.utbot.framework.plugin.api.UtPrimitiveModel
8
- import java.nio.file.Path
9
7
10
8
object SootUtils {
11
9
@JvmStatic
12
10
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)
20
12
}
21
-
22
- private var previousBuildDir: Path ? = null
23
13
}
24
14
25
15
fun fields (
Original file line number Diff line number Diff line change 31
31
import java .lang .reflect .Method ;
32
32
import java .net .URISyntaxException ;
33
33
import 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 ;
35
41
import java .util .stream .Collectors ;
36
42
37
43
import static org .utbot .external .api .UtModelFactoryKt .classIdForType ;
@@ -60,7 +66,6 @@ public class UtBotJavaApiTest {
60
66
61
67
@ BeforeEach
62
68
public void setUp () {
63
- SootUtils .runSoot (PrimitiveFields .class );
64
69
context = UtContext .Companion .setUtContext (new UtContext (PrimitiveFields .class .getClassLoader ()));
65
70
modelFactory = new UtModelFactory ();
66
71
}
@@ -1221,6 +1226,7 @@ public void testOnObjectWithArrayOfComplexArrays() {
1221
1226
1222
1227
@ Test
1223
1228
public void testFuzzingSimple () {
1229
+ SootUtils .runSoot (StringSwitchExample .class );
1224
1230
UtBotJavaApi .setStopConcreteExecutorOnExit (false );
1225
1231
1226
1232
String classpath = getClassPath (StringSwitchExample .class );
You can’t perform that action at this time.
0 commit comments