ioeric added inline comments. ================ Comment at: unittests/Format/CleanupTest.cpp:125 @@ -123,7 +124,3 @@ std::string Expected = "class A {\nA() {} };"; - std::vector<tooling::Range> Ranges; - Ranges.push_back(tooling::Range(17, 0)); - Ranges.push_back(tooling::Range(19, 0)); - std::string Result = cleanup(Code, Ranges); - EXPECT_EQ(Expected, Result); + EXPECT_EQ(Expected, cleanupAroundOffsets({17, 19}, Code)); ---------------- djasper wrote: > I think for such short test cases, at least, I'd just inline the string > literals, e.g.: > > EXPECT_EQ("class A {\nA() {} };", > cleanupAroundOffsets({17, 19}, "class A {\nA() : , {} };")); > > But not sure whether it's better. I prefer defining variables since it is easier to read/compare and also consistent with other test cases.
https://reviews.llvm.org/D24501 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits