This repository has been archived by the owner on Jan 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bb36a92
commit deccdec
Showing
4 changed files
with
145 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
test/collision_tests/expected_bindings/_expected_decl_decl_collision_bindings.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
// AUTO GENERATED FILE, DO NOT EDIT. | ||
// | ||
// Generated by `package:ffigen`. | ||
// ignore_for_file: type=lint | ||
import 'dart:ffi' as ffi; | ||
|
||
class Bindings { | ||
/// Holds the symbol lookup function. | ||
final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName) | ||
_lookup; | ||
|
||
/// The symbols are looked up in [dynamicLibrary]. | ||
Bindings(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup; | ||
|
||
/// The symbols are looked up with [lookup]. | ||
Bindings.fromLookup( | ||
ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName) | ||
lookup) | ||
: _lookup = lookup; | ||
|
||
void testFunc() { | ||
return _testFunc(); | ||
} | ||
|
||
late final _testFuncPtr = | ||
_lookup<ffi.NativeFunction<ffi.Void Function()>>('testFunc'); | ||
late final _testFunc = _testFuncPtr.asFunction<void Function()>(); | ||
|
||
void testFunc1() { | ||
return _testFunc1(); | ||
} | ||
|
||
late final _testFunc1Ptr = | ||
_lookup<ffi.NativeFunction<ffi.Void Function()>>('testFunc'); | ||
late final _testFunc1 = _testFunc1Ptr.asFunction<void Function()>(); | ||
|
||
void testCrossDecl1() { | ||
return _testCrossDecl1(); | ||
} | ||
|
||
late final _testCrossDecl1Ptr = | ||
_lookup<ffi.NativeFunction<ffi.Void Function()>>('testCrossDecl'); | ||
late final _testCrossDecl1 = _testCrossDecl1Ptr.asFunction<void Function()>(); | ||
|
||
void ffi1() { | ||
return _ffi1(); | ||
} | ||
|
||
late final _ffi1Ptr = | ||
_lookup<ffi.NativeFunction<ffi.Void Function()>>('ffi1'); | ||
late final _ffi1 = _ffi1Ptr.asFunction<void Function()>(); | ||
} | ||
|
||
final class TestStruct extends ffi.Opaque {} | ||
|
||
final class TestStruct1 extends ffi.Opaque {} | ||
|
||
abstract class TestEnum {} | ||
|
||
abstract class TestEnum1 {} | ||
|
||
const int Test_Macro = 0; | ||
|
||
const int Test_Macro1 = 0; | ||
|
||
typedef testAlias = ffi.Void; | ||
typedef DarttestAlias = void; | ||
typedef testAlias1 = ffi.Void; | ||
typedef DarttestAlias1 = void; | ||
|
||
final class testCrossDecl extends ffi.Opaque {} | ||
|
||
const int testCrossDecl2 = 0; | ||
|
||
abstract class testCrossDecl3 {} | ||
|
||
typedef testCrossDecl4 = ffi.Void; | ||
typedef DarttestCrossDecl = void; | ||
|
||
final class ffi extends ffi.Opaque {} |
61 changes: 61 additions & 0 deletions
61
test/collision_tests/expected_bindings/_expected_reserved_keyword_collision_bindings.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// AUTO GENERATED FILE, DO NOT EDIT. | ||
// | ||
// Generated by `package:ffigen`. | ||
// ignore_for_file: type=lint | ||
import 'dart:ffi' as ffi; | ||
|
||
class Bindings { | ||
/// Holds the symbol lookup function. | ||
final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName) | ||
_lookup; | ||
|
||
/// The symbols are looked up in [dynamicLibrary]. | ||
Bindings(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup; | ||
|
||
/// The symbols are looked up with [lookup]. | ||
Bindings.fromLookup( | ||
ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName) | ||
lookup) | ||
: _lookup = lookup; | ||
|
||
void show1() { | ||
return _show1(); | ||
} | ||
|
||
late final _show1Ptr = | ||
_lookup<ffi.NativeFunction<ffi.Void Function()>>('show'); | ||
late final _show1 = _show1Ptr.asFunction<void Function()>(); | ||
|
||
void implements1( | ||
int if1, | ||
int abstract1, | ||
int in1, | ||
) { | ||
return _implements1( | ||
if1, | ||
abstract1, | ||
in1, | ||
); | ||
} | ||
|
||
late final _implements1Ptr = | ||
_lookup<ffi.NativeFunction<ffi.Void Function(ffi.Int, ffi.Int, ffi.Int)>>( | ||
'implements'); | ||
late final _implements1 = | ||
_implements1Ptr.asFunction<void Function(int, int, int)>(); | ||
} | ||
|
||
final class abstract1 extends ffi.Opaque {} | ||
|
||
final class abstract2 extends ffi.Opaque {} | ||
|
||
final class if1 extends ffi.Opaque {} | ||
|
||
abstract class return1 {} | ||
|
||
abstract class export1 {} | ||
|
||
const int else1 = 0; | ||
|
||
typedef var1 = ffi.Void; | ||
typedef Dartvar = void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters