Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
Fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
liamappelbe committed Oct 10, 2023
1 parent bb36a92 commit deccdec
Show file tree
Hide file tree
Showing 4 changed files with 145 additions and 2 deletions.
3 changes: 2 additions & 1 deletion test/collision_tests/decl_decl_collision_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ void main() {
Struct(name: 'ffi'),
Func(name: 'ffi1', returnType: NativeType(SupportedNativeType.Void)),
]);
matchLibraryWithExpected(library, 'decl_decl_collision_test_output.dart', [
matchLibraryWithExpected(
library, 'decl_decl_collision_test_output.dart', [
'test',
'collision_tests',
'expected_bindings',
Expand Down
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 {}
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;
3 changes: 2 additions & 1 deletion test/collision_tests/reserved_keyword_collision_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ void main() {
),
Typealias(name: 'var', type: NativeType(SupportedNativeType.Void)),
]);
matchLibraryWithExpected(library, 'reserved_keyword_collision_test_output.dart', [
matchLibraryWithExpected(
library, 'reserved_keyword_collision_test_output.dart', [
'test',
'collision_tests',
'expected_bindings',
Expand Down

0 comments on commit deccdec

Please sign in to comment.