diff options
Diffstat (limited to 'clang/unittests/Format')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 90c74a47327..ab3303ea928 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -7326,12 +7326,19 @@ TEST_F(FormatTest, SpacesInAngles) { verifyFormat("A<A<int>>();", Spaces); } - TEST_F(FormatTest, UnderstandsJavaScript) { + verifyFormat("a == = b;"); + verifyFormat("a != = b;"); + verifyFormat("a === b;"); - verifyFormat("aaaaaaa === b;", getLLVMStyleWithColumns(10)); + verifyFormat("aaaaaaa ===\n b;", getLLVMStyleWithColumns(10)); verifyFormat("a !== b;"); - verifyFormat("aaaaaaa !== b;", getLLVMStyleWithColumns(10)); + verifyFormat("aaaaaaa !==\n b;", getLLVMStyleWithColumns(10)); + verifyFormat("if (a + b + c +\n" + " d !==\n" + " e + f + g)\n" + " q();", + getLLVMStyleWithColumns(20)); } } // end namespace tooling |