[Native][Tests] Move existing CExport tests under the InterfaceV1 dir
To avoid collisions with the future InterfaceNone tests
This commit is contained in:
committed by
Space Team
parent
06c0977408
commit
dd25130464
@@ -0,0 +1,28 @@
|
||||
#include "kt36639_api.h"
|
||||
|
||||
#define __ kt36639_symbols()->
|
||||
#define T_(x) kt36639_kref_ ## x
|
||||
|
||||
|
||||
int
|
||||
main() {
|
||||
T_(CFoo1) foo1 = __ kotlin.root.CFoo1.CFoo1();
|
||||
T_(CFoo2) foo2 = __ kotlin.root.CFoo2.CFoo2();
|
||||
T_(kotlin_Int) intV = __ createNullableInt(42);
|
||||
T_(kotlin_Any) any;
|
||||
T_(Foo) foo = { .pinned = foo1.pinned };
|
||||
|
||||
any.pinned = foo1.pinned;
|
||||
__ kotlin.root.CFoo1.callMe(foo1, any);
|
||||
__ kotlin.root.Foo.extfoo(foo, any);
|
||||
any.pinned = foo2.pinned;
|
||||
__ kotlin.root.CFoo1.callMe(foo1, any);
|
||||
__ kotlin.root.Foo.extfoo(foo, any);
|
||||
any.pinned = intV.pinned;
|
||||
__ kotlin.root.CFoo1.callMe(foo1, any);
|
||||
__ kotlin.root.Foo.extfoo(foo, any);
|
||||
|
||||
__ DisposeStablePointer(foo1.pinned);
|
||||
__ DisposeStablePointer(foo2.pinned);
|
||||
__ DisposeStablePointer(intV.pinned);
|
||||
}
|
||||
Reference in New Issue
Block a user