-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added tests for the IFlow SAT solvers.
- Loading branch information
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package checkers.inference; | ||
|
||
import checkers.inference.test.CFInferenceTest; | ||
import org.checkerframework.framework.test.TestUtilities; | ||
import org.checkerframework.javacutil.Pair; | ||
import org.junit.runners.Parameterized.Parameters; | ||
import sparta.checkers.IFlowSinkChecker; | ||
import sparta.checkers.sat.SinkSolver; | ||
|
||
import java.io.File; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class IFlowSinkSatTest extends CFInferenceTest { | ||
|
||
public IFlowSinkSatTest(File testFile) { | ||
super(testFile, IFlowSinkChecker.class, "sparta"+File.separator+"checkers", | ||
"-Anomsgtext", "-Astubs=src/sparta/checkers/information_flow.astub", "-d", "tests/build/outputdir"); | ||
} | ||
|
||
@Override | ||
public Pair<String, List<String>> getSolverNameAndOptions() { | ||
return Pair.<String, List<String>>of(SinkSolver.class.getCanonicalName(), new ArrayList<String>()); | ||
} | ||
|
||
@Parameters | ||
public static List<File> getTestFiles(){ | ||
List<File> testfiles = new ArrayList<>();//InferenceTestUtilities.findAllSystemTests(); | ||
TestUtilities.filterOutJdk8Sources(testfiles); | ||
testfiles.addAll(TestUtilities.findRelativeNestedJavaFiles("testdata", "iflowsink")); | ||
return testfiles; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package checkers.inference; | ||
|
||
import checkers.inference.test.CFInferenceTest; | ||
import org.checkerframework.framework.test.TestUtilities; | ||
import org.checkerframework.javacutil.Pair; | ||
import org.junit.runners.Parameterized.Parameters; | ||
import sparta.checkers.IFlowSourceChecker; | ||
import sparta.checkers.sat.SourceSolver; | ||
|
||
import java.io.File; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class IFlowSourceSatTest extends CFInferenceTest { | ||
|
||
public IFlowSourceSatTest(File testFile) { | ||
super(testFile, IFlowSourceChecker.class, "sparta"+File.separator+"checkers", | ||
"-Anomsgtext", "-Astubs=src/sparta/checkers/information_flow.astub", "-d", "tests/build/outputdir"); | ||
} | ||
|
||
@Override | ||
public Pair<String, List<String>> getSolverNameAndOptions() { | ||
return Pair.<String, List<String>>of(SourceSolver.class.getCanonicalName(), new ArrayList<String>()); | ||
} | ||
|
||
@Parameters | ||
public static List<File> getTestFiles(){ | ||
List<File> testfiles = new ArrayList<>();//InferenceTestUtilities.findAllSystemTests(); | ||
TestUtilities.filterOutJdk8Sources(testfiles); | ||
testfiles.addAll(TestUtilities.findRelativeNestedJavaFiles("testdata", "iflowsource")); | ||
return testfiles; | ||
} | ||
} |