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.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 5ffd351889..bffbbf5331 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -714,8 +714,10 @@ TEST_F(FormatTest, DoesNotBreakPureVirtualFunctionDefinition) {
" OwningPtr<FileOutputBuffer> &buffer) = 0;");
}
-TEST_F(FormatTest, BreaksOnHashWhenDirectiveIsInvalid) {
- EXPECT_EQ("#\n;", format("#;"));
+TEST_F(FormatTest, LayoutUnknownPPDirective) {
+ EXPECT_EQ("#123 \"A string literal\"",
+ format(" # 123 \"A string literal\""));
+ EXPECT_EQ("#;", format("#;"));
verifyFormat("#\n;\n;\n;");
}