summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
authorMartin Probst <martin@probst.io>2016-09-18 17:33:51 +0000
committerMartin Probst <martin@probst.io>2016-09-18 17:33:51 +0000
commitfbbe75b1fe7aa6d2678ba692d945f07fc335e611 (patch)
tree046c0d0e001a9e7d126cf45ab1d802697b19bbff /clang/unittests/Format/FormatTestJS.cpp
parentb9316ff84979e53260c1c3bcbfa0359a891ad1a9 (diff)
downloadbcm5719-llvm-fbbe75b1fe7aa6d2678ba692d945f07fc335e611.tar.gz
bcm5719-llvm-fbbe75b1fe7aa6d2678ba692d945f07fc335e611.zip
clang-format: [JS] Do not wrap taze annotation comments.
Summary: `// taze: ... from ...` comments are used help tools where a specific global symbol comes from. Before: // taze: many, different, symbols from // 'some_long_location_here' After: // taze: many, different, symbols from 'some_long_location_here' Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D24477 llvm-svn: 281857
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r--clang/unittests/Format/FormatTestJS.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index dd95462daf4..c19c054ec02 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -1444,5 +1444,11 @@ TEST_F(FormatTestJS, Conditional) {
"}");
}
+TEST_F(FormatTestJS, ImportComments) {
+ verifyFormat("import {x} from 'x'; // from some location",
+ getGoogleJSStyleWithColumns(25));
+ verifyFormat("// taze: x from 'location'", getGoogleJSStyleWithColumns(10));
+}
+
} // end namespace tooling
} // end namespace clang
OpenPOWER on IntegriCloud