Skip to content

Commit

Permalink
Update tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpobst committed Dec 3, 2024
1 parent 11145de commit 369ae73
Show file tree
Hide file tree
Showing 67 changed files with 1,975 additions and 844 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#if !NET9_0_OR_GREATER

using System;

namespace System.Diagnostics
{
// This attribute was added in .NET 9, and we may not be targeting .NET 9 yet.
public class DebuggerDisableUserUnhandledExceptionsAttribute : Attribute
{
}
}

#endif // !NET9_0_OR_GREATER
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,23 @@ internal partial class AnimatorListenerInvoker : global::Java.Lang.Object, Anima
#pragma warning disable 0169
static Delegate GetOnAnimationEnd_IHandler ()
{
if (cb_OnAnimationEnd_OnAnimationEnd_I_Z == null)
cb_OnAnimationEnd_OnAnimationEnd_I_Z = JNINativeWrapper.CreateDelegate (new _JniMarshal_PPI_Z (n_OnAnimationEnd_I));
return cb_OnAnimationEnd_OnAnimationEnd_I_Z;
return cb_OnAnimationEnd_OnAnimationEnd_I_Z ??= new _JniMarshal_PPI_Z (n_OnAnimationEnd_I);
}

[global::System.Diagnostics.DebuggerDisableUserUnhandledExceptions]
static bool n_OnAnimationEnd_I (IntPtr jnienv, IntPtr native__this, int param1)
{
var __this = global::Java.Lang.Object.GetObject<java.code.AnimatorListener> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
return __this.OnAnimationEnd (param1);
var __envp = new global::Java.Interop.JniTransition (jnienv);

try {
var __this = global::Java.Lang.Object.GetObject<java.code.AnimatorListener> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
return __this.OnAnimationEnd (param1);
} catch (global::System.Exception __e) {
global::Java.Interop.JniEnvironment.Runtime.OnUserUnhandledException (ref __envp, __e);
return default;
} finally {
__envp.Dispose ();
}
}
#pragma warning restore 0169

Expand All @@ -96,15 +104,23 @@ internal partial class AnimatorListenerInvoker : global::Java.Lang.Object, Anima
#pragma warning disable 0169
static Delegate GetOnAnimationEnd_IIHandler ()
{
if (cb_OnAnimationEnd_OnAnimationEnd_II_Z == null)
cb_OnAnimationEnd_OnAnimationEnd_II_Z = JNINativeWrapper.CreateDelegate (new _JniMarshal_PPII_Z (n_OnAnimationEnd_II));
return cb_OnAnimationEnd_OnAnimationEnd_II_Z;
return cb_OnAnimationEnd_OnAnimationEnd_II_Z ??= new _JniMarshal_PPII_Z (n_OnAnimationEnd_II);
}

[global::System.Diagnostics.DebuggerDisableUserUnhandledExceptions]
static bool n_OnAnimationEnd_II (IntPtr jnienv, IntPtr native__this, int param1, int param2)
{
var __this = global::Java.Lang.Object.GetObject<java.code.AnimatorListener> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
return __this.OnAnimationEnd (param1, param2);
var __envp = new global::Java.Interop.JniTransition (jnienv);

try {
var __this = global::Java.Lang.Object.GetObject<java.code.AnimatorListener> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
return __this.OnAnimationEnd (param1, param2);
} catch (global::System.Exception __e) {
global::Java.Interop.JniEnvironment.Runtime.OnUserUnhandledException (ref __envp, __e);
return default;
} finally {
__envp.Dispose ();
}
}
#pragma warning restore 0169

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,22 @@ internal partial class IMyInterface2Invoker : global::Java.Lang.Object, IMyInter
#pragma warning disable 0169
static Delegate GetDoSomethingHandler ()
{
if (cb_DoSomething_DoSomething_V == null)
cb_DoSomething_DoSomething_V = JNINativeWrapper.CreateDelegate (new _JniMarshal_PP_V (n_DoSomething));
return cb_DoSomething_DoSomething_V;
return cb_DoSomething_DoSomething_V ??= new _JniMarshal_PP_V (n_DoSomething);
}

