diff options
author | Daniel Jasper <djasper@google.com> | 2015-05-11 09:03:10 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-05-11 09:03:10 +0000 |
commit | 668c7bb34fba27525682888eb71fc1cdabc0ab96 (patch) | |
tree | 31bfb51565779b9ba882db4fa963471601d23ee7 /clang/unittests/Format/FormatTestJS.cpp | |
parent | 0a8416fdefb0d023b9b591b04de302d4dbb7c555 (diff) | |
download | bcm5719-llvm-668c7bb34fba27525682888eb71fc1cdabc0ab96.tar.gz bcm5719-llvm-668c7bb34fba27525682888eb71fc1cdabc0ab96.zip |
clang-format: [JS] Parse exported functions as free-standing.
Before:
export function foo() {} export function bar() {}
After:
export function foo() {
}
export function bar() {
}
llvm-svn: 236978
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestJS.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp index 7494bccea5e..41ffbedea74 100644 --- a/clang/unittests/Format/FormatTestJS.cpp +++ b/clang/unittests/Format/FormatTestJS.cpp @@ -600,6 +600,12 @@ TEST_F(FormatTestJS, Modules) { verifyFormat("export function fn() {\n" " return 'fn';\n" "}"); + verifyFormat("export function A() {\n" + "}\n" + "export default function B() {\n" + "}\n" + "export function C() {\n" + "}"); verifyFormat("export const x = 12;"); verifyFormat("export default class X {}"); verifyFormat("export {X, Y} from 'some/module.js';"); |