JS: Add test

This commit is contained in:
Asger F
2019-03-06 12:50:59 +00:00
parent e6a1374218
commit 3422fa328d
6 changed files with 212 additions and 4 deletions

View File

@@ -103,10 +103,11 @@ module StepSummary {
// Flow out of function
returnStep(predNode, succ) and
summary = return()
or
// Flow through an instance field between members of the same class
DataFlow::localFieldStep(predNode, succ) and
summary = level()
)
or
DataFlow::localFieldStep(pred, succ) and
summary = level()
}
/**
@@ -207,7 +208,7 @@ private newtype TTypeBackTracker = MkTypeBackTracker(boolean hasReturn) {
* ```
* DataFlow::SourceNode myCallback(DataFlow::TypeBackTracker t) {
* t.start() and
* result = (< some API call >).getParameter(< n >).getALocalSource()
* result = (< some API call >).getArgument(< n >).getALocalSource()
* or
* exists (DataFlow::TypeTracker t2 |
* result = myCallback(t2).backtrack(t2, t)