Skip to content

Commit

Permalink
Update Aspectator printing queried declarations in one line
Browse files Browse the repository at this point in the history
Besides, extend the test case to demonstrate this.
  • Loading branch information
eunovm committed Jun 6, 2022
1 parent ae73aa2 commit 1e5d189
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion aspectator
6 changes: 6 additions & 0 deletions tests/input/complex_struct.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ struct B
};

struct B d = { {} };

struct
{
int v;
int t;
} e = {.v = 212};
4 changes: 4 additions & 0 deletions tests/output/complex_struct_call_query_init_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ declaration: struct B d;
value:
field declaration: struct A b;
value: {}
declaration: struct { int v; int t; } e;
value:
field declaration: int v;
value: 212
2 changes: 2 additions & 0 deletions tests/output/complex_struct_call_query_init_list_json.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ declaration: struct A c[2U];
[{"value": [{"value": "21", "field": "int a;"}, {"value": [{"value": "12", "field": "int u;"}], "field": "union { int u; };"}], "index": 0}, {"value": "{}", "index": 1}]
declaration: struct B d;
[{"value": "{}", "field": "struct A b;"}]
declaration: struct { int v; int t; } e;
[{"value": "212", "field": "int v;"}]

0 comments on commit 1e5d189

Please sign in to comment.