[PATCH] D33059: Create an shared include directory for gtest helper functions

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 12 19:11:27 PDT 2017


zturner added a comment.

In https://reviews.llvm.org/D33059#778618, @MatzeB wrote:

> In https://reviews.llvm.org/D33059#778617, @zturner wrote:
>
> > In https://reviews.llvm.org/D33059#778601, @MatzeB wrote:
> >
> > > about the directories: 'meh'. I'm fine with whatever works.
> > >
> > > - Why is a patch that claims to create a shared include directory actually changing so many unit tests?
> >
> >
> > I felt like we needed a motivating example of why this effort is useful.  The error macros were copy/pasted amongst many different files, so it was the perfect candidate.
>
>
> So this doesn't really seem to be a "motivating" example that shows how gmock makes life simpler. But again I'm 'meh' here, I think we already decided to use gmock and I assume you guys have examples where it actually improves the experience.


I'm not talking about gmock, I'm talking about a motivating example of why having a shared include directory is useful.  That aside, I definitely think gmock improves the experience here.  If you write `EXPECT_THAT_ERROR(foo(), succeeded())` and it doesn't succeed, it will show you the error message that it failed with.   Same thing with the `Expected` case.


https://reviews.llvm.org/D33059





More information about the llvm-commits mailing list