Add support for table-driven testing.
authorSam Spilsbury <smspillaz@gmail.com>
Fri, 13 Sep 2013 02:01:20 +0000 (10:01 +0800)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 13 Sep 2013 22:19:35 +0000 (15:19 -0700)
commitb502126e1943e7991fd54fe0190f80bb86264370
tree15bfb01b3f93d7a3085b18caefda2a01cda6efa3
parentdb0eda4abb0a10641a2cb6092e7e8eee9966d6cc
Add support for table-driven testing.

The new TEST_P macro takes a function name and a "data" argument to
point to an arbitrary array of known size of test data. This allows
multiple tests to be run with different datasets. The array is stored
as a void * but advanced by a known size on each iteration.

The data for each invocation of the test is provided as a "data" argument,
it is the responsibility of the test to cast it to something sensible.

Also fixed single-test running to only run the tests specified
tests/weston-test-runner.c
tests/weston-test-runner.h