Lines Matching refs:env_
393 : env_(env), in JniCallNonvirtualVoidMethodTest()
413 JNIEnv* const env_; member in art::JniCallNonvirtualVoidMethodTest
433 jclass c = env_->FindClass(class_name); in GetClass()
434 if (env_->ExceptionCheck()) { in GetClass()
435 env_->ExceptionDescribe(); in GetClass()
436 env_->FatalError(__FUNCTION__); in GetClass()
438 CHECK(!env_->ExceptionCheck()); in GetClass()
445 env_->GetMethodID(c, method_name, "()V") : in GetMethodID()
446 env_->GetStaticMethodID(c, method_name, "()V")); in GetMethodID()
447 if (env_->ExceptionCheck()) { in GetMethodID()
448 env_->ExceptionDescribe(); in GetMethodID()
449 env_->FatalError(__FUNCTION__); in GetMethodID()
456 jobject o = env_->NewObject(c, m); in CallConstructor()
457 if (env_->ExceptionCheck()) { in CallConstructor()
458 env_->ExceptionDescribe(); in CallConstructor()
459 env_->FatalError(__FUNCTION__); in CallConstructor()
467 env_->CallNonvirtualVoidMethod(o, c, m); in CallMethod()
468 bool exception_check = env_->ExceptionCheck(); in CallMethod()
472 env_->FatalError("Expected NullPointerException with null jclass"); in CallMethod()
474 env_->ExceptionClear(); in CallMethod()
477 env_->ExceptionDescribe(); in CallMethod()
478 env_->FatalError(test_case); in CallMethod()
484 jfieldID m = env_->GetFieldID(c, field_name, "Z"); in GetFieldID()
485 if (env_->ExceptionCheck()) { in GetFieldID()
486 env_->ExceptionDescribe(); in GetFieldID()
487 env_->FatalError(__FUNCTION__); in GetFieldID()
494 jboolean b = env_->GetBooleanField(o, f); in GetBooleanField()
495 if (env_->ExceptionCheck()) { in GetBooleanField()
496 env_->ExceptionDescribe(); in GetBooleanField()
497 env_->FatalError(__FUNCTION__); in GetBooleanField()
530 CHECK(env_->IsInstanceOf(super_super, super_)); in TestNewObject()
531 CHECK(!env_->IsInstanceOf(super_super, sub_)); in TestNewObject()
535 CHECK(env_->IsInstanceOf(super_sub, super_)); in TestNewObject()
536 CHECK(!env_->IsInstanceOf(super_sub, sub_)); in TestNewObject()
540 CHECK(env_->IsInstanceOf(sub_super, super_)); in TestNewObject()
541 CHECK(env_->IsInstanceOf(sub_super, sub_)); in TestNewObject()
543 CHECK(env_->IsInstanceOf(sub_sub, super_)); in TestNewObject()
544 CHECK(env_->IsInstanceOf(sub_sub, sub_)); in TestNewObject()
685 : env_(env), concrete_class_(env_->FindClass("ConcreteClass")) { in JniCallDefaultMethodsTest()
686 CHECK(!env_->ExceptionCheck()); in JniCallDefaultMethodsTest()
708 jmethodID new_method = env_->GetMethodID(concrete_class_, "<init>", "()V"); in TestCalls()
709 jobject obj = env_->NewObject(concrete_class_, new_method); in TestCalls()
710 CHECK(!env_->ExceptionCheck()); in TestCalls()
712 jclass decl_class = env_->FindClass(declaring_class); in TestCalls()
713 CHECK(!env_->ExceptionCheck()); in TestCalls()
716 jmethodID method_id = env_->GetMethodID(decl_class, method, "()V"); in TestCalls()
717 CHECK(!env_->ExceptionCheck()); in TestCalls()
719 env_->CallVoidMethod(obj, method_id); in TestCalls()
720 if (env_->ExceptionCheck()) { in TestCalls()
721 jthrowable thrown = env_->ExceptionOccurred(); in TestCalls()
722 env_->ExceptionClear(); in TestCalls()
723 jmethodID to_string = env_->GetMethodID( in TestCalls()
724 env_->FindClass("java/lang/Object"), "toString", "()Ljava/lang/String;"); in TestCalls()
725 jstring exception_string = (jstring) env_->CallObjectMethod(thrown, to_string); in TestCalls()
726 CHECK(!env_->ExceptionCheck()); in TestCalls()
727 const char* exception_string_utf8 = env_->GetStringUTFChars(exception_string, nullptr); in TestCalls()
728 CHECK(!env_->ExceptionCheck()); in TestCalls()
731 env_->ReleaseStringUTFChars(exception_string, exception_string_utf8); in TestCalls()
736 JNIEnv* env_; member in art::JniCallDefaultMethodsTest