diff options
Diffstat (limited to 'clang/unittests/Format/FormatTestJava.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestJava.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJava.cpp b/clang/unittests/Format/FormatTestJava.cpp index 126b163..96dda9b 100644 --- a/clang/unittests/Format/FormatTestJava.cpp +++ b/clang/unittests/Format/FormatTestJava.cpp @@ -79,6 +79,19 @@ TEST_F(FormatTestJava, ClassDeclarations) { getStyleWithColumns(40)); } +TEST_F(FormatTestJava, EnumDeclarations) { + verifyFormat("enum SomeThing { ABC, CDE }"); + verifyFormat("enum SomeThing {\n" + " ABC,\n" + " CDE,\n" + "}"); + verifyFormat("public class SomeClass {\n" + " enum SomeThing { ABC, CDE }\n" + " void f() {\n" + " }\n" + "}"); +} + TEST_F(FormatTestJava, ThrowsDeclarations) { verifyFormat("public void doSooooooooooooooooooooooooooomething()\n" " throws LooooooooooooooooooooooooooooongException {\n}"); |