check_startup.c 662 B

1234567891011121314151617181920212223242526272829303132333435
  1. #include "ua_application.h"
  2. #include "check.h"
  3. START_TEST(testAppMockup) {
  4. appMockup_init();
  5. }
  6. END_TEST
  7. Suite *testSuite_builtin(void) {
  8. Suite *s = suite_create("Test server startup");
  9. TCase *tc_ns0 = tcase_create("initialise namespace 0");
  10. tcase_add_test(tc_ns0, testAppMockup);
  11. suite_add_tcase(s, tc_ns0);
  12. return s;
  13. }
  14. int main(void) {
  15. int number_failed = 0;
  16. Suite *s;
  17. SRunner *sr;
  18. s = testSuite_builtin();
  19. sr = srunner_create(s);
  20. //srunner_set_fork_status(sr, CK_NOFORK);
  21. srunner_run_all(sr, CK_NORMAL);
  22. number_failed += srunner_ntests_failed(sr);
  23. srunner_free(sr);
  24. return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
  25. }