145
|
1 /* { dg-do compile } */
|
|
2 /* { dg-options "-fdiagnostics-format=json" } */
|
|
3
|
|
4 #error message
|
|
5
|
|
6 /* Use dg-regexp to consume the JSON output starting with
|
|
7 the innermost values, and working outwards.
|
|
8 We can't rely on any ordering of the keys. */
|
|
9
|
|
10 /* { dg-regexp "\"kind\": \"error\"" } */
|
|
11 /* { dg-regexp "\"message\": \"#error message\"" } */
|
|
12
|
|
13 /* { dg-regexp "\"caret\": \{" } */
|
|
14 /* { dg-regexp "\"file\": \"\[^\n\r\"\]*diagnostic-format-json-1.c\"" } */
|
|
15 /* { dg-regexp "\"line\": 4" } */
|
|
16 /* { dg-regexp "\"column\": 2" } */
|
|
17
|
|
18 /* { dg-regexp "\"finish\": \{" } */
|
|
19 /* { dg-regexp "\"file\": \"\[^\n\r\"\]*diagnostic-format-json-1.c\"" } */
|
|
20 /* { dg-regexp "\"line\": 4" } */
|
|
21 /* { dg-regexp "\"column\": 6" } */
|
|
22
|
|
23 /* { dg-regexp "\"locations\": \[\[\{\}, \]*\]" } */
|
|
24 /* { dg-regexp "\"children\": \[\[\]\[\]\]" } */
|
|
25 /* { dg-regexp "\[\[\{\}, \]*\]" } */
|