Add premature garbage collection prevention parameter test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9487 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
2cf3de20ce
commit
4f26898a12
2 changed files with 35 additions and 1 deletions
|
|
@ -50,7 +50,6 @@ public class java_typemaps_proxy_runme {
|
|||
|
||||
// Check the %javamethodmodifiers feature
|
||||
try {
|
||||
|
||||
Method methodmodifiertest = nullFarewell.getClass().getDeclaredMethod("methodmodifiertest", (java.lang.Class[])null);
|
||||
if ( !Modifier.isPrivate(methodmodifiertest.getModifiers()) )
|
||||
throw new RuntimeException("NS::Farewell::methodmodifiertest not private" );
|
||||
|
|
@ -60,6 +59,23 @@ public class java_typemaps_proxy_runme {
|
|||
} catch (SecurityException s) {
|
||||
throw new RuntimeException("SecurityException caught. Test failed.");
|
||||
}
|
||||
|
||||
// Check the premature garbage collection prevention parameter
|
||||
// Check it is normally present
|
||||
long nullPtr = 0;
|
||||
With with = new With(null);
|
||||
java_typemaps_proxyJNI.new_With(nullPtr, with);
|
||||
java_typemaps_proxyJNI.With_static_method(nullPtr, with);
|
||||
java_typemaps_proxyJNI.With_member_method(nullPtr, with, nullPtr, with);
|
||||
java_typemaps_proxyJNI.delete_With(nullPtr);
|
||||
java_typemaps_proxyJNI.global_method_with(nullPtr, with);
|
||||
|
||||
// Check that it can be turned off
|
||||
java_typemaps_proxyJNI.new_Without(nullPtr);
|
||||
java_typemaps_proxyJNI.Without_static_method(nullPtr);
|
||||
java_typemaps_proxyJNI.Without_member_method(nullPtr, nullPtr);
|
||||
java_typemaps_proxyJNI.delete_Without(nullPtr);
|
||||
java_typemaps_proxyJNI.global_method_without(nullPtr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue