test-combination.c 816 B

12345678910111213141516171819202122232425262728
  1. /* Construct a test case by combining other test cases, to try to shake
  2. out state issues: all of the test cases are run in one process, inside
  3. one gcc_jit_context (per iteration). */
  4. #include "all-non-failing-tests.h"
  5. /* Now construct a test case from all the other test cases.
  6. We undefine COMBINED_TEST so that we can now include harness.h
  7. "for real". */
  8. #undef COMBINED_TEST
  9. #include "harness.h"
  10. /* Our testing hooks are the combination of the other test cases. */
  11. void
  12. create_code (gcc_jit_context *ctxt, void * user_data)
  13. {
  14. for (int i = 0; i < num_testcases; i++)
  15. testcases[i].m_hook_to_create_code (ctxt, user_data);
  16. }
  17. void
  18. verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
  19. {
  20. for (int i = 0; i < num_testcases; i++)
  21. testcases[i].m_hook_to_verify_code (ctxt, result);
  22. }