Back to index

lightning-sunbird  0.9+nobinonly
NewGlobalRef_2.cpp File Reference
#include "JNIEnvTests.h"
#include "GlobalAndLocalRefs.h"

Go to the source code of this file.


 JNI_OJIAPITest (JNIEnv_NewGlobalRef_2)

Function Documentation

JNI_OJIAPITest ( JNIEnv_NewGlobalRef_2  )

Definition at line 40 of file NewGlobalRef_2.cpp.


  jclass clazz = env->FindClass("Test1");
  jobject obj = env->AllocObject(clazz);
  jobject obj_ref = env->NewGlobalRef(NULL);

  if(obj!=NULL && obj_ref== NULL){
      return TestResult::PASS("NewGlobalRef return correct value with object=NULL");
      return TestResult::FAIL("NewGlobalRef do not return NULL value with object=NULL");


Here is the call graph for this function: