expat is still the default parser, but libxml2 can also be used via an option to the configure script. New parsers can easily be added by implementing a parser_foo.c that uses the interface defined in parser.h.
17 lines
427 B
C
17 lines
427 B
C
#ifndef __LIBSTROPHE_TEST_H__
|
|
#define __LIBSTROPHE_TEST_H__
|
|
|
|
#define TEST_MAIN \
|
|
int main(int argc, char **argv) {\
|
|
int num_failed;\
|
|
Suite *s = parser_suite();\
|
|
SRunner *sr = srunner_create(s);\
|
|
srunner_run_all(sr, CK_NORMAL);\
|
|
num_failed = srunner_ntests_failed(sr);\
|
|
srunner_free(sr);\
|
|
return (num_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;\
|
|
}\
|
|
|
|
|
|
#endif /* __LIBSTROPHE_TEST_H__ */
|