Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d35959a

Browse files
committed
JS: Add utility for comparing results in tests
1 parent 43be452 commit d35959a

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
private import javascript
2+
3+
private signature class LegacyConfigSig extends DataFlow::Configuration;
4+
5+
module DataFlowDiff<DataFlow::GlobalFlowSig NewFlow, LegacyConfigSig LegacyConfig> {
6+
query predicate legacyDataFlowDifference(
7+
DataFlow::Node source, DataFlow::Node sink, string message
8+
) {
9+
NewFlow::flow(source, sink) and
10+
not any(LegacyConfig cfg).hasFlow(source, sink) and
11+
message = "only flow with NEW data flow library"
12+
or
13+
not NewFlow::flow(source, sink) and
14+
any(LegacyConfig cfg).hasFlow(source, sink) and
15+
message = "only flow with OLD data flow library"
16+
}
17+
}

0 commit comments

Comments
 (0)