summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-06-11 13:29:20 +0000
committerDaniel Jasper <djasper@google.com>2015-06-11 13:29:20 +0000
commit56691b8cb93c2d05c2679a8bf412a9913b3198dd (patch)
tree9e66f0b9c4d902f74a1664bc985b4da2cd0d0e8f /clang/unittests/Format/FormatTestJS.cpp
parentb6b58b315222aac2743ce99c7cc1f8a8a762c29c (diff)
downloadbcm5719-llvm-56691b8cb93c2d05c2679a8bf412a9913b3198dd.tar.gz
bcm5719-llvm-56691b8cb93c2d05c2679a8bf412a9913b3198dd.zip
clang-format: [JS] Ensure that formatting actually takes place in tests.
And fix formatting issue discovered by that :-). llvm-svn: 239530
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r--clang/unittests/Format/FormatTestJS.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 59dcc0889ac..d817b6c93e0 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -24,7 +24,10 @@ protected:
DEBUG(llvm::errs() << "---\n");
DEBUG(llvm::errs() << Code << "\n\n");
std::vector<tooling::Range> Ranges(1, tooling::Range(Offset, Length));
- tooling::Replacements Replaces = reformat(Style, Code, Ranges);
+ bool IncompleteFormat = false;
+ tooling::Replacements Replaces =
+ reformat(Style, Code, Ranges, "<stdin>", &IncompleteFormat);
+ EXPECT_FALSE(IncompleteFormat);
std::string Result = applyAllReplacements(Code, Replaces);
EXPECT_NE("", Result);
DEBUG(llvm::errs() << "\n" << Result << "\n\n");
OpenPOWER on IntegriCloud