Skip to content

Commit e30d0dd

Browse files
committed
Another test for the EasyTaintWrapper
1 parent 686f924 commit e30d0dd

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

soot-infoflow/test/soot/jimple/infoflow/test/junit/EasyWrapperTests.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
import java.io.File;
1414
import java.io.IOException;
15+
import java.io.StringReader;
1516
import java.util.ArrayList;
1617
import java.util.List;
1718

@@ -194,4 +195,16 @@ public void wrapperMissAndCalleeOverwritesTaint() {
194195
infoflow.computeInfoflow(appPath, libPath, epoints, sources, sinks);
195196
negativeCheckInfoflow(infoflow);
196197
}
198+
199+
@Test(timeout = 300000)
200+
public void wrapperHitAndCalleeOverwritesTaint() throws IOException {
201+
IInfoflow infoflow = initInfoflow();
202+
List<String> epoints = new ArrayList<String>();
203+
epoints.add("<soot.jimple.infoflow.test.EasyWrapperTestCode: void wrapperMissAndCalleeOverwritesTaint()>");
204+
infoflow.setTaintWrapper(new EasyTaintWrapper(new StringReader("^soot.jimple.infoflow.test.EasyWrapperTestCode$Wrapper")));
205+
infoflow.computeInfoflow(appPath, libPath, epoints, sources, sinks);
206+
// We do expect one result here because the declaring class is included in the
207+
// EasyTaintWrapper and thus, the include check does keep the taint alive.
208+
checkInfoflow(infoflow, 1);
209+
}
197210
}

0 commit comments

Comments
 (0)