Abstracted XML parser library and switched to autotools building.
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.
This commit is contained in:
16
tests/test.h
Normal file
16
tests/test.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#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__ */
|
||||
Reference in New Issue
Block a user