diff options
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 2ac0078dac9..be8566c7545 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -2468,6 +2468,12 @@ TEST_F(FormatTest, HashInMacroDefinition) { TEST_F(FormatTest, RespectWhitespaceInMacroDefinitions) { EXPECT_EQ("#define A (x)", format("#define A (x)")); EXPECT_EQ("#define A(x)", format("#define A(x)")); + + FormatStyle Style = getLLVMStyle(); + Style.SpaceBeforeParens = FormatStyle::SBPO_Never; + verifyFormat("#define true ((foo)1)", Style); + Style.SpaceBeforeParens = FormatStyle::SBPO_Always; + verifyFormat("#define false((foo)0)", Style); } TEST_F(FormatTest, EmptyLinesInMacroDefinitions) { |