[PATCH 3/4] queue-test: Add another assertion

Karsten Otto karsten.otto at posteo.de
Sun Sep 28 23:09:56 PDT 2014


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:

#ifdef NDEBUG
#error "Tests must not be built with NDEBUG defined, they rely on assert()."
#endif

Cheers, Karsten

Am 29.09.2014 um 05:48 schrieb Dima Ryazanov <dima at gmail.com>:

> I've brought this up once, but looks like it's acceptable in the test suite since it already relies on asserts:
> http://lists.freedesktop.org/archives/wayland-devel/2013-February/007454.html
> 
> On Sep 28, 2014 6:57 PM, "Bill Spitzak" <spitzak at gmail.com> wrote:
> On 09/28/2014 11:49 AM, Karsten Otto wrote:
> 
> -       wl_display_roundtrip(display);
> +       assert(wl_display_roundtrip(display) != -1);
> 
> You can't put code that you require to run in an assert.
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel



More information about the wayland-devel mailing list