diff options
author | Daniel Jasper <djasper@google.com> | 2013-02-14 08:42:54 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-02-14 08:42:54 +0000 |
commit | 6cabab48dacc1317821f8f078ed2d4c603b67aff (patch) | |
tree | 843d403dc69a7904e2403a8dcd487dd940d959b4 /unittests/Format/FormatTest.cpp | |
parent | b9316b3829372c71f2f54d54a9748285f7ffe3fd (diff) |
Align superclasses for multiple inheritence.
This fixes llvm.org/PR15179.
Before:
class ColorChooserMac : public content::ColorChooser,
public content::WebContentsObserver {
};
After:
class ColorChooserMac : public content::ColorChooser,
public content::WebContentsObserver {
};
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175147 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index f72aad7aad..b30e0deb56 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -584,6 +584,25 @@ TEST_F(FormatTest, UnderstandsAccessSpecifiers) { TEST_F(FormatTest, FormatsDerivedClass) { verifyFormat("class A : public B {\n};"); verifyFormat("class A : public ::B {\n};"); + + verifyFormat( + "class AAAAAAAAAAAAAAAAAAAA : public BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB,\n" + " public CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC {\n" + "};\n"); + verifyFormat("class AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA :\n" + " public BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB,\n" + " public CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC {\n" + "};\n"); + verifyFormat( + "class A : public B, public C, public D, public E, public F, public G {\n" + "};"); + verifyFormat("class AAAAAAAAAAAA : public B,\n" + " public C,\n" + " public D,\n" + " public E,\n" + " public F,\n" + " public G {\n" + "};"); } TEST_F(FormatTest, FormatsVariableDeclarationsAfterStructOrClass) { @@ -1018,6 +1037,9 @@ TEST_F(FormatTest, PreventConfusingIndents) { " ddd);"); } +TEST_F(FormatTest, Inheritance) { +} + TEST_F(FormatTest, ConstructorInitializers) { verifyFormat("Constructor() : Initializer(FitsOnTheLine) {}"); verifyFormat("Constructor() : Inttializer(FitsOnTheLine) {}", |