Skip to content
Snippets Groups Projects
Commit daf89ff0 authored by Pierre Dontenville's avatar Pierre Dontenville Committed by Guillaume Blanc
Browse files

adapt to run test in intellij

parent 42f61be2
No related branches found
No related tags found
1 merge request!485Avatar security tests
...@@ -50,9 +50,15 @@ public class DiplodocusSecurityTest extends AbstractTest { ...@@ -50,9 +50,15 @@ public class DiplodocusSecurityTest extends AbstractTest {
@BeforeClass @BeforeClass
public static void setUpBeforeClass() throws Exception { public static void setUpBeforeClass() throws Exception {
PROVERIF_DIR = getBaseResourcesDir() + DIR_GEN; String test = System.getProperty("org.gradle.test.worker");
MODELS_DIR = getBaseResourcesDir() + DIR_MODELS; String baseResourcesDir = getBaseResourcesDir();
RESOURCES_DIR = getBaseResourcesDir() + DIR_MODELS; if (test==null){
baseResourcesDir = "test/resources/";
}
PROVERIF_DIR = baseResourcesDir + DIR_GEN;
MODELS_DIR = baseResourcesDir + DIR_MODELS;
RESOURCES_DIR = baseResourcesDir + DIR_MODELS;
} }
//arguments are defined in @Parameterized.Parameters //arguments are defined in @Parameterized.Parameters
...@@ -237,8 +243,8 @@ public class DiplodocusSecurityTest extends AbstractTest { ...@@ -237,8 +243,8 @@ public class DiplodocusSecurityTest extends AbstractTest {
} }
return query; return query;
} }
private ArrayList<Pair<String,
private ArrayList<Pair<String, Pair<String, Boolean>>> getComms(String query){ Pair<String, Boolean>>> getComms(String query){
ArrayList<Pair<String, Pair<String, Boolean>>> comms = new ArrayList<>(); ArrayList<Pair<String, Pair<String, Boolean>>> comms = new ArrayList<>();
if (query.contains("==>") && query.matches(".*comm[0-9]+.*")) { if (query.contains("==>") && query.matches(".*comm[0-9]+.*")) {
int index = query.indexOf("==>"); int index = query.indexOf("==>");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment