Back to index

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

Go to the source code of this file.


 JNI_OJIAPITest (JNIEnv_NewStringUTF_1)

Function Documentation

JNI_OJIAPITest ( JNIEnv_NewStringUTF_1  )

Definition at line 40 of file NewStringUTF_1.cpp.


  IMPLEMENT_GetMethodID_METHOD("Test1", "Print_string", "(Ljava/lang/String;)V");
  jstring str = env->NewStringUTF("12345678"); 
  env->CallVoidMethod(obj, MethodID, str);

  jsize len = env->GetStringUTFLength(str);
  if((int)len == 8){
     return TestResult::PASS("NewStringUTF(non empty string) return correct value");
     return TestResult::FAIL("NewStringUTF(non empty string) return incorrect value");


Here is the call graph for this function: