Skip to content

Commit 1e5d189

Browse files
committed
Update Aspectator printing queried declarations in one line
Besides, extend the test case to demonstrate this.
1 parent ae73aa2 commit 1e5d189

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

tests/input/complex_struct.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,9 @@ struct B
1919
};
2020

2121
struct B d = { {} };
22+
23+
struct
24+
{
25+
int v;
26+
int t;
27+
} e = {.v = 212};

tests/output/complex_struct_call_query_init_list.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@ declaration: struct B d;
2424
value:
2525
field declaration: struct A b;
2626
value: {}
27+
declaration: struct { int v; int t; } e;
28+
value:
29+
field declaration: int v;
30+
value: 212

tests/output/complex_struct_call_query_init_list_json.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ declaration: struct A c[2U];
66
[{"value": [{"value": "21", "field": "int a;"}, {"value": [{"value": "12", "field": "int u;"}], "field": "union { int u; };"}], "index": 0}, {"value": "{}", "index": 1}]
77
declaration: struct B d;
88
[{"value": "{}", "field": "struct A b;"}]
9+
declaration: struct { int v; int t; } e;
10+
[{"value": "212", "field": "int v;"}]

0 commit comments

Comments
 (0)