[PATCH] D25385: Make the FunctionComparator of the MergeFunctions pass a stand-alone utility in a separate file

Erik Eckstein via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 8 07:37:40 PST 2016


eeckstein added inline comments.


================
Comment at: unittests/Transforms/Utils/FunctionComparator.cpp:109
+
+/// A sanity check for the FunctionComparator API.
+TEST(FunctionComparatorTest, TestAPI) {
----------------
dberris wrote:
> Does this one test cover enough of the cases? I see one set of calls for the same function, without covering negative cases -- though I suspect since this is a refactoring that other tests ensure that this doing what is intended?
> 
> More concretely -- have you considered breaking up the big function API into smaller pieces that can be tested independently?
The main purpose of this unit test is to check the public API of FunctionComparator. I added this unit test because currently this API is used in an external project (the swift compiler). 

Testing the functionality is mainly done with the tests in test/Transforms/MergeFunc


https://reviews.llvm.org/D25385





More information about the llvm-commits mailing list