summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/tools/clang/unittests/Format/FormatTestJava.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/llvm/tools/clang/unittests/Format/FormatTestJava.cpp')
-rw-r--r--gnu/llvm/tools/clang/unittests/Format/FormatTestJava.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/gnu/llvm/tools/clang/unittests/Format/FormatTestJava.cpp b/gnu/llvm/tools/clang/unittests/Format/FormatTestJava.cpp
index 8fadfc09b3e..dfc3debc46e 100644
--- a/gnu/llvm/tools/clang/unittests/Format/FormatTestJava.cpp
+++ b/gnu/llvm/tools/clang/unittests/Format/FormatTestJava.cpp
@@ -25,10 +25,10 @@ protected:
DEBUG(llvm::errs() << Code << "\n\n");
std::vector<tooling::Range> Ranges(1, tooling::Range(Offset, Length));
tooling::Replacements Replaces = reformat(Style, Code, Ranges);
- std::string Result = applyAllReplacements(Code, Replaces);
- EXPECT_NE("", Result);
- DEBUG(llvm::errs() << "\n" << Result << "\n\n");
- return Result;
+ auto Result = applyAllReplacements(Code, Replaces);
+ EXPECT_TRUE(static_cast<bool>(Result));
+ DEBUG(llvm::errs() << "\n" << *Result << "\n\n");
+ return *Result;
}
static std::string
@@ -312,6 +312,9 @@ TEST_F(FormatTestJava, Annotations) {
" String bbbbbbbbbbbbbbb) {}\n"
"}",
getStyleWithColumns(60));
+ verifyFormat("@Annotation(\"Some\"\n"
+ " + \" text\")\n"
+ "List<Integer> list;");
}
TEST_F(FormatTestJava, Generics) {