Back to index

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

Go to the source code of this file.


 JNI_OJIAPITest (JNIEnv_GetBooleanArrayElements_3)

Function Documentation

JNI_OJIAPITest ( JNIEnv_GetBooleanArrayElements_3  )

Definition at line 40 of file GetBooleanArrayElements_3.cpp.


  jbooleanArray arr = env->NewBooleanArray(5);
  jsize start = 0;
  jsize leng = 3;
  jboolean buf[3];
  buf[0] = JNI_TRUE;
  buf[1] = JNI_FALSE;
  buf[2] = 0;
  env->SetBooleanArrayRegion(arr, start, leng, buf);

  jboolean isCopy = JNI_TRUE;
  jboolean *val = env->GetBooleanArrayElements(arr, &isCopy);
  jboolean val0 = val[0];
  jboolean val1 = val[1];
  jboolean val2 = val[2];

     return TestResult::PASS("GetBooleanArrayElements(arr, NULL) returns correct value");
     return TestResult::FAIL("GetBooleanArrayElements(arr, NULL) returns incorrect value");


Here is the call graph for this function: