Back to index

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

Go to the source code of this file.


 JNI_OJIAPITest (JNIEnv_GetStringUTFLength_2)

Function Documentation

JNI_OJIAPITest ( JNIEnv_GetStringUTFLength_2  )

Definition at line 40 of file GetStringUTFLength_2.cpp.


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


Here is the call graph for this function: