jni-android-sys 0.0.10

Autogenerated glue code for access Android JVM APIs from Rust
// WARNING:  This file was autogenerated by jni-bindgen.  Any changes to this file may be lost!!!


#[cfg(any(feature = "all", feature = "junit-framework-TestResult"))]
__jni_bindgen! {
    /// public class [TestResult](https://developer.android.com/reference/junit/framework/TestResult.html)
    ///
    /// Required feature: "junit-framework-TestResult"
    public class TestResult ("junit/framework/TestResult") extends crate::java::lang::Object {

        /// [TestResult](https://developer.android.com/reference/junit/framework/TestResult.html#TestResult())
        pub fn new<'env>(__jni_env: &'env __jni_bindgen::Env) -> __jni_bindgen::std::result::Result<__jni_bindgen::Local<'env, crate::junit::framework::TestResult>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "junit/framework/TestResult", java.flags == PUBLIC, .name == "<init>", .descriptor == "()V"
            unsafe {
                let __jni_args = [];
                let (__jni_class, __jni_method) = __jni_env.require_class_method("junit/framework/TestResult\0", "<init>\0", "()V\0");
                __jni_env.new_object_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [addError](https://developer.android.com/reference/junit/framework/TestResult.html#addError(junit.framework.Test,%20java.lang.Throwable))
        ///
        /// Required features: "java-lang-Throwable", "junit-framework-Test"
        #[cfg(any(feature = "all", all(feature = "java-lang-Throwable", feature = "junit-framework-Test")))]
        pub fn addError<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::junit::framework::Test>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::Throwable>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "junit/framework/TestResult", java.flags == PUBLIC | SYNCRONIZED, .name == "addError", .descriptor == "(Ljunit/framework/Test;Ljava/lang/Throwable;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("junit/framework/TestResult\0", "addError\0", "(Ljunit/framework/Test;Ljava/lang/Throwable;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [addFailure](https://developer.android.com/reference/junit/framework/TestResult.html#addFailure(junit.framework.Test,%20junit.framework.AssertionFailedError))
        ///
        /// Required features: "junit-framework-AssertionFailedError", "junit-framework-Test"
        #[cfg(any(feature = "all", all(feature = "junit-framework-AssertionFailedError", feature = "junit-framework-Test")))]
        pub fn addFailure<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::junit::framework::Test>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::junit::framework::AssertionFailedError>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "junit/framework/TestResult", java.flags == PUBLIC | SYNCRONIZED, .name == "addFailure", .descriptor == "(Ljunit/framework/Test;Ljunit/framework/AssertionFailedError;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("junit/framework/TestResult\0", "addFailure\0", "(Ljunit/framework/Test;Ljunit/framework/AssertionFailedError;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [addListener](https://developer.android.com/reference/junit/framework/TestResult.html#addListener(junit.framework.TestListener))
        ///
        /// Required features: "junit-framework-TestListener"
        #[cfg(any(feature = "all", all(feature = "junit-framework-TestListener")))]
        pub fn addListener<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::junit::framework::TestListener>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "junit/framework/TestResult", java.flags == PUBLIC | SYNCRONIZED, .name == "addListener", .descriptor == "(Ljunit/framework/TestListener;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("junit/framework/TestResult\0", "addListener\0", "(Ljunit/framework/TestListener;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [removeListener](https://developer.android.com/reference/junit/framework/TestResult.html#removeListener(junit.framework.TestListener))
        ///
        /// Required features: "junit-framework-TestListener"
        #[cfg(any(feature = "all", all(feature = "junit-framework-TestListener")))]
        pub fn removeListener<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::junit::framework::TestListener>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "junit/framework/TestResult", java.flags == PUBLIC | SYNCRONIZED, .name == "removeListener", .descriptor == "(Ljunit/framework/TestListener;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("junit/framework/TestResult\0", "removeListener\0", "(Ljunit/framework/TestListener;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [endTest](https://developer.android.com/reference/junit/framework/TestResult.html#endTest(junit.framework.Test))
        ///
        /// Required features: "junit-framework-Test"
        #[cfg(any(feature = "all", all(feature = "junit-framework-Test")))]
        pub fn endTest<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::junit::framework::Test>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "junit/framework/TestResult", java.flags == PUBLIC, .name == "endTest", .descriptor == "(Ljunit/framework/Test;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("junit/framework/TestResult\0", "endTest\0", "(Ljunit/framework/Test;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [errorCount](https://developer.android.com/reference/junit/framework/TestResult.html#errorCount())
        pub fn errorCount<'env>(&'env self) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "junit/framework/TestResult", java.flags == PUBLIC | SYNCRONIZED, .name == "errorCount", .descriptor == "()I"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("junit/framework/TestResult\0", "errorCount\0", "()I\0");
                __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [errors](https://developer.android.com/reference/junit/framework/TestResult.html#errors())
        ///
        /// Required features: "java-util-Enumeration"
        #[cfg(any(feature = "all", all(feature = "java-util-Enumeration")))]
        pub fn errors<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::Enumeration>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "junit/framework/TestResult", java.flags == PUBLIC | SYNCRONIZED, .name == "errors", .descriptor == "()Ljava/util/Enumeration;"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("junit/framework/TestResult\0", "errors\0", "()Ljava/util/Enumeration;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [failureCount](https://developer.android.com/reference/junit/framework/TestResult.html#failureCount())
        pub fn failureCount<'env>(&'env self) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "junit/framework/TestResult", java.flags == PUBLIC | SYNCRONIZED, .name == "failureCount", .descriptor == "()I"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("junit/framework/TestResult\0", "failureCount\0", "()I\0");
                __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [failures](https://developer.android.com/reference/junit/framework/TestResult.html#failures())
        ///
        /// Required features: "java-util-Enumeration"
        #[cfg(any(feature = "all", all(feature = "java-util-Enumeration")))]
        pub fn failures<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::Enumeration>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "junit/framework/TestResult", java.flags == PUBLIC | SYNCRONIZED, .name == "failures", .descriptor == "()Ljava/util/Enumeration;"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("junit/framework/TestResult\0", "failures\0", "()Ljava/util/Enumeration;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [runCount](https://developer.android.com/reference/junit/framework/TestResult.html#runCount())
        pub fn runCount<'env>(&'env self) -> __jni_bindgen::std::result::Result<i32, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "junit/framework/TestResult", java.flags == PUBLIC | SYNCRONIZED, .name == "runCount", .descriptor == "()I"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("junit/framework/TestResult\0", "runCount\0", "()I\0");
                __jni_env.call_int_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [runProtected](https://developer.android.com/reference/junit/framework/TestResult.html#runProtected(junit.framework.Test,%20junit.framework.Protectable))
        ///
        /// Required features: "junit-framework-Protectable", "junit-framework-Test"
        #[cfg(any(feature = "all", all(feature = "junit-framework-Protectable", feature = "junit-framework-Test")))]
        pub fn runProtected<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::junit::framework::Test>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::junit::framework::Protectable>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "junit/framework/TestResult", java.flags == PUBLIC, .name == "runProtected", .descriptor == "(Ljunit/framework/Test;Ljunit/framework/Protectable;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("junit/framework/TestResult\0", "runProtected\0", "(Ljunit/framework/Test;Ljunit/framework/Protectable;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [shouldStop](https://developer.android.com/reference/junit/framework/TestResult.html#shouldStop())
        pub fn shouldStop<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "junit/framework/TestResult", java.flags == PUBLIC | SYNCRONIZED, .name == "shouldStop", .descriptor == "()Z"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("junit/framework/TestResult\0", "shouldStop\0", "()Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [startTest](https://developer.android.com/reference/junit/framework/TestResult.html#startTest(junit.framework.Test))
        ///
        /// Required features: "junit-framework-Test"
        #[cfg(any(feature = "all", all(feature = "junit-framework-Test")))]
        pub fn startTest<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::junit::framework::Test>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "junit/framework/TestResult", java.flags == PUBLIC, .name == "startTest", .descriptor == "(Ljunit/framework/Test;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("junit/framework/TestResult\0", "startTest\0", "(Ljunit/framework/Test;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [stop](https://developer.android.com/reference/junit/framework/TestResult.html#stop())
        pub fn stop<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "junit/framework/TestResult", java.flags == PUBLIC | SYNCRONIZED, .name == "stop", .descriptor == "()V"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("junit/framework/TestResult\0", "stop\0", "()V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [wasSuccessful](https://developer.android.com/reference/junit/framework/TestResult.html#wasSuccessful())
        pub fn wasSuccessful<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "junit/framework/TestResult", java.flags == PUBLIC | SYNCRONIZED, .name == "wasSuccessful", .descriptor == "()Z"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("junit/framework/TestResult\0", "wasSuccessful\0", "()Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}