[LLVMdev] Any objections to my importing GoogleMock to go with GoogleTest in LLVM?

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Nov 15 07:06:00 PST 2013


> This is probably most like #1, but i would either improve (or add a verbose
> option to) -debug-pass=Structure.  Then just write a test which calls opt
> with some passes and uses FileCheck to verify the debug output.
>
> This is nice as it means that if anyone ever wants to verify for performance
> reasons that a given test invalidates a very specific set of passes and
> never regresses from that set then they can use FileCheck for this.

+1

My point on IRC was that I consider gtest a necessary evil since it
lets us test properties like "DenseMap releases memory after a series
of insertions and deletions".  To test that with FileCheck we would
need to make the test brittle (by setting a program wide memory limit
for example) or add dumping to DenseMap just to write the test.

On the example you have it looks like the extra logging would be a
nice debugging tool for finding when/why something is being recomputed
and not specific to the testcase at all.

Cheers,
Rafael



More information about the llvm-dev mailing list