[PATCH] D115147: clang-format: [JS] test case for numeric separators.
Martin Probst via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 6 05:18:36 PST 2021
mprobst created this revision.
mprobst added a reviewer: krasimir.
mprobst requested review of this revision.
Herald added a project: clang.
ES2021 allows numeric literals using `_` as a separator. This already
works, but had no test.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D115147
Files:
clang/unittests/Format/FormatTestJS.cpp
Index: clang/unittests/Format/FormatTestJS.cpp
===================================================================
--- clang/unittests/Format/FormatTestJS.cpp
+++ clang/unittests/Format/FormatTestJS.cpp
@@ -2692,5 +2692,9 @@
"}\n");
}
+TEST_F(FormatTestJS, NumericSeparators) {
+ verifyFormat("x = 1_000_000 + 12;", "x = 1_000_000 + 12;");
+}
+
} // namespace format
} // end namespace clang
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115147.392030.patch
Type: text/x-patch
Size: 407 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211206/515b136f/attachment.bin>
More information about the cfe-commits
mailing list