projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a16fe1
)
clang-format: [JS] test case for numeric separators.
author
Martin Probst
<martin@probst.io>
Fri, 3 Dec 2021 10:20:56 +0000
(11:20 +0100)
committer
Martin Probst
<martin@probst.io>
Mon, 6 Dec 2021 18:01:24 +0000
(19:01 +0100)
ES2021 allows numeric literals using `_` as a separator. This already
works, but had no test.
Differential Revision: https://reviews.llvm.org/D115147
clang/unittests/Format/FormatTestJS.cpp
patch
|
blob
|
history
diff --git
a/clang/unittests/Format/FormatTestJS.cpp
b/clang/unittests/Format/FormatTestJS.cpp
index
0c8329d
..
069b7b1
100644
(file)
--- a/
clang/unittests/Format/FormatTestJS.cpp
+++ b/
clang/unittests/Format/FormatTestJS.cpp
@@
-2692,5
+2692,9
@@
TEST_F(FormatTestJS, NoBreakAfterAsserts) {
"}\n");
}
+TEST_F(FormatTestJS, NumericSeparators) {
+ verifyFormat("x = 1_000_000 + 12;", "x = 1_000_000 + 12;");
+}
+
} // namespace format
} // end namespace clang