summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 0aeecc0e122..d7859eb86ec 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -6620,8 +6620,15 @@ TEST_F(FormatTest, UnderstandsTemplateParameters) {
verifyFormat("A<A<int>> a;", getChromiumStyle(FormatStyle::LK_Cpp));
- verifyFormat("int i = a<1> >> 1;");
+ // template closer followed by a token that starts with > or =
verifyFormat("bool b = a<1> > 1;");
+ verifyFormat("bool b = a<1> >= 1;");
+ verifyFormat("int i = a<1> >> 1;");
+ FormatStyle Style = getLLVMStyle();
+ Style.SpaceBeforeAssignmentOperators = false;
+ verifyFormat("bool b= a<1> == 1;", Style);
+ verifyFormat("a<int> = 1;", Style);
+ verifyFormat("a<int> >>= 1;", Style);
verifyFormat("test >> a >> b;");
verifyFormat("test << a >> b;");
OpenPOWER on IntegriCloud