<div dir="ltr"><div><div><div>Hi,<br><br></div>yes, this is normal in tests - the fact is that without assert the tests won't compile anyway, as Otto wrote, so the asserts are always present there.<br><br></div>This patch is:<br></div>Reviewed-by: Marek Chalupa <<a href="mailto:mchqwerty@gmail.com">mchqwerty@gmail.com</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 29 September 2014 08:09, Karsten Otto <span dir="ltr"><<a href="mailto:karsten.otto@posteo.de" target="_blank">karsten.otto@posteo.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Indeed, I just followed the lead of the other tests, which use assert exactly like this. I think what makes it OK are these lines in test-runner.h:<br>
<br>
#ifdef NDEBUG<br>
#error "Tests must not be built with NDEBUG defined, they rely on assert()."<br>
#endif<br>
<br>
Cheers, Karsten<br>
<br>
Am 29.09.2014 um 05:48 schrieb Dima Ryazanov <<a href="mailto:dima@gmail.com">dima@gmail.com</a>>:<br>
<div class="HOEnZb"><div class="h5"><br>
> I've brought this up once, but looks like it's acceptable in the test suite since it already relies on asserts:<br>
> <a href="http://lists.freedesktop.org/archives/wayland-devel/2013-February/007454.html" target="_blank">http://lists.freedesktop.org/archives/wayland-devel/2013-February/007454.html</a><br>
><br>
> On Sep 28, 2014 6:57 PM, "Bill Spitzak" <<a href="mailto:spitzak@gmail.com">spitzak@gmail.com</a>> wrote:<br>
> On 09/28/2014 11:49 AM, Karsten Otto wrote:<br>
><br>
> -       wl_display_roundtrip(display);<br>
> +       assert(wl_display_roundtrip(display) != -1);<br>
><br>
> You can't put code that you require to run in an assert.<br>
><br>
> _______________________________________________<br>
> wayland-devel mailing list<br>
> <a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
> _______________________________________________<br>
> wayland-devel mailing list<br>
> <a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
<br>
_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</div></div></blockquote></div><br></div>