[llvm] r305519 - UnitTests: Replace some if(x)report_fatal_error() with EXPECT_TRUE(!x)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 15:57:16 PDT 2017


On Thu, Jun 15, 2017 at 3:52 PM Matthias Braun <mbraun at apple.com> wrote:

>
> > On Jun 15, 2017, at 3:46 PM, Matthias Braun via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
> >
> > Indeed. Unfortunately I am running into problems now as ASSERT_TRUE
> appears to expand into something ending in "return;" in the error case
> which only works in void functions. Still looking around what the correct
> gtest idiom is.
> I moved the one problematic ASSERTs into a void function.
>

Not sure how much that'd help though -it means the callers to the function
will continue running after the ASSERT fails, right? Unless it's moved up
to the top level TEST function.


>
> - Matthias
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170615/8228069d/attachment.html>


More information about the llvm-commits mailing list