diff options
| author | U. Artie Eoff <ullysses.a.eoff@intel.com> | 2014-01-10 12:17:24 -0800 |
|---|---|---|
| committer | Kristian Høgsberg <krh@bitplanet.net> | 2014-01-15 10:46:08 -0800 |
| commit | fcf5f06b7d335d9811dddab6572ba495f74c5838 (patch) | |
| tree | b865a0bbfa8c23b14a671bbd099a3a2dc2ee6b67 /tests/array-test.c | |
| parent | shm: assert sigbus_data is not NULL before member access (diff) | |
| download | wayland-fcf5f06b7d335d9811dddab6572ba495f74c5838.tar wayland-fcf5f06b7d335d9811dddab6572ba495f74c5838.tar.gz wayland-fcf5f06b7d335d9811dddab6572ba495f74c5838.tar.bz2 wayland-fcf5f06b7d335d9811dddab6572ba495f74c5838.tar.lz wayland-fcf5f06b7d335d9811dddab6572ba495f74c5838.tar.xz wayland-fcf5f06b7d335d9811dddab6572ba495f74c5838.tar.zst wayland-fcf5f06b7d335d9811dddab6572ba495f74c5838.zip | |
array-test: assert wl_array_add result is not NULL
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Diffstat (limited to 'tests/array-test.c')
| -rw-r--r-- | tests/array-test.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/array-test.c b/tests/array-test.c index 7639878..c457e42 100644 --- a/tests/array-test.c +++ b/tests/array-test.c @@ -61,6 +61,7 @@ TEST(array_add) /* add some data */ for (i = 0; i < iterations; i++) { struct mydata* ptr = wl_array_add(&array, datasize); + assert(ptr); assert((i + 1) * datasize == array.size); ptr->a = i * 3; @@ -95,6 +96,7 @@ TEST(array_copy) /* add some data */ for (i = 0; i < iterations; i++) { int *p = wl_array_add(&source, sizeof(int)); + assert(p); *p = i * 2 + i; } @@ -126,6 +128,7 @@ TEST(array_for_each) wl_array_init(&array); for (i = 0; i < 5; i++) { p = wl_array_add(&array, sizeof *p); + assert(p); *p = elements[i]; } |
