diff options
author | Wim Taymans <wtaymans@redhat.com> | 2015-08-12 13:16:28 +0200 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2015-08-12 13:16:28 +0200 |
commit | f10bacc5f2c90c1cdfaf0f5550db46c4966501ac (patch) | |
tree | a9423043ca0f67092ec8fd4221f72ab89eab6d33 /testsuite | |
parent | bbf71470f817b26bd57e69803e20afec942efe54 (diff) | |
download | orc-f10bacc5f2c90c1cdfaf0f5550db46c4966501ac.tar.gz |
test-limits: improve test without target
When there is no target available, the unit test would fail with a
non-fatal error (because emulation would be done). The non-fatal error
would however not be overwritten by the real error when we exceed the
limits.
First relax the first compilation test to check for FATAL errors. Then
reset the program (and clear any non-fatal errors) before triggering
the next error.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/test-limits.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/testsuite/test-limits.c b/testsuite/test-limits.c index ed19d8a..0e43924 100644 --- a/testsuite/test-limits.c +++ b/testsuite/test-limits.c @@ -35,9 +35,11 @@ test_simple (int max, int (*adder) (OrcProgram *, int, const char *)) for (v = 0; v < max; v++) (*adder) (p, 2, names + v); result = orc_program_compile (p); - if (!ORC_COMPILE_RESULT_IS_SUCCESSFUL (result)) + if (ORC_COMPILE_RESULT_IS_FATAL (result)) error = TRUE; + orc_program_reset (p); + /* Check we can not add one more */ (*adder) (p, 2, names + v); result = orc_program_compile (p); |