mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-07 22:40:27 +01:00
test: Make tests run in natural order
When tests are registered, they are prepended to a list. Reverting the list, we get a list whose order is the same as that of registration.
This commit is contained in:
parent
5500d072e0
commit
4e064b3a32
1 changed files with 13 additions and 0 deletions
|
|
@ -125,6 +125,18 @@ _log (cairo_test_context_t *ctx,
|
|||
va_end (ap);
|
||||
}
|
||||
|
||||
static void
|
||||
_tests_reverse ()
|
||||
{
|
||||
cairo_test_t *list, *next;
|
||||
|
||||
for (list = tests, tests = NULL; list != NULL; list = next) {
|
||||
next = list->next;
|
||||
list->next = tests;
|
||||
tests = list;
|
||||
}
|
||||
}
|
||||
|
||||
static cairo_test_list_t *
|
||||
_list_prepend (cairo_test_list_t *head, const cairo_test_t *test)
|
||||
{
|
||||
|
|
@ -705,6 +717,7 @@ main (int argc, char **argv)
|
|||
#endif
|
||||
|
||||
_cairo_test_runner_register_tests ();
|
||||
_tests_reverse ();
|
||||
|
||||
memset (&runner, 0, sizeof (runner));
|
||||
runner.num_device_offsets = 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue