Back to index

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

Go to the source code of this file.


 JNI_OJIAPITest (JNIEnv_GetStringUTFLength_3)

Function Documentation

JNI_OJIAPITest ( JNIEnv_GetStringUTFLength_3  )

Definition at line 40 of file GetStringUTFLength_3.cpp.


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


Here is the call graph for this function: