summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2013-11-20 14:30:26 +0000
committerAlexander Kornienko <alexfh@google.com>2013-11-20 14:30:26 +0000
commit7c9c05076969157661e2ba20d6e12dfb04f7976f (patch)
tree629932416ea2db9ad26fa0d9c4df916ab2e30fdf /clang/unittests/Format/FormatTest.cpp
parent3e29c6bf229ac209d56dc8a576b9c61d98e21c6f (diff)
downloadbcm5719-llvm-7c9c05076969157661e2ba20d6e12dfb04f7976f.tar.gz
bcm5719-llvm-7c9c05076969157661e2ba20d6e12dfb04f7976f.zip
Support for JavaScript === and !== operators.
Reviewers: klimek, djasper Reviewed By: klimek CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2231 llvm-svn: 195251
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index d9ca12996fa..433f3f70c8c 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -7309,5 +7309,13 @@ TEST_F(FormatTest, SpacesInAngles) {
verifyFormat("A<A<int>>();", Spaces);
}
+
+TEST_F(FormatTest, UnderstandsJavaScript) {
+ verifyFormat("a === b;");
+ verifyFormat("aaaaaaa === b;", getLLVMStyleWithColumns(10));
+ verifyFormat("a !== b;");
+ verifyFormat("aaaaaaa !== b;", getLLVMStyleWithColumns(10));
+}
+
} // end namespace tooling
} // end namespace clang
OpenPOWER on IntegriCloud