aboutsummaryrefslogtreecommitdiffstats
path: root/tests/array-test.c
Commit message (Collapse)AuthorAgeFilesLines
* Avoid pointer arithmetic on `void *`Michael Forney2019-06-051-5/+3
| | | | | | | | The pointer operand to the binary `+` operator must be to a complete object type. Since we are working with byte sizes, use `char *` for arithmetic instead. Signed-off-by: Michael Forney <mforney@mforney.org>
* array-test: Include wayland-util.h and simplify init testYong Bakos2016-10-181-11/+9
| | | | | | | | | | | | | Include wayland-util.h in addition to wayland-private.h, to be more explicit about where wl_array is defined. Remove the useless repeated testing of wl_array_init, because if it fails once out of thousands of iterations we're all doomed anyway. Signed-off-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> [Pekka: add the memset] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* tests: Test wl_array_releaseYong Bakos2016-10-181-0/+14
| | | | | | | | | | array-test.c did not cover wl_array_release, so add one test that specifically tests this method. Signed-off-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> [Pekka: do not overwrite array.data] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* tests: Don't increment variables inside an assert()Bryce Harrington2015-07-101-3/+6
| | | | | | | | | Addresses this warning found by Denis Denisov: [tests/array-test.c:137]: (warning) Assert statement modifies 'i'. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
* tests: Update boilerplate from MIT X11 license to MIT Expat licenseBryce Harrington2015-06-121-16/+19
| | | | | Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* array-test: assert wl_array_add result is not NULLU. Artie Eoff2014-01-151-0/+3
| | | | Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
* tests: fix make check for out-of-tree buildsDylan Noblesmith2012-06-301-1/+1
| | | | | | | | | | It was failing with missing include files. While here, destroy the ugly "../src/..." include paths used in the tests that was just hacking around this problem in the Makefile: sed -i s/..\\/src\\/// tests/*.c
* tests: Fix signedness warningsKristian Høgsberg2012-04-131-6/+6
|
* Add simple memory leak check to all tests.U. Artie Eoff2012-03-241-0/+2
| | | | | | | | | Wrap all tests with a memory balance check to detect potential memory leaks. Fixed a few tests that had memory leaks contained in the tests themselves. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
* Add wl_array_for_eachKristian Høgsberg2012-03-041-0/+18
|
* tests: Add Unit tests for wl_map and wl_array data structuresKristian Høgsberg2012-03-021-0/+118
We use a simple test-runner helper that runs each test in a separate process and reports the pass/fail rate at the end.