Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
liamappelbe committed Jan 16, 2025
1 parent 60076c3 commit 5833044
Showing 1 changed file with 47 additions and 42 deletions.
89 changes: 47 additions & 42 deletions pkgs/ffigen/test/collision_tests/decl_decl_collision_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,50 +25,55 @@ void main() {
macroDecl: DeclarationFilters.includeAll,
typedefs: DeclarationFilters.includeAll,
);
final library = Library(name: 'Bindings', bindings: transformBindings(config, [
Struct(name: 'TestStruct'),
Struct(name: 'TestStruct'),
EnumClass(name: 'TestEnum'),
EnumClass(name: 'TestEnum'),
Func(
name: 'testFunc',
returnType: NativeType(SupportedNativeType.voidType)),
Func(
name: 'testFunc',
returnType: NativeType(SupportedNativeType.voidType)),
MacroConstant(
originalName: 'Test_Macro',
name: 'Test_Macro',
rawType: 'int',
rawValue: '0',
),
MacroConstant(
originalName: 'Test_Macro',
name: 'Test_Macro',
rawType: 'int',
rawValue: '0',
),
Typealias(
name: 'testAlias', type: NativeType(SupportedNativeType.voidType)),
Typealias(
name: 'testAlias', type: NativeType(SupportedNativeType.voidType)),
final library = Library(
name: 'Bindings',
bindings: transformBindings(config, [
Struct(name: 'TestStruct'),
Struct(name: 'TestStruct'),
EnumClass(name: 'TestEnum'),
EnumClass(name: 'TestEnum'),
Func(
name: 'testFunc',
returnType: NativeType(SupportedNativeType.voidType)),
Func(
name: 'testFunc',
returnType: NativeType(SupportedNativeType.voidType)),
MacroConstant(
originalName: 'Test_Macro',
name: 'Test_Macro',
rawType: 'int',
rawValue: '0',
),
MacroConstant(
originalName: 'Test_Macro',
name: 'Test_Macro',
rawType: 'int',
rawValue: '0',
),
Typealias(
name: 'testAlias',
type: NativeType(SupportedNativeType.voidType)),
Typealias(
name: 'testAlias',
type: NativeType(SupportedNativeType.voidType)),

/// Conflicts across declarations.
Struct(name: 'testCrossDecl'),
Func(
name: 'testCrossDecl',
returnType: NativeType(SupportedNativeType.voidType)),
MacroConstant(name: 'testCrossDecl', rawValue: '0', rawType: 'int'),
EnumClass(name: 'testCrossDecl'),
Typealias(
name: 'testCrossDecl',
type: NativeType(SupportedNativeType.voidType)),
/// Conflicts across declarations.
Struct(name: 'testCrossDecl'),
Func(
name: 'testCrossDecl',
returnType: NativeType(SupportedNativeType.voidType)),
MacroConstant(name: 'testCrossDecl', rawValue: '0', rawType: 'int'),
EnumClass(name: 'testCrossDecl'),
Typealias(
name: 'testCrossDecl',
type: NativeType(SupportedNativeType.voidType)),

/// Conflicts with ffi library prefix, name of prefix is changed.
Struct(name: 'ffi'),
Func(
name: 'ffi1', returnType: NativeType(SupportedNativeType.voidType)),
]));
/// Conflicts with ffi library prefix, name of prefix is changed.
Struct(name: 'ffi'),
Func(
name: 'ffi1',
returnType: NativeType(SupportedNativeType.voidType)),
]));
matchLibraryWithExpected(
library, 'decl_decl_collision_test_output.dart', [
'test',
Expand Down

0 comments on commit 5833044

Please sign in to comment.