[PATCH] D30813: [clang-rename] Introduce an unittest skeleton for clang-rename.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 10 02:41:27 PST 2017


hokein marked an inline comment as done.
hokein added inline comments.


================
Comment at: unittests/clang-rename/ClangRenameTests.cpp:91
+        "#include \"%s\"\n%s", HeaderName.c_str(), Expected.str().c_str());
+    EXPECT_EQ(format(ExpectedCode), format(Actual));
+  }
----------------
ioeric wrote:
> I'd put EXPECT_EQ in test cases so that it would be easier to see which case fails. Maybe pull out a function for wrapping `Expected` and EXPECT_EQ on the formatted result and `format(Actual)`?
I don't see a strong benefit of it. As our test cases are generated by `INSTANTIATE_TEST_CASE_P`, pulling out this function doesn't make the failure output much clearer; this will also save us some keystrokes. I'd keep it at the moment. 


https://reviews.llvm.org/D30813





More information about the cfe-commits mailing list