Back to index

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

Go to the source code of this file.

Functions

 JNI_OJIAPITest (JNIEnv_CallStaticIntMethod_5)

Function Documentation

JNI_OJIAPITest ( JNIEnv_CallStaticIntMethod_5  )

Definition at line 40 of file CallStaticIntMethod_5.cpp.

{
  GET_JNI_FOR_TEST

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

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

}

Here is the call graph for this function: