diff options
author | Daniel Jasper <djasper@google.com> | 2014-11-27 14:46:03 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2014-11-27 14:46:03 +0000 |
commit | 53c38f4e79ae1369a5c7c96384fd38f452bddc98 (patch) | |
tree | 65ec09240bb00119bdd02686479ca0d961eb1dc8 /clang/unittests/Format/FormatTestJS.cpp | |
parent | aa2b9278fea3917996b3fd9a14937b869903712b (diff) | |
download | bcm5719-llvm-53c38f4e79ae1369a5c7c96384fd38f452bddc98.tar.gz bcm5719-llvm-53c38f4e79ae1369a5c7c96384fd38f452bddc98.zip |
clang-format: [JS] Make Closure module detection more narrow.
Before:
var MyLongClassName = goog.module.get('my.long.module.name.followedBy.MyLongClassName');
After:
var MyLongClassName =
goog.module.get('my.long.module.name.followedBy.MyLongClassName');
llvm-svn: 222888
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestJS.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp index b0733bdd25c..3e781c94d05 100644 --- a/clang/unittests/Format/FormatTestJS.cpp +++ b/clang/unittests/Format/FormatTestJS.cpp @@ -167,6 +167,11 @@ TEST_F(FormatTestJS, GoogModules) { getGoogleJSStyleWithColumns(40)); verifyFormat("var long = goog.require('this.is.really.absurdly.long');", getGoogleJSStyleWithColumns(40)); + + // These should be wrapped normally. + verifyFormat( + "var MyLongClassName =\n" + " goog.module.get('my.long.module.name.followedBy.MyLongClassName');"); } TEST_F(FormatTestJS, FormatsFreestandingFunctions) { |