Back to index

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

Go to the source code of this file.


 JNI_OJIAPITest (JNIEnv_GetDoubleArrayElements_2)

Function Documentation

JNI_OJIAPITest ( JNIEnv_GetDoubleArrayElements_2  )

Definition at line 40 of file GetDoubleArrayElements_2.cpp.


  jdoubleArray arr = env->NewDoubleArray(5);
  jsize start = 0;
  jsize leng = 3;
  jdouble buf[3];
  buf[0] = MAX_JDOUBLE;
  buf[1] = MIN_JDOUBLE;
  buf[2] = 0;
  env->SetDoubleArrayRegion(arr, start, leng, buf);

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

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


Here is the call graph for this function: