@@ -16,18 +16,16 @@ private import semmle.code.cpp.ir.dataflow.DataFlow::DataFlow as IRDataFlow
1616private import semmle.code.cpp.dataflow.DataFlow:: DataFlow as AstDataFlow
1717import TestUtilities.InlineExpectationsTest
1818
19- class IRFlowTest extends InlineExpectationsTest {
20- IRFlowTest ( ) { this = "IRFlowTest " }
19+ module IRFlowTest< IRDataFlow :: GlobalFlowSig Flow > implements TestSig {
20+ string getARelevantTag ( ) { result = "ir " }
2121
22- override string getARelevantTag ( ) { result = "ir" }
23-
24- override predicate hasActualResult ( Location location , string element , string tag , string value ) {
25- exists ( IRDataFlow:: Node source , IRDataFlow:: Node sink , IRDataFlow:: Configuration conf , int n |
22+ predicate hasActualResult ( Location location , string element , string tag , string value ) {
23+ exists ( IRDataFlow:: Node source , IRDataFlow:: Node sink , int n |
2624 tag = "ir" and
27- conf . hasFlow ( source , sink ) and
25+ Flow :: flow ( source , sink ) and
2826 n =
2927 strictcount ( int line , int column |
30- conf . hasFlow ( any ( IRDataFlow:: Node otherSource |
28+ Flow :: flow ( any ( IRDataFlow:: Node otherSource |
3129 otherSource .hasLocationInfo ( _, line , column , _, _)
3230 ) , sink )
3331 ) and
@@ -47,20 +45,16 @@ class IRFlowTest extends InlineExpectationsTest {
4745 }
4846}
4947
50- class AstFlowTest extends InlineExpectationsTest {
51- AstFlowTest ( ) { this = "ASTFlowTest" }
52-
53- override string getARelevantTag ( ) { result = "ast" }
48+ module AstFlowTest< AstDataFlow:: GlobalFlowSig Flow> implements TestSig {
49+ string getARelevantTag ( ) { result = "ast" }
5450
55- override predicate hasActualResult ( Location location , string element , string tag , string value ) {
56- exists (
57- AstDataFlow:: Node source , AstDataFlow:: Node sink , AstDataFlow:: Configuration conf , int n
58- |
51+ predicate hasActualResult ( Location location , string element , string tag , string value ) {
52+ exists ( AstDataFlow:: Node source , AstDataFlow:: Node sink , int n |
5953 tag = "ast" and
60- conf . hasFlow ( source , sink ) and
54+ Flow :: flow ( source , sink ) and
6155 n =
6256 strictcount ( int line , int column |
63- conf . hasFlow ( any ( AstDataFlow:: Node otherSource |
57+ Flow :: flow ( any ( AstDataFlow:: Node otherSource |
6458 otherSource .hasLocationInfo ( _, line , column , _, _)
6559 ) , sink )
6660 ) and
@@ -79,6 +73,3 @@ class AstFlowTest extends InlineExpectationsTest {
7973 )
8074 }
8175}
82-
83- /** DEPRECATED: Alias for AstFlowTest */
84- deprecated class ASTFlowTest = AstFlowTest ;
0 commit comments