Back to index

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

Go to the source code of this file.


 JNI_OJIAPITest (JNIEnv_SetBooleanArrayRegion_1)

Function Documentation

JNI_OJIAPITest ( JNIEnv_SetBooleanArrayRegion_1  )

Definition at line 40 of file SetBooleanArrayRegion_1.cpp.


  jbooleanArray arr = env->NewBooleanArray(3);
  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, NULL);
  jboolean val0 = val[0];
  jboolean val1 = val[1];
  jboolean val2 = val[2];

     return TestResult::PASS("SetBooleanArrayRegion(all correct) returns correct value");
     return TestResult::FAIL("SetBooleanArrayRegion(all correct) returns incorrect value");


Here is the call graph for this function: