Back to index

lightning-sunbird  0.9+nobinonly
GetStringUTFLength_1.cpp File Reference
#include "JNIEnvTests.h"
#include "StringOperations.h"

Go to the source code of this file.


 JNI_OJIAPITest (JNIEnv_GetStringUTFLength_1)

Function Documentation

JNI_OJIAPITest ( JNIEnv_GetStringUTFLength_1  )

Definition at line 40 of file GetStringUTFLength_1.cpp.


  IMPLEMENT_GetMethodID_METHOD("Test1", "Set_int_field", "(I)V");
  jstring str = env->NewStringUTF("12345678"); 
  jsize str_size = env->GetStringUTFLength(str);
  env->CallVoidMethod(obj, MethodID, str_size);
  if((int)str_size == 8){
     return TestResult::PASS("GetStringUTFLength(correct string) return correct value!");
     return TestResult::FAIL("GetStringUTFLength(correct string) return incorrect value!");

Here is the call graph for this function: