From a1165fe10623a9bb41cadee892c8dc55029d380d Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Fri, 23 Jul 2004 21:52:21 +0000 Subject: [PATCH] std::string throws typemaps test added git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6053 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/test-suite/java/lib_std_string_runme.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Examples/test-suite/java/lib_std_string_runme.java b/Examples/test-suite/java/lib_std_string_runme.java index 8d09c9be7..3f222a61a 100644 --- a/Examples/test-suite/java/lib_std_string_runme.java +++ b/Examples/test-suite/java/lib_std_string_runme.java @@ -11,7 +11,7 @@ public class lib_std_string_runme { } } - public static void main(String argv[]) + public static void main(String argv[]) throws Throwable { // Checking expected use of %typemap(in) std::string {} lib_std_string.test_value("Fee"); @@ -61,5 +61,16 @@ public class lib_std_string_runme { lib_std_string.test_reference(stringPtr); + // Check throw exception specification + try { + lib_std_string.test_throw(); + throw new Throwable("Test 5 failed"); + } catch (RuntimeException e) { + } + try { + lib_std_string.test_const_reference_throw(); + throw new Throwable("Test 6 failed"); + } catch (RuntimeException e) { + } } }