Back to index

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

Go to the source code of this file.

Functions

 JNI_OJIAPITest (JNIEnv_NewStringUTF_2)

Function Documentation

JNI_OJIAPITest ( JNIEnv_NewStringUTF_2  )

Definition at line 40 of file NewStringUTF_2.cpp.

{
  GET_JNI_FOR_TEST

  IMPLEMENT_GetMethodID_METHOD("Test1", "Print_string", "(Ljava/lang/String;)V");
  jstring str = env->NewStringUTF(""); 
  env->CallVoidMethod(obj, MethodID, str);
  jsize len = env->GetStringUTFLength(str);
  if((int)len == 0){
     return TestResult::PASS("NewStringUTF(\"\") return correct value");
  }else{
     return TestResult::FAIL("NewStringUTF(\"\") return incorrect value");
  }
}

Here is the call graph for this function: