From 26b2877caab91b6bdb4b3edfde18aeb338c0e5d0 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 29 Mar 2005 20:47:52 +0000 Subject: [PATCH] string reference test fixes git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7106 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- .../test-suite/java/director_string_runme.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/SWIG/Examples/test-suite/java/director_string_runme.java b/SWIG/Examples/test-suite/java/director_string_runme.java index 477ab2dc9..f553cdd84 100644 --- a/SWIG/Examples/test-suite/java/director_string_runme.java +++ b/SWIG/Examples/test-suite/java/director_string_runme.java @@ -16,8 +16,13 @@ public class director_string_runme { B b = new B("hello"); - b.get(0); - b.get_first(); + String s; + + s = b.call_get_first(); + if (!s.equals("B.get_first")) throw new RuntimeException("call_get_first() failed"); + + s = b.call_get(0); + if (!s.equals("B.get: hello")) throw new RuntimeException("get(0) failed"); } } @@ -26,11 +31,11 @@ class B extends A { super(first); } public String get_first() { - return get(0); + return "B.get_first"; } public String get(int n) { - return super.get(n); + return "B.get: " + super.get(n); } }