Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-locus-generate-patch.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line diff
--- a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-locus-generate-patch.c Fri Oct 27 22:46:09 2017 +0900 +++ b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-locus-generate-patch.c Thu Oct 25 07:37:49 2018 +0900 @@ -64,6 +64,21 @@ #endif } +/* Unit tests for add_fixit_insert_formatted. */ + +void test_add_fixit_insert_formatted_single_line (void) +{ + {} +} + +void test_add_fixit_insert_formatted_multiline (void) +{ + if (1) + { + } +} + + /* Verify the output from -fdiagnostics-generate-patch. We expect a header, containing the filename. This is the absolute path, so we can only capture it via regexps. */ @@ -108,4 +123,21 @@ case 'b': x = b; } +@@ -68,7 +69,7 @@ + + void test_add_fixit_insert_formatted_single_line (void) + { +- {} ++ {INSERTED-CONTENT} + } + + void test_add_fixit_insert_formatted_multiline (void) +@@ -76,6 +77,7 @@ + if (1) + { + } ++ INSERTED-CONTENT + } + + { dg-end-multiline-output "" } */