clang-format: [JS] test case for numeric separators.
ES2021 allows numeric literals using `_` as a separator. This already
works, but had no test.
Differential Revision: https://reviews.llvm.org/D115147
GitOrigin-RevId: 327d966365d7b34abd25a920e1f7b5aecfa5c70f
diff --git a/unittests/Format/FormatTestJS.cpp b/unittests/Format/FormatTestJS.cpp
index 0c8329d..069b7b1 100644
--- a/unittests/Format/FormatTestJS.cpp
+++ b/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