(root)/
gcc-13.2.0/
gcc/
testsuite/
jit.dg/
test-combination.c
       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  
       5  #include "all-non-failing-tests.h"
       6  
       7  /* Now construct a test case from all the other test cases.
       8  
       9     We undefine COMBINED_TEST so that we can now include harness.h
      10     "for real".  */
      11  #undef COMBINED_TEST
      12  #include "harness.h"
      13  
      14  /* Our testing hooks are the combination of the other test cases.  */
      15  void
      16  create_code (gcc_jit_context *ctxt, void * user_data)
      17  {
      18    for (int i = 0; i < num_testcases; i++)
      19      testcases[i].m_hook_to_create_code (ctxt, user_data);
      20  }
      21  
      22  void
      23  verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
      24  {
      25    for (int i = 0; i < num_testcases; i++)
      26      testcases[i].m_hook_to_verify_code (ctxt, result);
      27  }