| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O -fdiagnostics-show-caret -fplugin-arg-diagnostic_plugin_test_show_locus-color -fdiagnostics-show-line-numbers" } */ |
| 3 |
|
| 4 |
/* This is a collection of unittests for diagnostic_show_locus; |
| 5 |
see the overview in diagnostic_plugin_test_show_locus.c. |
| 6 |
|
| 7 |
In particular, note the discussion of why we need a very long line here: |
| 8 |
01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 |
| 9 |
and that we can't use macros in this file. */ |
| 10 |
|
| 11 |
void test_multiline (void) |
| 12 |
{ |
| 13 |
#if 0 |
| 14 |
x = (first_function () |
| 15 |
+ second_function ()); /* { dg-warning "test" } */ |
| 16 |
|
| 17 |
/* { dg-begin-multiline-output "" } |
| 18 |
14 | x = ([32m[Kfirst_function ()[m[K |
| 19 |
| [32m[K~~~~~~~~~~~~~~~~~[m[K |
| 20 |
15 | [01;35m[K+[m[K [34m[Ksecond_function ()[m[K); |
| 21 |
| [01;35m[K^[m[K [34m[K~~~~~~~~~~~~~~~~~~[m[K |
| 22 |
| [01;35m[K|[m[K |
| 23 |
| [01;35m[Klabel[m[K |
| 24 |
{ dg-end-multiline-output "" } */ |
| 25 |
#endif |
| 26 |
} |