This is an archive of the discontinued LLVM Phabricator instance.

[Coverage] Update testing methods to support more than two files.
ClosedPublic

Authored by ikudrin on Apr 4 2016, 8:16 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

ikudrin updated this revision to Diff 52559.Apr 4 2016, 8:16 AM
ikudrin retitled this revision from to [Coverage] Update testing methods to support more than two files..
ikudrin updated this object.
ikudrin added reviewers: bogner, davidxl, vsk.
ikudrin added a subscriber: llvm-commits.
vsk edited edge metadata.Apr 6 2016, 9:57 AM

Thanks! Lgtm with a few nits.

llvm/trunk/unittests/ProfileData/CoverageMappingTest.cpp
207

ISTM that these asserts could be tightened, e.g ASSERT_EQ(I, OutputCMRs[I].FileID).

209

Is there a reason to prefer OutputCMRs[I].LineStart over OutputCMRs[I].FileID on this line?

231

I think this would be easier to read as EXPECT_TRUE(!Data.empty()).

ikudrin added inline comments.Apr 7 2016, 8:22 AM
llvm/trunk/unittests/ProfileData/CoverageMappingTest.cpp
207

IMHO the test shouldn't be more tighter than necessary. This test only checks that all regions are bound to the correct files and not intended to check the exact order of loaded regions as regions could be rearranged by writer.

209

The same as above, the test shouldn't rely on any specific sorting order of regions.

231

You are right, I'll change it.

vsk added a comment.Apr 7 2016, 12:51 PM

Thanks, lgtm with the one nit.

llvm/trunk/unittests/ProfileData/CoverageMappingTest.cpp
209

I see.

This revision was automatically updated to reflect the committed changes.