Wapcaplet
Loading...
Searching...
No Matches
testmain.c
Go to the documentation of this file.
1/* test/testmain.c
2 *
3 * Core of the test suite for libwapcaplet
4 *
5 * Copyright 2009 The NetSurf Browser Project
6 * Daniel Silverstone <dsilvers@netsurf-browser.org>
7 */
8
9#include <check.h>
10#include <stdlib.h>
11
12#include "tests.h"
13
14#ifndef UNUSED
15#define UNUSED(x) ((x) = (x))
16#endif
17
18/* This means that assertion failures are silent in tests */
19#ifndef NDEBUG
20void __assert_fail(const char *__assertion, const char *__file,
21 unsigned int __line, const char *__function) {
22 (void)__assertion;
23 (void)__file;
24 (void)__line;
25 (void)__function;
26 abort();
27}
28#endif
29
30int
31main(int argc, char **argv)
32{
33 int number_failed = 0;
34 SRunner *sr;
35
36 UNUSED(argc);
37 UNUSED(argv);
38
39 sr = srunner_create(suite_create("Test suite for libwapcaplet"));
40
42// lwc_memory_suite(sr);
43
44 srunner_set_fork_status(sr, CK_FORK);
45 srunner_run_all(sr, CK_ENV);
46 number_failed = srunner_ntests_failed(sr);
47
48 srunner_free(sr);
49
50 return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
51}
END_TEST void lwc_basic_suite(SRunner *sr)
Definition basictests.c:405
int main(int argc, char **argv)
Definition testmain.c:31
void __assert_fail(const char *__assertion, const char *__file, unsigned int __line, const char *__function)
Definition testmain.c:20
#define UNUSED(x)
Definition testmain.c:15