Skip to content

Commit 13e2129

Browse files
committed
Add OperatorTests
1 parent 82b9c8e commit 13e2129

File tree

5 files changed

+208
-8
lines changed

5 files changed

+208
-8
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
namespace Beyond.NET.Sample.Source;
2+
3+
public class OperatorTests
4+
{
5+
public static OperatorTests operator +(OperatorTests a, string b)
6+
{
7+
return a;
8+
}
9+
10+
public void operator +=(string b)
11+
{
12+
13+
}
14+
}

Samples/Generated/Generated_C.h

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// Number of generated types: 1640
2-
// Number of generated members: 7797
1+
// Number of generated types: 1641
2+
// Number of generated members: 7800
33

44
#pragma mark - BEGIN Header
55
#ifndef TypeDefinitions_h
@@ -6165,6 +6165,8 @@ typedef void* Beyond_NET_Sample_Source_ManagedUnhandledExceptionHandler_t;
61656165

61666166
typedef void* Beyond_NET_Sample_Source_NestedTypeTests_t;
61676167

6168+
typedef void* Beyond_NET_Sample_Source_OperatorTests_t;
6169+
61686170
typedef void* Beyond_NET_Sample_Source_OutParameterTests_t;
61696171

61706172

@@ -61750,6 +61752,24 @@ Beyond_NET_Sample_Source_NestedTypeTests_Destroy(
6175061752

6175161753
#pragma mark - END APIs of Beyond.NET.Sample.Source.NestedTypeTests
6175261754

61755+
#pragma mark - BEGIN APIs of Beyond.NET.Sample.Source.OperatorTests
61756+
Beyond_NET_Sample_Source_OperatorTests_t _Nonnull /* Beyond.NET.Sample.Source.OperatorTests */
61757+
Beyond_NET_Sample_Source_OperatorTests_Create(
61758+
System_Exception_t _Nullable* _Nullable /* System.Exception */ outException
61759+
);
61760+
61761+
System_Type_t _Nonnull /* System.Type */
61762+
Beyond_NET_Sample_Source_OperatorTests_TypeOf(
61763+
void
61764+
);
61765+
61766+
void /* System.Void */
61767+
Beyond_NET_Sample_Source_OperatorTests_Destroy(
61768+
Beyond_NET_Sample_Source_OperatorTests_t _Nullable /* Beyond.NET.Sample.Source.OperatorTests */ self
61769+
);
61770+
61771+
#pragma mark - END APIs of Beyond.NET.Sample.Source.OperatorTests
61772+
6175361773
#pragma mark - BEGIN APIs of Beyond.NET.Sample.Source.OutParameterTests
6175461774
void /* System.Void */
6175561775
Beyond_NET_Sample_Source_OutParameterTests_Return_Int_1_NonOptional(

Samples/Generated/Generated_CS.cs

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
#nullable disable warnings
55
#pragma warning disable
66

7-
// Number of generated types: 1640
8-
// Number of generated members: 7797
7+
// Number of generated types: 1641
8+
// Number of generated members: 7800
99

1010
// <Header>
1111
using System;
@@ -229381,6 +229381,56 @@ internal unsafe class Beyond_NET_Sample_Source_NestedTypeTests
229381229381
}
229382229382

229383229383

229384+
internal unsafe class Beyond_NET_Sample_Source_OperatorTests
229385+
{
229386+
// Unsupported Member "op_Addition": Is Special Name
229387+
229388+
// Unsupported Member "op_AdditionAssignment": Is Special Name
229389+
229390+
[UnmanagedCallersOnly(EntryPoint = "Beyond_NET_Sample_Source_OperatorTests_Create")]
229391+
internal static void* /* Beyond.NET.Sample.Source.OperatorTests */ Beyond_NET_Sample_Source_OperatorTests_Create(void** /* System.Exception */ __outException)
229392+
{
229393+
229394+
try {
229395+
Beyond.NET.Sample.Source.OperatorTests __returnValue = new Beyond.NET.Sample.Source.OperatorTests();
229396+
void* __returnValueNative = __returnValue.AllocateGCHandleAndGetAddress();
229397+
229398+
if (__outException is not null) {
229399+
*__outException = null;
229400+
}
229401+
229402+
return __returnValueNative;
229403+
} catch (Exception __exception) {
229404+
if (__outException is not null) {
229405+
void* __exceptionHandleAddress = __exception.AllocateGCHandleAndGetAddress();
229406+
229407+
*__outException = __exceptionHandleAddress;
229408+
}
229409+
229410+
return null;
229411+
} finally {
229412+
}
229413+
}
229414+
229415+
[UnmanagedCallersOnly(EntryPoint = "Beyond_NET_Sample_Source_OperatorTests_TypeOf")]
229416+
internal static void* /* System.Type */ Beyond_NET_Sample_Source_OperatorTests_TypeOf()
229417+
{
229418+
229419+
System.Type __returnValue = typeof(Beyond.NET.Sample.Source.OperatorTests);
229420+
void* __returnValueNative = __returnValue.AllocateGCHandleAndGetAddress();
229421+
return __returnValueNative;
229422+
}
229423+
229424+
[UnmanagedCallersOnly(EntryPoint = "Beyond_NET_Sample_Source_OperatorTests_Destroy")]
229425+
internal static void /* System.Void */ Beyond_NET_Sample_Source_OperatorTests_Destroy(void* /* Beyond.NET.Sample.Source.OperatorTests */ __self)
229426+
{
229427+
229428+
InteropUtils.FreeIfAllocated(__self);
229429+
}
229430+
229431+
}
229432+
229433+
229384229434
internal unsafe class Beyond_NET_Sample_Source_OutParameterTests
229385229435
{
229386229436
// Unsupported Member "Return_Int_1_Optional": Has unsupported parameter(s): returnValue: Is Nullable Value Type, but not a struct (System.Int32?);

Samples/Generated/Generated_Kotlin.kt

Lines changed: 75 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// Number of generated types: 1637
2-
// Number of generated members: 7497
1+
// Number of generated types: 1638
2+
// Number of generated members: 7500
33

44
// MARK: - BEGIN Header
55
package com.example.beyondnetsampleandroid.dn
@@ -178892,6 +178892,66 @@ open class Beyond_NET_Sample_Source_NestedTypeTests /* Beyond.NET.Sample.Source.
178892178892
// MARK: - END Beyond.NET.Sample.Source.NestedTypeTests
178893178893

178894178894

178895+
// MARK: - BEGIN Beyond.NET.Sample.Source.OperatorTests
178896+
open class Beyond_NET_Sample_Source_OperatorTests /* Beyond.NET.Sample.Source.OperatorTests */(handle: Pointer): System_Object(handle) {
178897+
companion object : IDNObjectCompanion<Beyond_NET_Sample_Source_OperatorTests> {
178898+
operator public fun invoke() : Beyond_NET_Sample_Source_OperatorTests /* Beyond.NET.Sample.Source.OperatorTests */ {
178899+
178900+
178901+
val __exceptionC = PointerByReference()
178902+
178903+
val __returnValueC = CAPI.Beyond_NET_Sample_Source_OperatorTests_Create(__exceptionC)
178904+
178905+
val __exceptionCHandle = __exceptionC.value
178906+
178907+
if (__exceptionCHandle != null) {
178908+
throw System_Exception(__exceptionCHandle).toKException()
178909+
}
178910+
178911+
return Beyond_NET_Sample_Source_OperatorTests(__returnValueC)
178912+
178913+
}
178914+
@JvmStatic
178915+
@Suppress("INAPPLICABLE_JVM_NAME")
178916+
public override val typeOf: System_Type /* System.Type */
178917+
@JvmName("typeOf_get")
178918+
get() {
178919+
return System_Type(CAPI.Beyond_NET_Sample_Source_OperatorTests_TypeOf())
178920+
178921+
}
178922+
178923+
178924+
178925+
@JvmStatic override fun __constructWithHandle(handle: Pointer) : Beyond_NET_Sample_Source_OperatorTests {
178926+
return Beyond_NET_Sample_Source_OperatorTests(handle)
178927+
}
178928+
178929+
}
178930+
178931+
open override fun destroy() {
178932+
CAPI.Beyond_NET_Sample_Source_OperatorTests_Destroy(this.__handle)
178933+
178934+
}
178935+
override fun equals(other: Any?) : Boolean {
178936+
val otherSystemObject = other as? System_Object
178937+
178938+
try {
178939+
otherSystemObject?.let {
178940+
return System_Object.equals(this, otherSystemObject)
178941+
}
178942+
} catch (e: Exception) {
178943+
return false
178944+
}
178945+
178946+
return false
178947+
}
178948+
178949+
}
178950+
178951+
178952+
// MARK: - END Beyond.NET.Sample.Source.OperatorTests
178953+
178954+
178895178955
// MARK: - BEGIN Beyond.NET.Sample.Source.OutParameterTests
178896178956
open class Beyond_NET_Sample_Source_OutParameterTests /* Beyond.NET.Sample.Source.OutParameterTests */(handle: Pointer): System_Object(handle) {
178897178957
companion object : IDNObjectCompanion<Beyond_NET_Sample_Source_OutParameterTests> {
@@ -208741,6 +208801,19 @@ object CAPI {
208741208801
// MARK: - END Beyond.NET.Sample.Source.NestedTypeTests
208742208802

208743208803

208804+
// MARK: - BEGIN Beyond.NET.Sample.Source.OperatorTests
208805+
external fun Beyond_NET_Sample_Source_OperatorTests_Create(outException: PointerByReference? /* System.Exception */) : Pointer /* Beyond.NET.Sample.Source.OperatorTests */
208806+
208807+
external fun Beyond_NET_Sample_Source_OperatorTests_TypeOf() : Pointer /* System.Type */
208808+
208809+
external fun Beyond_NET_Sample_Source_OperatorTests_Destroy(self: Pointer? /* Beyond.NET.Sample.Source.OperatorTests */)
208810+
208811+
208812+
208813+
208814+
// MARK: - END Beyond.NET.Sample.Source.OperatorTests
208815+
208816+
208744208817
// MARK: - BEGIN Beyond.NET.Sample.Source.OutParameterTests
208745208818
external fun Beyond_NET_Sample_Source_OutParameterTests_Return_Int_1_NonOptional(self: Pointer? /* Beyond.NET.Sample.Source.OutParameterTests */, returnValue: IntByReference /* System.Int32 */, outException: PointerByReference? /* System.Exception */)
208746208819

Samples/Generated/Generated_Swift.swift

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// Number of generated types: 1639
2-
// Number of generated members: 7987
1+
// Number of generated types: 1640
2+
// Number of generated members: 7990
33

44
// MARK: - BEGIN Header
55
import Foundation
@@ -179156,6 +179156,47 @@ public class Beyond_NET_Sample_Source_NestedTypeTests /* Beyond.NET.Sample.Sourc
179156179156
}
179157179157

179158179158

179159+
public class Beyond_NET_Sample_Source_OperatorTests /* Beyond.NET.Sample.Source.OperatorTests */: System_Object {
179160+
public override class var typeName: String { get {
179161+
"OperatorTests"
179162+
}}
179163+
179164+
public override class var fullTypeName: String { get {
179165+
"Beyond.NET.Sample.Source.OperatorTests"
179166+
}}
179167+
179168+
public convenience init() throws {
179169+
179170+
179171+
var __exceptionC: System_Exception_t?
179172+
179173+
let __returnValueC = Beyond_NET_Sample_Source_OperatorTests_Create(&__exceptionC)
179174+
179175+
if let __exceptionC {
179176+
let __exception = System_Exception(handle: __exceptionC)
179177+
let __error = __exception.swiftError
179178+
179179+
throw __error
179180+
}
179181+
179182+
self.init(handle: __returnValueC)
179183+
179184+
}
179185+
179186+
public override class var typeOf: System_Type /* System.Type */ { get {
179187+
return System_Type(handle: Beyond_NET_Sample_Source_OperatorTests_TypeOf())
179188+
179189+
}}
179190+
179191+
internal override func destroy() {
179192+
Beyond_NET_Sample_Source_OperatorTests_Destroy(self.__handle)
179193+
179194+
}
179195+
179196+
179197+
}
179198+
179199+
179159179200
public class Beyond_NET_Sample_Source_OutParameterTests /* Beyond.NET.Sample.Source.OutParameterTests */: System_Object {
179160179201
public override class var typeName: String { get {
179161179202
"OutParameterTests"
@@ -184800,6 +184841,8 @@ public extension Beyond.NET.Sample {
184800184841

184801184842
public typealias NestedTypeTests = Beyond_NET_Sample_Source_NestedTypeTests
184802184843

184844+
public typealias OperatorTests = Beyond_NET_Sample_Source_OperatorTests
184845+
184803184846
public typealias OutParameterTests = Beyond_NET_Sample_Source_OutParameterTests
184804184847

184805184848
public typealias IOverrideTestsInterface = Beyond_NET_Sample_Source_IOverrideTestsInterface

0 commit comments

Comments
 (0)