Back to index

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

Go to the source code of this file.


 JNI_OJIAPITest (JNIEnv_SetDoubleArrayRegion_1)

Function Documentation

JNI_OJIAPITest ( JNIEnv_SetDoubleArrayRegion_1  )

Definition at line 40 of file SetDoubleArrayRegion_1.cpp.


  jdoubleArray arr = env->NewDoubleArray(3);
  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("SetDoubleArrayRegion(all right) returns correct value");
     return TestResult::FAIL("SetDoubleArrayRegion(all right) returns incorrect value");


Here is the call graph for this function: