Adds some more tests for * and &.

While reviewing r172303 I noticed that I wasn't sure whether we still
format those correctly and didn't see any tests.

llvm-svn: 172396
This commit is contained in:
Manuel Klimek 2013-01-14 10:58:01 +00:00
parent 4ebb4e5565
commit 557811fe6c
1 changed files with 6 additions and 0 deletions

View File

@ -1074,6 +1074,12 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) {
verifyGoogleFormat("A<int**, int**> a;");
verifyGoogleFormat("f(b ? *c : *d);");
verifyGoogleFormat("int a = b ? *c : *d;");
verifyFormat("a = *(x + y);");
verifyFormat("a = &(x + y);");
verifyFormat("*(x + y).call();");
verifyFormat("&(x + y)->call();");
verifyFormat("&(*I).first");
}
TEST_F(FormatTest, FormatsCasts) {