Back to index

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

Go to the source code of this file.

Functions

 JNI_OJIAPITest (JNIEnv_CallIntMethod_14)

Function Documentation

JNI_OJIAPITest ( JNIEnv_CallIntMethod_14  )

Definition at line 40 of file CallIntMethod_14.cpp.

{
  GET_JNI_FOR_TEST

  jclass clazz_exp = env->FindClass("Ljava/security/PrivilegedActionException;");
  IMPLEMENT_GetMethodID_METHOD("Test1", "Test1_thrown_excp", "(I)I");
  jvalue *args  = new jvalue[0];
  args[0].i = 10;
  jint value = env->CallIntMethodA(obj, MethodID, args);
  jthrowable excep = env->ExceptionOccurred();

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

}

Here is the call graph for this function: