diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp --- a/clang/unittests/Format/FormatTestJS.cpp +++ b/clang/unittests/Format/FormatTestJS.cpp @@ -2369,5 +2369,12 @@ " static #staticPrivateMethod() {}\n"); } +TEST_F(FormatTestJS, DeclaredFields) { + verifyFormat("class Example {\n" + " declare pub: string;\n" + " declare private priv: string;\n" + "}\n"); +} + } // namespace format } // end namespace clang