changeset 24240:939925a782e8

jit.tst: Comment out unit tests involving try/catch blocks * test/jit.tst: Comment out unit tests involving try/catch blocks.
author Julien Bect <jbect@users.sourceforge.net>
date Sat, 04 Nov 2017 22:13:03 +0100
parents 51e408a7d38f
children ca25f6e48ca5
files test/jit.tst
diffstat 1 files changed, 36 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/test/jit.tst	Sun Oct 15 21:08:02 2017 +0200
+++ b/test/jit.tst	Sat Nov 04 22:13:03 2017 +0100
@@ -18,6 +18,9 @@
 
 ## Author: Max Brister <max@2bass.com>
 
+## Note: unit tests involving try/catch blocks are currently disabled since
+##   the JIT in its current form is not compatible with exception handling.
+
 ## Turn on JIT and set defaults before running tests
 %!testif HAVE_LLVM
 %! global __old_jit_enable__;
@@ -95,6 +98,7 @@
 %! endparfor
 %! assert (i, 100);
 %! assert (jit_failcnt, 0);
+
 ## Test some switch statements
 %!testif HAVE_LLVM
 %! jit_failcnt (0);
@@ -240,22 +244,22 @@
 %! assert (sum (mat) == total);
 %! assert (jit_failcnt, 0);
 
-%!testif HAVE_LLVM
-%! jit_failcnt (0);
-%! nr = 1001;
-%! mat = [3 1 5];
-%! try
-%!   for i = 1:nr
-%!     if (i > 500)
-%!       result = mat(100);
-%!     else
-%!       result = i;
-%!     endif
-%!   endfor
-%! catch
-%! end_try_catch
-%! assert (result == 500);
-%! assert (jit_failcnt, 0);
+# %!testif HAVE_LLVM
+# %! jit_failcnt (0);
+# %! nr = 1001;
+# %! mat = [3 1 5];
+# %! try
+# %!   for i = 1:nr
+# %!     if (i > 500)
+# %!       result = mat(100);
+# %!     else
+# %!       result = i;
+# %!     endif
+# %!   endfor
+# %! catch
+# %! end_try_catch
+# %! assert (result == 500);
+# %! assert (jit_failcnt, 0);
 
 %!function result = gen_test (n)
 %!  result = double (rand (1, n) > .01);
@@ -385,14 +389,14 @@
 %! end_unwind_protect
 %!endfunction
 
-%!testif HAVE_LLVM
-%! jit_failcnt (0);
-%! lasterr ("");
-%! try
-%!   test_divide ();
-%! end_try_catch
-%! assert (strcmp (lasterr (), "division by zero"));
-%! assert (jit_failcnt, 0);
+# %!testif HAVE_LLVM
+# %! jit_failcnt (0);
+# %! lasterr ("");
+# %! try
+# %!   test_divide ();
+# %! end_try_catch
+# %! assert (strcmp (lasterr (), "division by zero"));
+# %! assert (jit_failcnt, 0);
 
 %!testif HAVE_LLVM
 %! jit_failcnt (0);
@@ -576,14 +580,14 @@
 %! assert (id (1, 2), 1);
 %! assert (jit_failcnt, 0);
 
-%!testif HAVE_LLVM
-%! jit_failcnt (0);
-%! lasterr ("");
-%! try
-%!   id ();
-%! end_try_catch
-%! assert (strncmp (lasterr (), "'x' undefined near", 18));
-%! assert (jit_failcnt, 0);
+# %!testif HAVE_LLVM
+# %! jit_failcnt (0);
+# %! lasterr ("");
+# %! try
+# %!   id ();
+# %! end_try_catch
+# %! assert (strncmp (lasterr (), "'x' undefined near", 18));
+# %! assert (jit_failcnt, 0);
 
 ## Restore JIT settings
 %!testif HAVE_LLVM