test.c 478 B

12345678910111213141516171819202122232425
  1. #include "test_term.c"
  2. #include "test_index.c"
  3. #include "test_graph.c"
  4. #include "test_keyset.c"
  5. int main(int argc, char **argv) {
  6. int result = (
  7. term_tests() | index_tests()
  8. | keyset_tests() | graph_tests());
  9. printf("Test result: %lu\n", (size_t)result);
  10. if (result != 0) {
  11. printf("Test failed.");
  12. }
  13. else {
  14. printf("ALL TESTS PASSED\n");
  15. }
  16. printf("Tests run: %d\n", tests_run);
  17. return result != 0;
  18. }