From: <wsf...@us...> - 2011-02-19 17:11:11
|
Revision: 12484 http://swig.svn.sourceforge.net/swig/?rev=12484&view=rev Author: wsfulton Date: 2011-02-19 17:11:05 +0000 (Sat, 19 Feb 2011) Log Message: ----------- Modify octave exception checking test to take account of older (3.0) versions prefixing with 'error: ', but not in newer (3.2) versions Modified Paths: -------------- trunk/Examples/test-suite/octave/exception_order_runme.m Modified: trunk/Examples/test-suite/octave/exception_order_runme.m =================================================================== --- trunk/Examples/test-suite/octave/exception_order_runme.m 2011-02-19 17:07:03 UTC (rev 12483) +++ trunk/Examples/test-suite/octave/exception_order_runme.m 2011-02-19 17:11:05 UTC (rev 12484) @@ -2,8 +2,8 @@ function check_lasterror(expected) if (!strcmp(lasterror.message, expected)) - # Take account of older versions adding a newline at the end - if (!strcmp(regexprep(lasterror.message, '(.*)\n$', '$1'), expected)) + # Take account of older versions prefixing with "error: " and adding a newline at the end + if (!strcmp(regexprep(lasterror.message, 'error: (.*)\n$', '$1'), expected)) error(["Bad exception order. Expected: \"", expected, "\" Got: \"", lasterror.message, "\""]) endif endif @@ -14,29 +14,29 @@ try a.foo() catch - check_lasterror("error: C++ side threw an exception of type E1") + check_lasterror("C++ side threw an exception of type E1") end_try_catch try a.bar() catch - check_lasterror("error: C++ side threw an exception of type E2") + check_lasterror("C++ side threw an exception of type E2") end_try_catch try a.foobar() catch - check_lasterror("error: postcatch unknown (SWIG_RuntimeError)") + check_lasterror("postcatch unknown (SWIG_RuntimeError)") end_try_catch try a.barfoo(1) catch - check_lasterror("error: C++ side threw an exception of type E1") + check_lasterror("C++ side threw an exception of type E1") end_try_catch try a.barfoo(2) catch - check_lasterror("error: C++ side threw an exception of type E2 *") + check_lasterror("C++ side threw an exception of type E2 *") end_try_catch This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |