aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 89fe71c5ba..2165056a7f 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -466,9 +466,12 @@ TEST_F(FormatTest, HashInMacroDefinition) {
" }", getLLVMStyleWithColumns(11));
}
+TEST_F(FormatTest, IndentPreprocessorDirectivesAtZero) {
+ EXPECT_EQ("{\n {\n#define A\n }\n}", format("{{\n#define A\n}}"));
+}
+
// FIXME: write test for unbalanced braces in macros...
-// FIXME: test { { #include "a.h" } }
-// FIXME: test # in the middle of a statement without \n before it
+// FIXME: test # inside a normal statement (like {#define A b})
TEST_F(FormatTest, MixingPreprocessorDirectivesAndNormalCode) {
EXPECT_EQ(