diff options
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 2165056a7f..8d95538b16 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -470,6 +470,10 @@ TEST_F(FormatTest, IndentPreprocessorDirectivesAtZero) { EXPECT_EQ("{\n {\n#define A\n }\n}", format("{{\n#define A\n}}")); } +TEST_F(FormatTest, FormatHashIfNotAtStartOfLine) { + verifyFormat("{\n {\n a #c;\n }\n}"); +} + // FIXME: write test for unbalanced braces in macros... // FIXME: test # inside a normal statement (like {#define A b}) |