diff options
author | David Schleef <ds@schleef.org> | 2009-07-09 12:08:48 -0700 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2009-07-14 10:57:44 -0700 |
commit | 8dfa934ea278eecece7bbebe535695c6516fd03e (patch) | |
tree | 5222dc0cc0ab77b3ebdfd10d16296f2a26a6d171 /orc-test/orctest.c | |
parent | a659a2d1235a71cde62e08e7509f16801b7c7860 (diff) |
test: Add orc_test_compare_output_backup()
Diffstat (limited to 'orc-test/orctest.c')
-rw-r--r-- | orc-test/orctest.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/orc-test/orctest.c b/orc-test/orctest.c index f234ecf..1735171 100644 --- a/orc-test/orctest.c +++ b/orc-test/orctest.c @@ -331,9 +331,25 @@ check_bounds (void *ptr, int n, int size) return TRUE; } +static OrcTestResult orc_test_compare_output_full (OrcProgram *program, + int backup); + OrcTestResult orc_test_compare_output (OrcProgram *program) { + return orc_test_compare_output_full (program, 0); +} + +OrcTestResult +orc_test_compare_output_backup (OrcProgram *program) +{ + return orc_test_compare_output_full (program, 1); +} + + +OrcTestResult +orc_test_compare_output_full (OrcProgram *program, int backup) +{ OrcExecutor *ex; int n = 64 + (rand()&0xf); void *dest_exec[4] = { NULL, NULL, NULL, NULL }; @@ -348,9 +364,11 @@ orc_test_compare_output (OrcProgram *program) int acc_exec = 0, acc_emul = 0; int ret = ORC_TEST_OK; - result = orc_program_compile (program); - if (!ORC_COMPILE_RESULT_IS_SUCCESSFUL(result)) { - return ORC_TEST_INDETERMINATE; + if (!backup) { + result = orc_program_compile (program); + if (!ORC_COMPILE_RESULT_IS_SUCCESSFUL(result)) { + return ORC_TEST_INDETERMINATE; + } } ex = orc_executor_new (program); |