Back to index

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

Go to the source code of this file.

Functions

 JNI_OJIAPITest (JNIEnv_NewObjectArray_2)

Function Documentation

JNI_OJIAPITest ( JNIEnv_NewObjectArray_2  )

Definition at line 40 of file NewObjectArray_2.cpp.

{
  GET_JNI_FOR_TEST
  jclass clazz = env->FindClass("Ljava/lang/String;");
  jobject obj = env->AllocObject(clazz);

  jarray arr = env->NewObjectArray(-5, clazz, NULL);

  jsize len = env->GetArrayLength(arr);
  if(arr==NULL){
     return TestResult::PASS("NewObjectArray(-5, clazz, NULL) returns correct value");
  }else{
     return TestResult::FAIL("NewObjectArray(-5, clazz, NULL) returns incorrect value");
  }


}

Here is the call graph for this function: