Back to index

lightning-sunbird  0.9+nobinonly
CallNonvirtualIntMethod_1.cpp File Reference
#include "JNIEnvTests.h"
#include "CallingInstanceMethods.h"
#include "Test1.h"

Go to the source code of this file.


 JNI_OJIAPITest (JNIEnv_CallNonvirtualIntMethod_1)

Function Documentation

JNI_OJIAPITest ( JNIEnv_CallNonvirtualIntMethod_1  )

Definition at line 41 of file CallNonvirtualIntMethod_1.cpp.


  jclass clazz_exp = env->FindClass("Ljava/security/PrivilegedActionException;");
  IMPLEMENT_GetMethodID_METHOD("Test1", "Test1_thrown_excp", "(I)I");
  jint value = env->CallNonvirtualIntMethod(obj, env->GetSuperclass(clazz), MethodID, 10);
  jthrowable excep = env->ExceptionOccurred();

  if((MethodID != NULL) && (env->IsInstanceOf(excep, clazz_exp))){
     return TestResult::PASS("CallNonvirtualIntMethod for public not inherited method that thrown exception really thrown exception");
     return TestResult::FAIL("CallNonvirtualIntMethod for public not inherited method that thrown exception do not really thrown exception");


Here is the call graph for this function: