C#: Remove (symmetric) duplicates from the test output.

This commit is contained in:
Michael Nebel
2022-02-25 10:03:28 +01:00
parent 38f04e5585
commit 53b2eac8c5
2 changed files with 10 additions and 52 deletions

View File

@@ -2,9 +2,6 @@ same
| StructuralComparison.cs:15:18:15:18 | access to field x | StructuralComparison.cs:16:18:16:18 | access to field x |
| StructuralComparison.cs:15:18:15:22 | ... + ... | StructuralComparison.cs:16:18:16:22 | ... + ... |
| StructuralComparison.cs:15:22:15:22 | access to field y | StructuralComparison.cs:16:22:16:22 | access to field y |
| StructuralComparison.cs:16:18:16:18 | access to field x | StructuralComparison.cs:15:18:15:18 | access to field x |
| StructuralComparison.cs:16:18:16:22 | ... + ... | StructuralComparison.cs:15:18:15:22 | ... + ... |
| StructuralComparison.cs:16:22:16:22 | access to field y | StructuralComparison.cs:15:22:15:22 | access to field y |
| StructuralComparison.cs:21:18:21:22 | call to method M1 | StructuralComparison.cs:22:18:22:22 | call to method M1 |
| StructuralComparison.cs:21:21:21:21 | access to field x | StructuralComparison.cs:22:21:22:21 | access to field x |
| StructuralComparison.cs:21:21:21:21 | access to field x | StructuralComparison.cs:25:21:25:21 | access to field x |
@@ -12,8 +9,6 @@ same
| StructuralComparison.cs:21:21:21:21 | access to field x | StructuralComparison.cs:26:12:26:12 | access to field x |
| StructuralComparison.cs:21:21:21:21 | access to field x | StructuralComparison.cs:27:15:27:15 | access to field x |
| StructuralComparison.cs:21:21:21:21 | access to field x | StructuralComparison.cs:28:15:28:15 | access to field x |
| StructuralComparison.cs:22:18:22:22 | call to method M1 | StructuralComparison.cs:21:18:21:22 | call to method M1 |
| StructuralComparison.cs:22:21:22:21 | access to field x | StructuralComparison.cs:21:21:21:21 | access to field x |
| StructuralComparison.cs:22:21:22:21 | access to field x | StructuralComparison.cs:25:21:25:21 | access to field x |
| StructuralComparison.cs:22:21:22:21 | access to field x | StructuralComparison.cs:25:32:25:32 | access to field x |
| StructuralComparison.cs:22:21:22:21 | access to field x | StructuralComparison.cs:26:12:26:12 | access to field x |
@@ -26,81 +21,35 @@ same
| StructuralComparison.cs:23:21:23:21 | access to field y | StructuralComparison.cs:28:12:28:12 | access to field y |
| StructuralComparison.cs:25:18:25:25 | call to method M2 | StructuralComparison.cs:25:29:25:36 | call to method M2 |
| StructuralComparison.cs:25:18:25:25 | call to method M2 | StructuralComparison.cs:26:9:26:16 | call to method M2 |
| StructuralComparison.cs:25:21:25:21 | access to field x | StructuralComparison.cs:21:21:21:21 | access to field x |
| StructuralComparison.cs:25:21:25:21 | access to field x | StructuralComparison.cs:22:21:22:21 | access to field x |
| StructuralComparison.cs:25:21:25:21 | access to field x | StructuralComparison.cs:25:32:25:32 | access to field x |
| StructuralComparison.cs:25:21:25:21 | access to field x | StructuralComparison.cs:26:12:26:12 | access to field x |
| StructuralComparison.cs:25:21:25:21 | access to field x | StructuralComparison.cs:27:15:27:15 | access to field x |
| StructuralComparison.cs:25:21:25:21 | access to field x | StructuralComparison.cs:28:15:28:15 | access to field x |
| StructuralComparison.cs:25:24:25:24 | access to field y | StructuralComparison.cs:23:21:23:21 | access to field y |
| StructuralComparison.cs:25:24:25:24 | access to field y | StructuralComparison.cs:25:35:25:35 | access to field y |
| StructuralComparison.cs:25:24:25:24 | access to field y | StructuralComparison.cs:26:15:26:15 | access to field y |
| StructuralComparison.cs:25:24:25:24 | access to field y | StructuralComparison.cs:27:12:27:12 | access to field y |
| StructuralComparison.cs:25:24:25:24 | access to field y | StructuralComparison.cs:28:12:28:12 | access to field y |
| StructuralComparison.cs:25:29:25:36 | call to method M2 | StructuralComparison.cs:25:18:25:25 | call to method M2 |
| StructuralComparison.cs:25:29:25:36 | call to method M2 | StructuralComparison.cs:26:9:26:16 | call to method M2 |
| StructuralComparison.cs:25:32:25:32 | access to field x | StructuralComparison.cs:21:21:21:21 | access to field x |
| StructuralComparison.cs:25:32:25:32 | access to field x | StructuralComparison.cs:22:21:22:21 | access to field x |
| StructuralComparison.cs:25:32:25:32 | access to field x | StructuralComparison.cs:25:21:25:21 | access to field x |
| StructuralComparison.cs:25:32:25:32 | access to field x | StructuralComparison.cs:26:12:26:12 | access to field x |
| StructuralComparison.cs:25:32:25:32 | access to field x | StructuralComparison.cs:27:15:27:15 | access to field x |
| StructuralComparison.cs:25:32:25:32 | access to field x | StructuralComparison.cs:28:15:28:15 | access to field x |
| StructuralComparison.cs:25:35:25:35 | access to field y | StructuralComparison.cs:23:21:23:21 | access to field y |
| StructuralComparison.cs:25:35:25:35 | access to field y | StructuralComparison.cs:25:24:25:24 | access to field y |
| StructuralComparison.cs:25:35:25:35 | access to field y | StructuralComparison.cs:26:15:26:15 | access to field y |
| StructuralComparison.cs:25:35:25:35 | access to field y | StructuralComparison.cs:27:12:27:12 | access to field y |
| StructuralComparison.cs:25:35:25:35 | access to field y | StructuralComparison.cs:28:12:28:12 | access to field y |
| StructuralComparison.cs:26:9:26:16 | call to method M2 | StructuralComparison.cs:25:18:25:25 | call to method M2 |
| StructuralComparison.cs:26:9:26:16 | call to method M2 | StructuralComparison.cs:25:29:25:36 | call to method M2 |
| StructuralComparison.cs:26:12:26:12 | access to field x | StructuralComparison.cs:21:21:21:21 | access to field x |
| StructuralComparison.cs:26:12:26:12 | access to field x | StructuralComparison.cs:22:21:22:21 | access to field x |
| StructuralComparison.cs:26:12:26:12 | access to field x | StructuralComparison.cs:25:21:25:21 | access to field x |
| StructuralComparison.cs:26:12:26:12 | access to field x | StructuralComparison.cs:25:32:25:32 | access to field x |
| StructuralComparison.cs:26:12:26:12 | access to field x | StructuralComparison.cs:27:15:27:15 | access to field x |
| StructuralComparison.cs:26:12:26:12 | access to field x | StructuralComparison.cs:28:15:28:15 | access to field x |
| StructuralComparison.cs:26:15:26:15 | access to field y | StructuralComparison.cs:23:21:23:21 | access to field y |
| StructuralComparison.cs:26:15:26:15 | access to field y | StructuralComparison.cs:25:24:25:24 | access to field y |
| StructuralComparison.cs:26:15:26:15 | access to field y | StructuralComparison.cs:25:35:25:35 | access to field y |
| StructuralComparison.cs:26:15:26:15 | access to field y | StructuralComparison.cs:27:12:27:12 | access to field y |
| StructuralComparison.cs:26:15:26:15 | access to field y | StructuralComparison.cs:28:12:28:12 | access to field y |
| StructuralComparison.cs:27:9:27:16 | call to method M2 | StructuralComparison.cs:28:9:28:16 | call to method M2 |
| StructuralComparison.cs:27:9:27:17 | ...; | StructuralComparison.cs:28:9:28:17 | ...; |
| StructuralComparison.cs:27:12:27:12 | access to field y | StructuralComparison.cs:23:21:23:21 | access to field y |
| StructuralComparison.cs:27:12:27:12 | access to field y | StructuralComparison.cs:25:24:25:24 | access to field y |
| StructuralComparison.cs:27:12:27:12 | access to field y | StructuralComparison.cs:25:35:25:35 | access to field y |
| StructuralComparison.cs:27:12:27:12 | access to field y | StructuralComparison.cs:26:15:26:15 | access to field y |
| StructuralComparison.cs:27:12:27:12 | access to field y | StructuralComparison.cs:28:12:28:12 | access to field y |
| StructuralComparison.cs:27:15:27:15 | access to field x | StructuralComparison.cs:21:21:21:21 | access to field x |
| StructuralComparison.cs:27:15:27:15 | access to field x | StructuralComparison.cs:22:21:22:21 | access to field x |
| StructuralComparison.cs:27:15:27:15 | access to field x | StructuralComparison.cs:25:21:25:21 | access to field x |
| StructuralComparison.cs:27:15:27:15 | access to field x | StructuralComparison.cs:25:32:25:32 | access to field x |
| StructuralComparison.cs:27:15:27:15 | access to field x | StructuralComparison.cs:26:12:26:12 | access to field x |
| StructuralComparison.cs:27:15:27:15 | access to field x | StructuralComparison.cs:28:15:28:15 | access to field x |
| StructuralComparison.cs:28:9:28:16 | call to method M2 | StructuralComparison.cs:27:9:27:16 | call to method M2 |
| StructuralComparison.cs:28:9:28:17 | ...; | StructuralComparison.cs:27:9:27:17 | ...; |
| StructuralComparison.cs:28:12:28:12 | access to field y | StructuralComparison.cs:23:21:23:21 | access to field y |
| StructuralComparison.cs:28:12:28:12 | access to field y | StructuralComparison.cs:25:24:25:24 | access to field y |
| StructuralComparison.cs:28:12:28:12 | access to field y | StructuralComparison.cs:25:35:25:35 | access to field y |
| StructuralComparison.cs:28:12:28:12 | access to field y | StructuralComparison.cs:26:15:26:15 | access to field y |
| StructuralComparison.cs:28:12:28:12 | access to field y | StructuralComparison.cs:27:12:27:12 | access to field y |
| StructuralComparison.cs:28:15:28:15 | access to field x | StructuralComparison.cs:21:21:21:21 | access to field x |
| StructuralComparison.cs:28:15:28:15 | access to field x | StructuralComparison.cs:22:21:22:21 | access to field x |
| StructuralComparison.cs:28:15:28:15 | access to field x | StructuralComparison.cs:25:21:25:21 | access to field x |
| StructuralComparison.cs:28:15:28:15 | access to field x | StructuralComparison.cs:25:32:25:32 | access to field x |
| StructuralComparison.cs:28:15:28:15 | access to field x | StructuralComparison.cs:26:12:26:12 | access to field x |
| StructuralComparison.cs:28:15:28:15 | access to field x | StructuralComparison.cs:27:15:27:15 | access to field x |
| StructuralComparison.cs:42:18:42:27 | access to field Field | StructuralComparison.cs:43:18:43:22 | access to field Field |
| StructuralComparison.cs:42:18:42:27 | access to field Field | StructuralComparison.cs:44:18:44:27 | access to field Field |
| StructuralComparison.cs:43:18:43:22 | access to field Field | StructuralComparison.cs:42:18:42:27 | access to field Field |
| StructuralComparison.cs:43:18:43:22 | access to field Field | StructuralComparison.cs:44:18:44:27 | access to field Field |
| StructuralComparison.cs:44:18:44:27 | access to field Field | StructuralComparison.cs:42:18:42:27 | access to field Field |
| StructuralComparison.cs:44:18:44:27 | access to field Field | StructuralComparison.cs:43:18:43:22 | access to field Field |
| StructuralComparison.cs:49:18:49:26 | access to property Prop | StructuralComparison.cs:50:18:50:21 | access to property Prop |
| StructuralComparison.cs:49:18:49:26 | access to property Prop | StructuralComparison.cs:51:18:51:26 | access to property Prop |
| StructuralComparison.cs:50:18:50:21 | access to property Prop | StructuralComparison.cs:49:18:49:26 | access to property Prop |
| StructuralComparison.cs:50:18:50:21 | access to property Prop | StructuralComparison.cs:51:18:51:26 | access to property Prop |
| StructuralComparison.cs:51:18:51:26 | access to property Prop | StructuralComparison.cs:49:18:49:26 | access to property Prop |
| StructuralComparison.cs:51:18:51:26 | access to property Prop | StructuralComparison.cs:50:18:50:21 | access to property Prop |
gvn
| StructuralComparison.cs:5:26:5:26 | access to field x | (kind:Expr(16),true,x) |
| StructuralComparison.cs:5:26:5:26 | this access | (kind:Expr(12)) |

View File

@@ -19,7 +19,16 @@ private class StructuralComparisonTest extends StructuralComparisonConfiguration
}
query predicate same(ControlFlowElement e1, ControlFlowElement e2) {
exists(StructuralComparisonTest sct | sct.same(e1, e2))
exists(StructuralComparisonTest sct, Location l1, Location l2 |
sct.same(e1, e2) and
l1 = e1.getLocation() and
l2 = e2.getLocation() and
(
l1.getStartLine() < l2.getStartLine()
or
l1.getStartLine() = l2.getStartLine() and l1.getStartColumn() < l2.getStartColumn()
)
)
}
query predicate gvn(ControlFlowElement e, Gvn gvn) { gvn = toGvn(e) and e.fromSource() }