string reference test fixes

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7106 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-03-29 20:47:52 +00:00
commit 4cff098887

View file

@ -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);
}
}