Lines Matching refs:env
30 static void RegisterJavaVm(JNIEnv* env) { in RegisterJavaVm() argument
31 (void)env->GetJavaVM(&gVm); in RegisterJavaVm()
86 jobject createTestDescription(JNIEnv* env, jstring className, const std::string& mangledName) { in createTestDescription() argument
87 ScopedLocalRef<jstring> jTestName(env, env->NewStringUTF(mangledName.c_str())); in createTestDescription()
88 return env->CallStaticObjectMethod(gDescription.clazz, gDescription.createTestDescription, in createTestDescription()
92 jobject createTestDescription(JNIEnv* env, jstring className, const char* testCaseName, const char*… in createTestDescription() argument
96 return createTestDescription(env, className, mangledName); in createTestDescription()
99 void addChild(JNIEnv* env, jobject description, jobject childDescription) { in addChild() argument
100 env->CallVoidMethod(description, gDescription.addChild, childDescription); in addChild()
107 JUnitNotifyingListener(JNIEnv* env, jstring className, jobject runNotifier) in JUnitNotifyingListener() argument
108 : mEnv(env) in JUnitNotifyingListener()
111 , mCurrentTestDescription{env, nullptr} in JUnitNotifyingListener()
170 Java_com_android_gtestrunner_GtestRunner_nInitialize(JNIEnv *env, jclass, jstring className, jobjec… in Java_com_android_gtestrunner_GtestRunner_nInitialize() argument
171 RegisterJavaVm(env); in Java_com_android_gtestrunner_GtestRunner_nInitialize()
181 gDescription.clazz = (jclass) env->NewGlobalRef(env->FindClass("org/junit/runner/Description")); in Java_com_android_gtestrunner_GtestRunner_nInitialize()
182 …gDescription.createTestDescription = env->GetStaticMethodID(gDescription.clazz, "createTestDescrip… in Java_com_android_gtestrunner_GtestRunner_nInitialize()
184 gDescription.addChild = env->GetMethodID(gDescription.clazz, "addChild", in Java_com_android_gtestrunner_GtestRunner_nInitialize()
187 jclass annotations = env->FindClass("java/lang/annotation/Annotation"); in Java_com_android_gtestrunner_GtestRunner_nInitialize()
188 gEmptyAnnotationsArray = env->NewGlobalRef(env->NewObjectArray(0, annotations, nullptr)); in Java_com_android_gtestrunner_GtestRunner_nInitialize()
191 … gAssertionFailure.clazz = (jclass) env->NewGlobalRef(env->FindClass("java/lang/AssertionError")); in Java_com_android_gtestrunner_GtestRunner_nInitialize()
192 …gAssertionFailure.ctor = env->GetMethodID(gAssertionFailure.clazz, "<init>", "(Ljava/lang/Object;)… in Java_com_android_gtestrunner_GtestRunner_nInitialize()
194 …gFailure.clazz = (jclass) env->NewGlobalRef(env->FindClass("org/junit/runner/notification/Failure"… in Java_com_android_gtestrunner_GtestRunner_nInitialize()
195 gFailure.ctor = env->GetMethodID(gFailure.clazz, "<init>", in Java_com_android_gtestrunner_GtestRunner_nInitialize()
198 gRunNotifier.clazz = (jclass) env->NewGlobalRef( in Java_com_android_gtestrunner_GtestRunner_nInitialize()
199 env->FindClass("org/junit/runner/notification/RunNotifier")); in Java_com_android_gtestrunner_GtestRunner_nInitialize()
200 gRunNotifier.fireTestStarted = env->GetMethodID(gRunNotifier.clazz, "fireTestStarted", in Java_com_android_gtestrunner_GtestRunner_nInitialize()
202 gRunNotifier.fireTestIgnored = env->GetMethodID(gRunNotifier.clazz, "fireTestIgnored", in Java_com_android_gtestrunner_GtestRunner_nInitialize()
204 gRunNotifier.fireTestFinished = env->GetMethodID(gRunNotifier.clazz, "fireTestFinished", in Java_com_android_gtestrunner_GtestRunner_nInitialize()
206 gRunNotifier.fireTestFailure = env->GetMethodID(gRunNotifier.clazz, "fireTestFailure", in Java_com_android_gtestrunner_GtestRunner_nInitialize()
214 ScopedLocalRef<jobject> testDescription(env, in Java_com_android_gtestrunner_GtestRunner_nInitialize()
215 createTestDescription(env, className, testCase->name(), testInfo->name())); in Java_com_android_gtestrunner_GtestRunner_nInitialize()
216 addChild(env, suite, testDescription.get()); in Java_com_android_gtestrunner_GtestRunner_nInitialize()
223 Java_com_android_gtestrunner_GtestRunner_nAddTest(JNIEnv *env, jclass, jstring testName) { in Java_com_android_gtestrunner_GtestRunner_nAddTest() argument
224 const char* testNameChars = env->GetStringUTFChars(testName, JNI_FALSE); in Java_com_android_gtestrunner_GtestRunner_nAddTest()
229 env->ReleaseStringUTFChars(testName, testNameChars); in Java_com_android_gtestrunner_GtestRunner_nAddTest()
234 Java_com_android_gtestrunner_GtestRunner_nRun(JNIEnv *env, jclass, jstring className, jobject notif… in Java_com_android_gtestrunner_GtestRunner_nRun() argument
263 JUnitNotifyingListener junitListener{env, className, notifier}; in Java_com_android_gtestrunner_GtestRunner_nRun()