[PATCH] D69972: clang-format: [JS] test declared fields.
Martin Probst via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 7 14:55:02 PST 2019
mprobst created this revision.
mprobst added a reviewer: krasimir.
Herald added a project: clang.
TypeScript now supports declaring fields:
class Foo {
declare field: string;
}
clang-format happens to already format this fine, so this change just
adds a regression test.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D69972
Files:
clang/unittests/Format/FormatTestJS.cpp
Index: clang/unittests/Format/FormatTestJS.cpp
===================================================================
--- clang/unittests/Format/FormatTestJS.cpp
+++ clang/unittests/Format/FormatTestJS.cpp
@@ -2359,5 +2359,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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69972.228319.patch
Type: text/x-patch
Size: 537 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191107/097ab8b7/attachment-0001.bin>
More information about the cfe-commits
mailing list