Back to index

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

Go to the source code of this file.

Functions

 JNI_OJIAPITest (JNIEnv_NewObjectA_3)

Function Documentation

JNI_OJIAPITest ( JNIEnv_NewObjectA_3  )

Definition at line 40 of file NewObjectA_3.cpp.

{
  GET_JNI_FOR_TEST

  IMPLEMENT_GetMethodID_METHOD("Test1", "<init>", "(Ljava/lang/String;)V");

  jstring str = env->NewStringUTF("This is only a test string!!!!!");
  jvalue args[1];
  args[0].l = str;
  jobject obj_new = env->NewObjectA(clazz, MethodID, args);
  if(obj_new != NULL) {
      return TestResult::PASS("NewObjectA with java\\lang\\String as argument");
  }else{
      return TestResult::FAIL("NewObjectA with java\\lang\\String as argument");
  }



  return TestResult::PASS("");

}

Here is the call graph for this function: