@@ -6,16 +6,6 @@ import java
6
6
7
7
external predicate queryResults ( string relation , int row , int column , string data ) ;
8
8
9
- string actualLines ( ) {
10
- exists ( int i |
11
- queryResults ( "#select" , i , _, _) and
12
- result =
13
- " | " +
14
- concat ( int j , string cell | queryResults ( "#select" , i , j , cell ) | cell , " | " order by j ) +
15
- " | "
16
- )
17
- }
18
-
19
9
predicate parsedExpectedResults ( string filename , int line , string content ) {
20
10
exists ( Javadoc doc |
21
11
isEolComment ( doc ) and
@@ -39,17 +29,16 @@ predicate expectPass(string filename, int line) {
39
29
}
40
30
41
31
predicate parsedActualResults ( string filename , int line , int colStart , int colEnd , string content ) {
42
- exists ( string s , string posString , string lineString |
43
- s = actualLines ( ) and
44
- posString = s .substring ( s .indexOf ( "|" , 0 , 0 ) + 1 , s .indexOf ( "|" , 1 , 0 ) ) .trim ( ) and
32
+ exists ( int i , string posString , string lineString |
33
+ queryResults ( "#select" , i , 0 , posString ) and
45
34
filename = posString .substring ( 0 , posString .indexOf ( ":" , 0 , 0 ) ) and
46
35
lineString = posString .substring ( posString .indexOf ( ":" , 0 , 0 ) + 1 , posString .indexOf ( ":" , 1 , 0 ) ) and
47
36
lineString = posString .substring ( posString .indexOf ( ":" , 2 , 0 ) + 1 , posString .indexOf ( ":" , 3 , 0 ) ) and
48
37
colStart =
49
38
posString .substring ( posString .indexOf ( ":" , 1 , 0 ) + 1 , posString .indexOf ( ":" , 2 , 0 ) ) .toInt ( ) and
50
39
colEnd = posString .substring ( posString .indexOf ( ":" , 3 , 0 ) + 1 , posString .length ( ) ) .toInt ( ) and
51
40
line = lineString .toInt ( ) and
52
- content = s . substring ( s . indexOf ( "| ", 2 , 0 ) + 1 , s . indexOf ( "|" , 3 , 0 ) ) . trim ( )
41
+ queryResults ( "#select ", i , 2 , content )
53
42
)
54
43
}
55
44
0 commit comments