[global::System.Diagnostics.DebuggerDisableUserUnhandledExceptions]
static void n_DoSomething (IntPtr jnienv, IntPtr native__this)
{
var __this = global::Java.Lang.Object.GetObject<java.code.IMyInterface2> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
__this.DoSomething ();
var __envp = new global::Java.Interop.JniTransition (jnienv);

try {
var __this = global::Java.Lang.Object.GetObject<java.code.IMyInterface2> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
__this.DoSomething ();
} catch (global::System.Exception __e) {
global::Java.Interop.JniEnvironment.Runtime.OnUserUnhandledException (ref __envp, __e);
} finally {
__envp.Dispose ();
}
}
#pragma warning restore 0169

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,31 +53,46 @@ public partial class MyClass {
#pragma warning disable 0169
static Delegate Getget_CountHandler ()
{
if (cb_get_Count_get_Count_I == null)
cb_get_Count_get_Count_I = JNINativeWrapper.CreateDelegate (new _JniMarshal_PP_I (n_get_Count));
return cb_get_Count_get_Count_I;
return cb_get_Count_get_Count_I ??= new _JniMarshal_PP_I (n_get_Count);
}

[global::System.Diagnostics.DebuggerDisableUserUnhandledExceptions]
static int n_get_Count (IntPtr jnienv, IntPtr native__this)
{
var __this = global::Java.Lang.Object.GetObject<java.code.MyClass> (jnienv, native__this, JniHandleOwnership.DoNotTransfer)!;
return __this.Count;
var __envp = new global::Java.Interop.JniTransition (jnienv);

try {
var __this = global::Java.Lang.Object.GetObject<java.code.MyClass> (jnienv, native__this, JniHandleOwnership.DoNotTransfer)!;
return __this.Count;
} catch (global::System.Exception __e) {
global::Java.Interop.JniEnvironment.Runtime.OnUserUnhandledException (ref __envp, __e);
return default;
} finally {
__envp.Dispose ();
}
}
#pragma warning restore 0169

static Delegate? cb_set_Count_set_Count_I_V;
#pragma warning disable 0169
static Delegate Getset_Count_IHandler ()
{
if (cb_set_Count_set_Count_I_V == null)
cb_set_Count_set_Count_I_V = JNINativeWrapper.CreateDelegate (new _JniMarshal_PPI_V (n_set_Count_I));
return cb_set_Count_set_Count_I_V;
return cb_set_Count_set_Count_I_V ??= new _JniMarshal_PPI_V (n_set_Count_I);
}

[global::System.Diagnostics.DebuggerDisableUserUnhandledExceptions]
static void n_set_Count_I (IntPtr jnienv, IntPtr native__this, int value)
{
var __this = global::Java.Lang.Object.GetObject<java.code.MyClass> (jnienv, native__this, JniHandleOwnership.DoNotTransfer)!;
__this.Count = value;
var __envp = new global::Java.Interop.JniTransition (jnienv);

try {
var __this = global::Java.Lang.Object.GetObject<java.code.MyClass> (jnienv, native__this, JniHandleOwnership.DoNotTransfer)!;
__this.Count = value;
} catch (global::System.Exception __e) {
global::Java.Interop.JniEnvironment.Runtime.OnUserUnhandledException (ref __envp, __e);
} finally {
__envp.Dispose ();
}
}
#pragma warning restore 0169

Expand Down Expand Up @@ -109,32 +124,47 @@ public partial class MyClass {
#pragma warning disable 0169
static Delegate Getget_KeyHandler ()
{
if (cb_get_Key_get_Key_Ljava_lang_String_ == null)
cb_get_Key_get_Key_Ljava_lang_String_ = JNINativeWrapper.CreateDelegate (new _JniMarshal_PP_L (n_get_Key));
return cb_get_Key_get_Key_Ljava_lang_String_;
return cb_get_Key_get_Key_Ljava_lang_String_ ??= new _JniMarshal_PP_L (n_get_Key);
}

[global::System.Diagnostics.DebuggerDisableUserUnhandledExceptions]
static IntPtr n_get_Key (IntPtr jnienv, IntPtr native__this)
{
var __this = global::Java.Lang.Object.GetObject<java.code.MyClass> (jnienv, native__this, JniHandleOwnership.DoNotTransfer)!;
return JNIEnv.NewString (__this.Key);
var __envp = new global::Java.Interop.JniTransition (jnienv);

try {
var __this = global::Java.Lang.Object.GetObject<java.code.MyClass> (jnienv, native__this, JniHandleOwnership.DoNotTransfer)!;
return JNIEnv.NewString (__this.Key);
} catch (global::System.Exception __e) {
global::Java.Interop.JniEnvironment.Runtime.OnUserUnhandledException (ref __envp, __e);
return default;
} finally {
__envp.Dispose ();
}
}
#pragma warning restore 0169

static Delegate? cb_set_Key_set_Key_Ljava_lang_String__V;
#pragma warning disable 0169
static Delegate Getset_Key_Ljava_lang_String_Handler ()
{
if (cb_set_Key_set_Key_Ljava_lang_String__V == null)
cb_set_Key_set_Key_Ljava_lang_String__V = JNINativeWrapper.CreateDelegate (new _JniMarshal_PPL_V (n_set_Key_Ljava_lang_String_));
return cb_set_Key_set_Key_Ljava_lang_String__V;
return cb_set_Key_set_Key_Ljava_lang_String__V ??= new _JniMarshal_PPL_V (n_set_Key_Ljava_lang_String_);
}

[global::System.Diagnostics.DebuggerDisableUserUnhandledExceptions]
static void n_set_Key_Ljava_lang_String_ (IntPtr jnienv, IntPtr native__this, IntPtr native_value)
{
var __this = global::Java.Lang.Object.GetObject<java.code.MyClass> (jnienv, native__this, JniHandleOwnership.DoNotTransfer)!;
var value = JNIEnv.GetString (native_value, JniHandleOwnership.DoNotTransfer);
__this.Key = value;
var __envp = new global::Java.Interop.JniTransition (jnienv);

try {
var __this = global::Java.Lang.Object.GetObject<java.code.MyClass> (jnienv, native__this, JniHandleOwnership.DoNotTransfer)!;
var value = JNIEnv.GetString (native_value, JniHandleOwnership.DoNotTransfer);
__this.Key = value;
} catch (global::System.Exception __e) {
global::Java.Interop.JniEnvironment.Runtime.OnUserUnhandledException (ref __envp, __e);
} finally {
__envp.Dispose ();
}
}
#pragma warning restore 0169

Expand Down Expand Up @@ -192,31 +222,46 @@ public partial class MyClass {
#pragma warning disable 0169
static Delegate Getget_AbstractCountHandler ()
{
if (cb_get_AbstractCount_get_AbstractCount_I == null)
cb_get_AbstractCount_get_AbstractCount_I = JNINativeWrapper.CreateDelegate (new _JniMarshal_PP_I (n_get_AbstractCount));
return cb_get_AbstractCount_get_AbstractCount_I;
return cb_get_AbstractCount_get_AbstractCount_I ??= new _JniMarshal_PP_I (n_get_AbstractCount);
}

[global::System.Diagnostics.DebuggerDisableUserUnhandledExceptions]
static int n_get_AbstractCount (IntPtr jnienv, IntPtr native__this)
{
var __this = global::Java.Lang.Object.GetObject<java.code.MyClass> (jnienv, native__this, JniHandleOwnership.DoNotTransfer)!;
return __this.AbstractCount;
var __envp = new global::Java.Interop.JniTransition (jnienv);

try {
var __this = global::Java.Lang.Object.GetObject<java.code.MyClass> (jnienv, native__this, JniHandleOwnership.DoNotTransfer)!;
return __this.AbstractCount;
} catch (global::System.Exception __e) {
global::Java.Interop.JniEnvironment.Runtime.OnUserUnhandledException (ref __envp, __e);
return default;
} finally {
__envp.Dispose ();
}
}
#pragma warning restore 0169

static Delegate? cb_set_AbstractCount_set_AbstractCount_I_V;
#pragma warning disable 0169
static Delegate Getset_AbstractCount_IHandler ()
{
if (cb_set_AbstractCount_set_AbstractCount_I_V == null)
cb_set_AbstractCount_set_AbstractCount_I_V = JNINativeWrapper.CreateDelegate (new _JniMarshal_PPI_V (n_set_AbstractCount_I));
return cb_set_AbstractCount_set_AbstractCount_I_V;
return cb_set_AbstractCount_set_AbstractCount_I_V ??= new _JniMarshal_PPI_V (n_set_AbstractCount_I);
}

[global::System.Diagnostics.DebuggerDisableUserUnhandledExceptions]
static void n_set_AbstractCount_I (IntPtr jnienv, IntPtr native__this, int value)
{
var __this = global::Java.Lang.Object.GetObject<java.code.MyClass> (jnienv, native__this, JniHandleOwnership.DoNotTransfer)!;
__this.AbstractCount = value;
var __envp = new global::Java.Interop.JniTransition (jnienv);

try {
var __this = global::Java.Lang.Object.GetObject<java.code.MyClass> (jnienv, native__this, JniHandleOwnership.DoNotTransfer)!;
__this.AbstractCount = value;
} catch (global::System.Exception __e) {
global::Java.Interop.JniEnvironment.Runtime.OnUserUnhandledException (ref __envp, __e);
} finally {
__envp.Dispose ();
}
}
#pragma warning restore 0169

Expand All @@ -234,17 +279,25 @@ public partial class MyClass {
#pragma warning disable 0169
static Delegate GetGetCountForKey_Ljava_lang_String_Handler ()
{
if (cb_GetCountForKey_GetCountForKey_Ljava_lang_String__I == null)
cb_GetCountForKey_GetCountForKey_Ljava_lang_String__I = JNINativeWrapper.CreateDelegate (new _JniMarshal_PPL_I (n_GetCountForKey_Ljava_lang_String_));
return cb_GetCountForKey_GetCountForKey_Ljava_lang_String__I;
return cb_GetCountForKey_GetCountForKey_Ljava_lang_String__I ??= new _JniMarshal_PPL_I (n_GetCountForKey_Ljava_lang_String_);
}

[global::System.Diagnostics.DebuggerDisableUserUnhandledExceptions]
static int n_GetCountForKey_Ljava_lang_String_ (IntPtr jnienv, IntPtr native__this, IntPtr native_key)
{
var __this = global::Java.Lang.Object.GetObject<java.code.MyClass> (jnienv, native__this, JniHandleOwnership.DoNotTransfer)!;
var key = JNIEnv.GetString (native_key, JniHandleOwnership.DoNotTransfer);
int __ret = __this.GetCountForKey (key);
return __ret;
var __envp = new global::Java.Interop.JniTransition (jnienv);

try {
var __this = global::Java.Lang.Object.GetObject<java.code.MyClass> (jnienv, native__this, JniHandleOwnership.DoNotTransfer)!;
var key = JNIEnv.GetString (native_key, JniHandleOwnership.DoNotTransfer);
int __ret = __this.GetCountForKey (key);
return __ret;
} catch (global::System.Exception __e) {
global::Java.Interop.JniEnvironment.Runtime.OnUserUnhandledException (ref __envp, __e);
return default;
} finally {
__envp.Dispose ();
}
}
#pragma warning restore 0169

Expand All @@ -268,15 +321,23 @@ public partial class MyClass {
#pragma warning disable 0169
static Delegate GetKeyHandler ()
{
if (cb_Key_Key_Ljava_lang_String_ == null)
cb_Key_Key_Ljava_lang_String_ = JNINativeWrapper.CreateDelegate (new _JniMarshal_PP_L (n_Key));
return cb_Key_Key_Ljava_lang_String_;
return cb_Key_Key_Ljava_lang_String_ ??= new _JniMarshal_PP_L (n_Key);
}

[global::System.Diagnostics.DebuggerDisableUserUnhandledExceptions]
static IntPtr n_Key (IntPtr jnienv, IntPtr native__this)
{
var __this = global::Java.Lang.Object.GetObject<java.code.MyClass> (jnienv, native__this, JniHandleOwnership.DoNotTransfer)!;
return JNIEnv.NewString (__this.Key ());
var __envp = new global::Java.Interop.JniTransition (jnienv);

try {
var __this = global::Java.Lang.Object.GetObject<java.code.MyClass> (jnienv, native__this, JniHandleOwnership.DoNotTransfer)!;
return JNIEnv.NewString (__this.Key ());
} catch (global::System.Exception __e) {
global::Java.Interop.JniEnvironment.Runtime.OnUserUnhandledException (ref __envp, __e);
return default;
} finally {
__envp.Dispose ();
}
}
#pragma warning restore 0169

Expand Down Expand Up @@ -307,15 +368,22 @@ public partial class MyClass {
#pragma warning disable 0169
static Delegate GetAbstractMethodHandler ()
{
if (cb_AbstractMethod_AbstractMethod_V == null)
cb_AbstractMethod_AbstractMethod_V = JNINativeWrapper.CreateDelegate (new _JniMarshal_PP_V (n_AbstractMethod));
return cb_AbstractMethod_AbstractMethod_V;
return cb_AbstractMethod_AbstractMethod_V ??= new _JniMarshal_PP_V (n_AbstractMethod);
}

[global::System.Diagnostics.DebuggerDisableUserUnhandledExceptions]
static void n_AbstractMethod (IntPtr jnienv, IntPtr native__this)
{
var __this = global::Java.Lang.Object.GetObject<java.code.MyClass> (jnienv, native__this, JniHandleOwnership.DoNotTransfer)!;
__this.AbstractMethod ();
var __envp = new global::Java.Interop.JniTransition (jnienv);

try {
var __this = global::Java.Lang.Object.GetObject<java.code.MyClass> (jnienv, native__this, JniHandleOwnership.DoNotTransfer)!;
__this.AbstractMethod ();
} catch (global::System.Exception __e) {
global::Java.Interop.JniEnvironment.Runtime.OnUserUnhandledException (ref __envp, __e);
} finally {
__envp.Dispose ();
}
}
#pragma warning restore 0169

Expand Down
Loading

0 comments on commit 369ae73

Please sign in to comment.