Back to index

lightning-sunbird  0.9+nobinonly
GetStaticFieldID_17.cpp File Reference
#include "JNIEnvTests.h"
#include "AccessingStaticFields.h"

Go to the source code of this file.


 JNI_OJIAPITest (JNIEnv_GetStaticFieldID_17)

Function Documentation

JNI_OJIAPITest ( JNIEnv_GetStaticFieldID_17  )

Definition at line 40 of file GetStaticFieldID_17.cpp.


  IMPLEMENT_GetStaticFieldID_METHOD("Test1", "public_static_super_object", "Ljava/lang/String;");
  jchar str_chars[]={'a', 's', 'd', 'f'};
  jstring str = env->NewString(str_chars, 4); 
  env->SetStaticObjectField(clazz, fieldID, str);
  jstring value = (jstring)env->GetStaticObjectField(clazz, fieldID);
  jboolean isCopy = TRUE;
  char* str_chars1 = (char *) env->GetStringUTFChars(value, &isCopy);
  jsize len = env->GetStringLength(value);
  if(len == 4){
    return TestResult::PASS("GetStaticFieldID(all right for super public object (string)) return correct value");
    return TestResult::FAIL("GetStaticFieldID(all right for super public object (string)) return incorrect value");


Here is the call graph for this function: