[PATCH] D87374: [SyntaxTree] Specialize `TreeTestBase` for `BuildTreeTest` and `MutationsTest`
Dmitri Gribenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 10 01:50:15 PDT 2020
gribozavr2 accepted this revision.
gribozavr2 added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang/unittests/Tooling/Syntax/MutationsTest.cpp:48
+
+TEST_P(MutationTest, Mutations) {
+ if (!GetParam().isCXX11OrLater()) {
----------------
================
Comment at: clang/unittests/Tooling/Syntax/MutationsTest.cpp:70
"void test() { if (true) ; else {} }"},
{"void test() { [[;]] }", "void test() { }"}};
for (const auto &C : Cases)
----------------
Could we split it into multiple test cases?
```
TEST_P(MutationTest, RemoveStatement_BinaryExpression) {
CheckTransformation(
RemoveStatement,
"void test() { [[100+100;]] test(); }",
"void test() { test(); }");
}
```
Also consider moving the std::function argument in CheckTransformation to the first position for readability of the call.
================
Comment at: clang/unittests/Tooling/Syntax/SynthesisTest.cpp:1-2
+
+//===- MutationsTest.cpp --------------------------------------------------===//
+//
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87374/new/
https://reviews.llvm.org/D87374
More information about the cfe-commits
mailing list