Back to index

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

Go to the source code of this file.

Functions

 JNI_OJIAPITest (JNIEnv_IsInstanceOf_3)

Function Documentation

JNI_OJIAPITest ( JNIEnv_IsInstanceOf_3  )

Definition at line 40 of file IsInstanceOf_3.cpp.

{
  GET_JNI_FOR_TEST

  jclass clazz1 = env->FindClass("Test1");
  jclass clazz2 = env->FindClass("Test2");
  jclass clazz3 = env->FindClass("Test5");
  jobject obj1 = env->AllocObject(clazz1);
  jobject obj2 = env->AllocObject(clazz2);
  

  if(env->IsInstanceOf(obj1, clazz3)){
      return TestResult::FAIL("IsInstanceOf(some obj, isnt superclass or class) return incorrect value");
  }else{
      return TestResult::PASS("IsInstanceOf(some obj, isnt superclass or class) return correct value");
  }


}

Here is the call graph for this function: