Committed to branch dmalcolm/jit: gcc/testsuite/ * jit.dg/harness.h (test_jit): Move the various calls to set up options on the context into... (set_options): ...this new function. --- gcc/testsuite/ChangeLog.jit | 6 ++++++ gcc/testsuite/jit.dg/harness.h | 23 ++++++++++++++--------- 2 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/gcc/testsuite/ChangeLog.jit b/gcc/testsuite/ChangeLog.jit index 461c067..b150796 100644 --- a/gcc/testsuite/ChangeLog.jit +++ b/gcc/testsuite/ChangeLog.jit @@ -1,3 +1,9 @@ +2014-01-28 David Malcolm <dmalc...@redhat.com> + + * jit.dg/harness.h (test_jit): Move the various calls to set up + options on the context into... + (set_options): ...this new function. + 2014-01-27 David Malcolm <dmalc...@redhat.com> * jit.dg/test-error-call-with-not-enough-args.c: New test case. diff --git a/gcc/testsuite/jit.dg/harness.h b/gcc/testsuite/jit.dg/harness.h index c9b8a3d..71a5fcf 100644 --- a/gcc/testsuite/jit.dg/harness.h +++ b/gcc/testsuite/jit.dg/harness.h @@ -91,16 +91,8 @@ void check_string_value (const char *actual, const char *expected) pass ("%s: actual: NULL == expected: NULL"); } -/* Run one iteration of the test. */ -static void -test_jit (const char *argv0, void *user_data) +static void set_options (gcc_jit_context *ctxt, const char *argv0) { - gcc_jit_context *ctxt; - gcc_jit_result *result; - - ctxt = gcc_jit_context_acquire (); - /* FIXME: error-handling */ - /* Set up options. */ gcc_jit_context_set_str_option ( ctxt, @@ -130,6 +122,19 @@ test_jit (const char *argv0, void *user_data) ctxt, GCC_JIT_BOOL_OPTION_DUMP_SUMMARY, 1); +} + +/* Run one iteration of the test. */ +static void +test_jit (const char *argv0, void *user_data) +{ + gcc_jit_context *ctxt; + gcc_jit_result *result; + + ctxt = gcc_jit_context_acquire (); + /* FIXME: error-handling */ + + set_options (ctxt, argv0); create_code (ctxt, user_data); -- 1.7.11.7