Skip to content

Commit 48455db

Browse files
committed
C#: Update the test expected output.
1 parent 1a793d8 commit 48455db

2 files changed

Lines changed: 12 additions & 27 deletions

File tree

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,24 @@
1-
methodCalls
21
| Slice.cs:8:20:8:26 | call to method Substring | Substring(int, int) | 0 | 1 |
3-
| Slice.cs:8:20:8:26 | call to method Substring | Substring(int, int) | 1 | access to parameter a - 1 |
2+
| Slice.cs:8:20:8:26 | call to method Substring | Substring(int, int) | 1 | access to parameter a |
43
| Slice.cs:9:20:9:25 | call to method Substring | Substring(int, int) | 0 | 0 |
54
| Slice.cs:9:20:9:25 | call to method Substring | Substring(int, int) | 1 | 2 |
65
| Slice.cs:10:20:10:25 | call to method Substring | Substring(int, int) | 0 | 3 |
7-
| Slice.cs:10:20:10:25 | call to method Substring | Substring(int, int) | 1 | access to property Length - 3 |
6+
| Slice.cs:10:20:10:25 | call to method Substring | Substring(int, int) | 1 | ^0 |
87
| Slice.cs:11:20:11:26 | call to method Substring | Substring(int, int) | 0 | 0 |
9-
| Slice.cs:11:20:11:26 | call to method Substring | Substring(int, int) | 1 | access to property Length - 4 |
8+
| Slice.cs:11:20:11:26 | call to method Substring | Substring(int, int) | 1 | ^4 |
109
| Slice.cs:12:20:12:27 | call to method Substring | Substring(int, int) | 0 | access to parameter a |
11-
| Slice.cs:12:20:12:27 | call to method Substring | Substring(int, int) | 1 | access to property Length - access to parameter b - access to parameter a |
10+
| Slice.cs:12:20:12:27 | call to method Substring | Substring(int, int) | 1 | ^access to parameter b |
1211
| Slice.cs:13:20:13:24 | call to method Substring | Substring(int, int) | 0 | 0 |
13-
| Slice.cs:13:20:13:24 | call to method Substring | Substring(int, int) | 1 | access to property Length |
12+
| Slice.cs:13:20:13:24 | call to method Substring | Substring(int, int) | 1 | ^0 |
1413
| Slice.cs:16:22:16:29 | call to method Slice | Slice(int, int) | 0 | 5 |
15-
| Slice.cs:16:22:16:29 | call to method Slice | Slice(int, int) | 1 | access to parameter a - 5 |
14+
| Slice.cs:16:22:16:29 | call to method Slice | Slice(int, int) | 1 | access to parameter a |
1615
| Slice.cs:17:22:17:28 | call to method Slice | Slice(int, int) | 0 | 0 |
1716
| Slice.cs:17:22:17:28 | call to method Slice | Slice(int, int) | 1 | 6 |
1817
| Slice.cs:18:22:18:28 | call to method Slice | Slice(int, int) | 0 | 7 |
19-
| Slice.cs:18:22:18:28 | call to method Slice | Slice(int, int) | 1 | access to property Length - 7 |
18+
| Slice.cs:18:22:18:28 | call to method Slice | Slice(int, int) | 1 | ^0 |
2019
| Slice.cs:19:22:19:29 | call to method Slice | Slice(int, int) | 0 | 0 |
21-
| Slice.cs:19:22:19:29 | call to method Slice | Slice(int, int) | 1 | access to property Length - 8 |
20+
| Slice.cs:19:22:19:29 | call to method Slice | Slice(int, int) | 1 | ^8 |
2221
| Slice.cs:20:22:20:30 | call to method Slice | Slice(int, int) | 0 | access to parameter a |
23-
| Slice.cs:20:22:20:30 | call to method Slice | Slice(int, int) | 1 | access to property Length - access to parameter b - access to parameter a |
22+
| Slice.cs:20:22:20:30 | call to method Slice | Slice(int, int) | 1 | ^access to parameter b |
2423
| Slice.cs:21:22:21:27 | call to method Slice | Slice(int, int) | 0 | 0 |
25-
| Slice.cs:21:22:21:27 | call to method Slice | Slice(int, int) | 1 | access to property Length |
26-
propertyCalls
27-
| Slice.cs:10:20:10:25 | access to property Length | Slice.cs:10:20:10:20 | access to local variable s |
28-
| Slice.cs:11:20:11:26 | access to property Length | Slice.cs:11:20:11:20 | access to local variable s |
29-
| Slice.cs:12:20:12:27 | access to property Length | Slice.cs:12:20:12:20 | access to local variable s |
30-
| Slice.cs:13:20:13:24 | access to property Length | Slice.cs:13:20:13:20 | access to local variable s |
31-
| Slice.cs:18:22:18:28 | access to property Length | Slice.cs:18:22:18:23 | access to local variable sp |
32-
| Slice.cs:19:22:19:29 | access to property Length | Slice.cs:19:22:19:23 | access to local variable sp |
33-
| Slice.cs:20:22:20:30 | access to property Length | Slice.cs:20:22:20:23 | access to local variable sp |
34-
| Slice.cs:21:22:21:27 | access to property Length | Slice.cs:21:22:21:23 | access to local variable sp |
24+
| Slice.cs:21:22:21:27 | call to method Slice | Slice(int, int) | 1 | ^0 |
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
import csharp
22

33
private string printExpr(Expr e) {
4-
e =
5-
any(SubExpr sub |
6-
result = printExpr(sub.getLeftOperand()) + " - " + printExpr(sub.getRightOperand())
7-
)
4+
e = any(IndexExpr index | result = "^" + index.getExpr().toString())
85
or
9-
not e instanceof SubExpr and
6+
not e instanceof IndexExpr and
107
result = e.toString()
118
}
129

1310
query predicate methodCalls(MethodCall mc, string m, int i, string arg) {
1411
m = mc.getTarget().toStringWithTypes() and
1512
arg = printExpr(mc.getArgument(i))
1613
}
17-
18-
query predicate propertyCalls(PropertyCall p, Expr qualifier) { qualifier = p.getQualifier() }

0 commit comments

Comments
 (0)