From 4e767832dd0006c60af0ffe7980786b3035a48ed Mon Sep 17 00:00:00 2001 From: Daniel Kamkha Date: Mon, 8 Nov 2021 15:34:07 +0100 Subject: [PATCH] Update smoke tests for type alias support in Dart See: #907 Signed-off-by: Daniel Kamkha --- .../output/dart/lib/src/smoke/comments.dart | 44 ++++---- .../lib/src/smoke/comments_interface.dart | 104 +++++++++--------- .../dart/lib/src/smoke/comments_links.dart | 4 +- .../lib/src/smoke/deprecation_comments.dart | 41 +++---- .../src/smoke/deprecation_comments_only.dart | 40 +++---- .../dart/lib/src/smoke/excluded_comments.dart | 21 ++-- .../lib/src/smoke/excluded_comments_only.dart | 18 +-- .../dart/lib/src/smoke/unicode_comments.dart | 6 +- .../lib/src/generic_types__conversion.dart | 21 ++-- .../output/dart/lib/src/smoke/dates.dart | 3 + .../dart/lib/src/smoke/dates_steady.dart | 21 ++-- .../dart/lib/src/smoke/default_values.dart | 23 ++-- .../struct_with_initializer_defaults.dart | 7 +- .../lib/src/smoke/duration_milliseconds.dart | 6 + .../dart/lib/src/smoke/duration_seconds.dart | 6 + .../output/dart/lib/src/smoke/enums.dart | 2 + .../output/dart/lib/src/smoke/equatable.dart | 5 +- .../output/dart/lib/src/package/class.dart | 6 +- .../output/dart/lib/src/package/types.dart | 2 + .../smoke/generic_types_with_basic_types.dart | 15 ++- .../lib/src/smoke/calculator_listener.dart | 11 +- .../src/smoke/listener_with_properties.dart | 21 ++-- .../smoke/listeners_with_return_values.dart | 13 ++- .../output/dart/lib/src/smoke/locales.dart | 6 + .../dart/lib/src/smoke/method_overloads.dart | 14 ++- .../dart/lib/src/smoke/use_free_types.dart | 7 +- .../output/dart/lib/src/smoke/nullable.dart | 30 ++--- .../output/dart/lib/src/smoke/wee_types.dart | 1 + .../output/dart/lib/src/smoke/structs.dart | 3 +- .../dart/lib/src/smoke/public_class.dart | 14 ++- 30 files changed, 292 insertions(+), 223 deletions(-) diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments.dart index 0c1d9b86c9..2963bc9765 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments.dart @@ -8,29 +8,29 @@ import 'package:meta/meta.dart'; abstract class Comments { /// This is some very useful constant. - static final bool veryUseful = true; + static final Comments_Usefulness veryUseful = true; /// This is some very useful method that measures the usefulness of its input. /// /// [inputParameter] Very useful input parameter /// - /// Returns [bool]. Usefulness of the input + /// Returns [Comments_Usefulness]. Usefulness of the input /// /// Throws [Comments_SomethingWrongException]. Sometimes it happens. /// - bool someMethodWithAllComments(String inputParameter); + Comments_Usefulness someMethodWithAllComments(String inputParameter); /// This is some very useful method that measures the usefulness of its input. /// /// [input] Very useful input parameter /// - bool someMethodWithInputComments(String input); + Comments_Usefulness someMethodWithInputComments(String input); /// This is some very useful method that measures the usefulness of its input. /// - /// Returns [bool]. Usefulness of the input + /// Returns [Comments_Usefulness]. Usefulness of the input /// - bool someMethodWithOutputComments(String input); + Comments_Usefulness someMethodWithOutputComments(String input); /// This is some very useful method that measures the usefulness of its input. /// - bool someMethodWithNoComments(String input); + Comments_Usefulness someMethodWithNoComments(String input); /// This is some very useful method that does not measure the usefulness of its input. /// /// [input] Very useful input parameter @@ -41,12 +41,12 @@ abstract class Comments { void someMethodWithoutReturnTypeWithNoComments(String input); /// This is some very useful method that measures the usefulness of something. /// - /// Returns [bool]. Usefulness of the input + /// Returns [Comments_Usefulness]. Usefulness of the input /// - bool someMethodWithoutInputParametersWithAllComments(); + Comments_Usefulness someMethodWithoutInputParametersWithAllComments(); /// This is some very useful method that measures the usefulness of something. /// - bool someMethodWithoutInputParametersWithNoComments(); + Comments_Usefulness someMethodWithoutInputParametersWithNoComments(); void someMethodWithNothing(); /// This is some very useful method that does nothing. /// @@ -58,10 +58,12 @@ abstract class Comments { /// String returnCommentOnly(String undocumented); /// Gets some very useful property. - bool get isSomeProperty; + Comments_Usefulness get isSomeProperty; /// Sets some very useful property. - set isSomeProperty(bool value); + set isSomeProperty(Comments_Usefulness value); } +/// This is some very useful typedef. +typedef Comments_Usefulness = bool; /// This is some very useful enum. enum Comments_SomeEnum { /// Not quite useful @@ -129,7 +131,7 @@ class Comments_SomethingWrongException implements Exception { class Comments_SomeStruct { /// How useful this struct is /// remains to be seen - bool someField; + Comments_Usefulness someField; /// Can be `null` String? nullableField; /// This is how easy it is to construct. @@ -354,7 +356,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { Comments$Impl(Pointer handle) : super(handle); @override - bool someMethodWithAllComments(String inputParameter) { + Comments_Usefulness someMethodWithAllComments(String inputParameter) { final _someMethodWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_Comments_someMethodWithAllComments__String')); final _inputParameterHandle = stringToFfi(inputParameter); final _handle = this.handle; @@ -378,7 +380,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { } } @override - bool someMethodWithInputComments(String input) { + Comments_Usefulness someMethodWithInputComments(String input) { final _someMethodWithInputCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_Comments_someMethodWithInputComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -391,7 +393,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { } } @override - bool someMethodWithOutputComments(String input) { + Comments_Usefulness someMethodWithOutputComments(String input) { final _someMethodWithOutputCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_Comments_someMethodWithOutputComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -404,7 +406,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { } } @override - bool someMethodWithNoComments(String input) { + Comments_Usefulness someMethodWithNoComments(String input) { final _someMethodWithNoCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_Comments_someMethodWithNoComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -433,7 +435,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { stringReleaseFfiHandle(_inputHandle); } @override - bool someMethodWithoutInputParametersWithAllComments() { + Comments_Usefulness someMethodWithoutInputParametersWithAllComments() { final _someMethodWithoutInputParametersWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_Comments_someMethodWithoutInputParametersWithAllComments')); final _handle = this.handle; final __resultHandle = _someMethodWithoutInputParametersWithAllCommentsFfi(_handle, __lib.LibraryContext.isolateId); @@ -444,7 +446,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { } } @override - bool someMethodWithoutInputParametersWithNoComments() { + Comments_Usefulness someMethodWithoutInputParametersWithNoComments() { final _someMethodWithoutInputParametersWithNoCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_Comments_someMethodWithoutInputParametersWithNoComments')); final _handle = this.handle; final __resultHandle = _someMethodWithoutInputParametersWithNoCommentsFfi(_handle, __lib.LibraryContext.isolateId); @@ -495,7 +497,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { } } @override - bool get isSomeProperty { + Comments_Usefulness get isSomeProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_Comments_isSomeProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -506,7 +508,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments { } } @override - set isSomeProperty(bool value) { + set isSomeProperty(Comments_Usefulness value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Uint8), void Function(Pointer, int, int)>('library_smoke_Comments_isSomeProperty_set__Boolean')); final _valueHandle = booleanToFfi(value); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_interface.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_interface.dart index cfa480cd57..97ee8b53fb 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_interface.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_interface.dart @@ -8,18 +8,18 @@ import 'package:library/src/builtin_types__conversion.dart'; abstract class CommentsInterface { /// This is some very useful interface. factory CommentsInterface( - bool Function(String) someMethodWithAllCommentsLambda, - bool Function(String) someMethodWithInputCommentsLambda, - bool Function(String) someMethodWithOutputCommentsLambda, - bool Function(String) someMethodWithNoCommentsLambda, + CommentsInterface_Usefulness Function(String) someMethodWithAllCommentsLambda, + CommentsInterface_Usefulness Function(String) someMethodWithInputCommentsLambda, + CommentsInterface_Usefulness Function(String) someMethodWithOutputCommentsLambda, + CommentsInterface_Usefulness Function(String) someMethodWithNoCommentsLambda, void Function(String) someMethodWithoutReturnTypeWithAllCommentsLambda, void Function(String) someMethodWithoutReturnTypeWithNoCommentsLambda, - bool Function() someMethodWithoutInputParametersWithAllCommentsLambda, - bool Function() someMethodWithoutInputParametersWithNoCommentsLambda, + CommentsInterface_Usefulness Function() someMethodWithoutInputParametersWithAllCommentsLambda, + CommentsInterface_Usefulness Function() someMethodWithoutInputParametersWithNoCommentsLambda, void Function() someMethodWithNothingLambda, void Function() someMethodWithoutReturnTypeOrInputParametersLambda, - bool Function() isSomePropertyGetLambda, - void Function(bool) isSomePropertySetLambda + CommentsInterface_Usefulness Function() isSomePropertyGetLambda, + void Function(CommentsInterface_Usefulness) isSomePropertySetLambda ) => CommentsInterface$Lambdas( someMethodWithAllCommentsLambda, someMethodWithInputCommentsLambda, @@ -36,27 +36,27 @@ abstract class CommentsInterface { ); /// This is some very useful constant. - static final bool veryUseful = true; + static final CommentsInterface_Usefulness veryUseful = true; /// This is some very useful method that measures the usefulness of its input. /// /// [input] Very useful input parameter /// - /// Returns [bool]. Usefulness of the input + /// Returns [CommentsInterface_Usefulness]. Usefulness of the input /// - bool someMethodWithAllComments(String input); + CommentsInterface_Usefulness someMethodWithAllComments(String input); /// This is some very useful method that measures the usefulness of its input. /// /// [input] Very useful input parameter /// - bool someMethodWithInputComments(String input); + CommentsInterface_Usefulness someMethodWithInputComments(String input); /// This is some very useful method that measures the usefulness of its input. /// - /// Returns [bool]. Usefulness of the input + /// Returns [CommentsInterface_Usefulness]. Usefulness of the input /// - bool someMethodWithOutputComments(String input); + CommentsInterface_Usefulness someMethodWithOutputComments(String input); /// This is some very useful method that measures the usefulness of its input. /// - bool someMethodWithNoComments(String input); + CommentsInterface_Usefulness someMethodWithNoComments(String input); /// This is some very useful method that does not measure the usefulness of its input. /// /// [input] Very useful input parameter @@ -67,21 +67,23 @@ abstract class CommentsInterface { void someMethodWithoutReturnTypeWithNoComments(String input); /// This is some very useful method that measures the usefulness of something. /// - /// Returns [bool]. Usefulness of the input + /// Returns [CommentsInterface_Usefulness]. Usefulness of the input /// - bool someMethodWithoutInputParametersWithAllComments(); + CommentsInterface_Usefulness someMethodWithoutInputParametersWithAllComments(); /// This is some very useful method that measures the usefulness of something. /// - bool someMethodWithoutInputParametersWithNoComments(); + CommentsInterface_Usefulness someMethodWithoutInputParametersWithNoComments(); void someMethodWithNothing(); /// This is some very useful method that does nothing. /// void someMethodWithoutReturnTypeOrInputParameters(); /// Gets some very useful property. - bool get isSomeProperty; + CommentsInterface_Usefulness get isSomeProperty; /// Sets some very useful property. - set isSomeProperty(bool value); + set isSomeProperty(CommentsInterface_Usefulness value); } +/// This is some very useful typedef. +typedef CommentsInterface_Usefulness = bool; /// This is some very useful enum. enum CommentsInterface_SomeEnum { /// Not quite useful @@ -143,7 +145,7 @@ void smokeCommentsinterfaceSomeenumReleaseFfiHandleNullable(Pointer handle /// This is some very useful struct. class CommentsInterface_SomeStruct { /// How useful this struct is - bool someField; + CommentsInterface_Usefulness someField; CommentsInterface_SomeStruct(this.someField); } // CommentsInterface_SomeStruct "private" section, not exported. @@ -228,18 +230,18 @@ final _smokeCommentsinterfaceGetTypeId = __lib.catchArgumentError(() => __lib.na Pointer Function(Pointer) >('library_smoke_CommentsInterface_get_type_id')); class CommentsInterface$Lambdas implements CommentsInterface { - bool Function(String) someMethodWithAllCommentsLambda; - bool Function(String) someMethodWithInputCommentsLambda; - bool Function(String) someMethodWithOutputCommentsLambda; - bool Function(String) someMethodWithNoCommentsLambda; + CommentsInterface_Usefulness Function(String) someMethodWithAllCommentsLambda; + CommentsInterface_Usefulness Function(String) someMethodWithInputCommentsLambda; + CommentsInterface_Usefulness Function(String) someMethodWithOutputCommentsLambda; + CommentsInterface_Usefulness Function(String) someMethodWithNoCommentsLambda; void Function(String) someMethodWithoutReturnTypeWithAllCommentsLambda; void Function(String) someMethodWithoutReturnTypeWithNoCommentsLambda; - bool Function() someMethodWithoutInputParametersWithAllCommentsLambda; - bool Function() someMethodWithoutInputParametersWithNoCommentsLambda; + CommentsInterface_Usefulness Function() someMethodWithoutInputParametersWithAllCommentsLambda; + CommentsInterface_Usefulness Function() someMethodWithoutInputParametersWithNoCommentsLambda; void Function() someMethodWithNothingLambda; void Function() someMethodWithoutReturnTypeOrInputParametersLambda; - bool Function() isSomePropertyGetLambda; - void Function(bool) isSomePropertySetLambda; + CommentsInterface_Usefulness Function() isSomePropertyGetLambda; + void Function(CommentsInterface_Usefulness) isSomePropertySetLambda; CommentsInterface$Lambdas( this.someMethodWithAllCommentsLambda, this.someMethodWithInputCommentsLambda, @@ -256,16 +258,16 @@ class CommentsInterface$Lambdas implements CommentsInterface { ); @override - bool someMethodWithAllComments(String input) => + CommentsInterface_Usefulness someMethodWithAllComments(String input) => someMethodWithAllCommentsLambda(input); @override - bool someMethodWithInputComments(String input) => + CommentsInterface_Usefulness someMethodWithInputComments(String input) => someMethodWithInputCommentsLambda(input); @override - bool someMethodWithOutputComments(String input) => + CommentsInterface_Usefulness someMethodWithOutputComments(String input) => someMethodWithOutputCommentsLambda(input); @override - bool someMethodWithNoComments(String input) => + CommentsInterface_Usefulness someMethodWithNoComments(String input) => someMethodWithNoCommentsLambda(input); @override void someMethodWithoutReturnTypeWithAllComments(String input) => @@ -274,10 +276,10 @@ class CommentsInterface$Lambdas implements CommentsInterface { void someMethodWithoutReturnTypeWithNoComments(String input) => someMethodWithoutReturnTypeWithNoCommentsLambda(input); @override - bool someMethodWithoutInputParametersWithAllComments() => + CommentsInterface_Usefulness someMethodWithoutInputParametersWithAllComments() => someMethodWithoutInputParametersWithAllCommentsLambda(); @override - bool someMethodWithoutInputParametersWithNoComments() => + CommentsInterface_Usefulness someMethodWithoutInputParametersWithNoComments() => someMethodWithoutInputParametersWithNoCommentsLambda(); @override void someMethodWithNothing() => @@ -286,15 +288,15 @@ class CommentsInterface$Lambdas implements CommentsInterface { void someMethodWithoutReturnTypeOrInputParameters() => someMethodWithoutReturnTypeOrInputParametersLambda(); @override - bool get isSomeProperty => isSomePropertyGetLambda(); + CommentsInterface_Usefulness get isSomeProperty => isSomePropertyGetLambda(); @override - set isSomeProperty(bool value) => isSomePropertySetLambda(value); + set isSomeProperty(CommentsInterface_Usefulness value) => isSomePropertySetLambda(value); } class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterface { CommentsInterface$Impl(Pointer handle) : super(handle); @override - bool someMethodWithAllComments(String input) { + CommentsInterface_Usefulness someMethodWithAllComments(String input) { final _someMethodWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_CommentsInterface_someMethodWithAllComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -307,7 +309,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa } } @override - bool someMethodWithInputComments(String input) { + CommentsInterface_Usefulness someMethodWithInputComments(String input) { final _someMethodWithInputCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_CommentsInterface_someMethodWithInputComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -320,7 +322,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa } } @override - bool someMethodWithOutputComments(String input) { + CommentsInterface_Usefulness someMethodWithOutputComments(String input) { final _someMethodWithOutputCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_CommentsInterface_someMethodWithOutputComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -333,7 +335,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa } } @override - bool someMethodWithNoComments(String input) { + CommentsInterface_Usefulness someMethodWithNoComments(String input) { final _someMethodWithNoCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_CommentsInterface_someMethodWithNoComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -362,7 +364,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa stringReleaseFfiHandle(_inputHandle); } @override - bool someMethodWithoutInputParametersWithAllComments() { + CommentsInterface_Usefulness someMethodWithoutInputParametersWithAllComments() { final _someMethodWithoutInputParametersWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_CommentsInterface_someMethodWithoutInputParametersWithAllComments')); final _handle = this.handle; final __resultHandle = _someMethodWithoutInputParametersWithAllCommentsFfi(_handle, __lib.LibraryContext.isolateId); @@ -373,7 +375,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa } } @override - bool someMethodWithoutInputParametersWithNoComments() { + CommentsInterface_Usefulness someMethodWithoutInputParametersWithNoComments() { final _someMethodWithoutInputParametersWithNoCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_CommentsInterface_someMethodWithoutInputParametersWithNoComments')); final _handle = this.handle; final __resultHandle = _someMethodWithoutInputParametersWithNoCommentsFfi(_handle, __lib.LibraryContext.isolateId); @@ -396,7 +398,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa _someMethodWithoutReturnTypeOrInputParametersFfi(_handle, __lib.LibraryContext.isolateId); } /// Gets some very useful property. - bool get isSomeProperty { + CommentsInterface_Usefulness get isSomeProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_CommentsInterface_isSomeProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -407,7 +409,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa } } /// Sets some very useful property. - set isSomeProperty(bool value) { + set isSomeProperty(CommentsInterface_Usefulness value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Uint8), void Function(Pointer, int, int)>('library_smoke_CommentsInterface_isSomeProperty_set__Boolean')); final _valueHandle = booleanToFfi(value); final _handle = this.handle; @@ -416,7 +418,7 @@ class CommentsInterface$Impl extends __lib.NativeBase implements CommentsInterfa } } int _smokeCommentsinterfacesomeMethodWithAllCommentsStatic(Object _obj, Pointer input, Pointer _result) { - bool? _resultObject; + CommentsInterface_Usefulness? _resultObject; try { _resultObject = (_obj as CommentsInterface).someMethodWithAllComments(stringFromFfi(input)); _result.value = booleanToFfi(_resultObject); @@ -426,7 +428,7 @@ int _smokeCommentsinterfacesomeMethodWithAllCommentsStatic(Object _obj, Pointer< return 0; } int _smokeCommentsinterfacesomeMethodWithInputCommentsStatic(Object _obj, Pointer input, Pointer _result) { - bool? _resultObject; + CommentsInterface_Usefulness? _resultObject; try { _resultObject = (_obj as CommentsInterface).someMethodWithInputComments(stringFromFfi(input)); _result.value = booleanToFfi(_resultObject); @@ -436,7 +438,7 @@ int _smokeCommentsinterfacesomeMethodWithInputCommentsStatic(Object _obj, Pointe return 0; } int _smokeCommentsinterfacesomeMethodWithOutputCommentsStatic(Object _obj, Pointer input, Pointer _result) { - bool? _resultObject; + CommentsInterface_Usefulness? _resultObject; try { _resultObject = (_obj as CommentsInterface).someMethodWithOutputComments(stringFromFfi(input)); _result.value = booleanToFfi(_resultObject); @@ -446,7 +448,7 @@ int _smokeCommentsinterfacesomeMethodWithOutputCommentsStatic(Object _obj, Point return 0; } int _smokeCommentsinterfacesomeMethodWithNoCommentsStatic(Object _obj, Pointer input, Pointer _result) { - bool? _resultObject; + CommentsInterface_Usefulness? _resultObject; try { _resultObject = (_obj as CommentsInterface).someMethodWithNoComments(stringFromFfi(input)); _result.value = booleanToFfi(_resultObject); @@ -472,7 +474,7 @@ int _smokeCommentsinterfacesomeMethodWithoutReturnTypeWithNoCommentsStatic(Objec return 0; } int _smokeCommentsinterfacesomeMethodWithoutInputParametersWithAllCommentsStatic(Object _obj, Pointer _result) { - bool? _resultObject; + CommentsInterface_Usefulness? _resultObject; try { _resultObject = (_obj as CommentsInterface).someMethodWithoutInputParametersWithAllComments(); _result.value = booleanToFfi(_resultObject); @@ -481,7 +483,7 @@ int _smokeCommentsinterfacesomeMethodWithoutInputParametersWithAllCommentsStatic return 0; } int _smokeCommentsinterfacesomeMethodWithoutInputParametersWithNoCommentsStatic(Object _obj, Pointer _result) { - bool? _resultObject; + CommentsInterface_Usefulness? _resultObject; try { _resultObject = (_obj as CommentsInterface).someMethodWithoutInputParametersWithNoComments(); _result.value = booleanToFfi(_resultObject); diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_links.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_links.dart index 4509179cb5..a24298bea1 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_links.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments_links.dart @@ -39,8 +39,8 @@ abstract class CommentsLinks { /// * nested lists /// /// Not working for Java: - /// * typedef: [bool] - /// * top level typedef: [bool] + /// * typedef: [Comments_Usefulness] + /// * top level typedef: [TypeCollectionTypedef] /// /// Not working for Swift: /// * named comment: [][Comments.veryUseful] diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments.dart index c17ebd793c..db0e9b913c 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments.dart @@ -10,9 +10,9 @@ abstract class DeprecationComments { /// This is some very useful interface. @Deprecated("Unfortunately, this interface is deprecated. Use [Comments] instead.") factory DeprecationComments( - bool Function(String) someMethodWithAllCommentsLambda, - bool Function() isSomePropertyGetLambda, - void Function(bool) isSomePropertySetLambda, + DeprecationComments_Usefulness Function(String) someMethodWithAllCommentsLambda, + DeprecationComments_Usefulness Function() isSomePropertyGetLambda, + void Function(DeprecationComments_Usefulness) isSomePropertySetLambda, String Function() propertyButNotAccessorsGetLambda, void Function(String) propertyButNotAccessorsSetLambda ) => DeprecationComments$Lambdas( @@ -25,27 +25,30 @@ abstract class DeprecationComments { /// This is some very useful constant. @Deprecated("Unfortunately, this constant is deprecated. Use [Comments.veryUseful] instead.") - static final bool veryUseful = true; + static final DeprecationComments_Usefulness veryUseful = true; /// This is some very useful method that measures the usefulness of its input. /// /// [input] Very useful input parameter /// - /// Returns [bool]. Usefulness of the input + /// Returns [DeprecationComments_Usefulness]. Usefulness of the input /// @Deprecated("Unfortunately, this method is deprecated.\nUse [Comments.someMethodWithAllComments] instead.") - bool someMethodWithAllComments(String input); + DeprecationComments_Usefulness someMethodWithAllComments(String input); /// Gets some very useful property. @Deprecated("Unfortunately, this property's getter is deprecated.\nUse [Comments.isSomeProperty] instead.") - bool get isSomeProperty; + DeprecationComments_Usefulness get isSomeProperty; /// Sets some very useful property. @Deprecated("Unfortunately, this property's setter is deprecated.\nUse [Comments.isSomeProperty] instead.") - set isSomeProperty(bool value); + set isSomeProperty(DeprecationComments_Usefulness value); /// Gets the property but not accessors. @Deprecated("Will be removed in v3.2.1.") String get propertyButNotAccessors; @Deprecated("Will be removed in v3.2.1.") set propertyButNotAccessors(String value); } +/// This is some very useful typedef. +@Deprecated("Unfortunately, this typedef is deprecated. Use [Comments_Usefulness] instead.") +typedef DeprecationComments_Usefulness = bool; /// This is some very useful enum. @Deprecated("Unfortunately, this enum is deprecated. Use [Comments_SomeEnum] instead.") enum DeprecationComments_SomeEnum { @@ -110,7 +113,7 @@ class DeprecationComments_SomethingWrongException implements Exception { class DeprecationComments_SomeStruct { /// How useful this struct is. @Deprecated("Unfortunately, this field is deprecated.\nUse [Comments_SomeStruct.someField] instead.") - bool someField; + DeprecationComments_Usefulness someField; DeprecationComments_SomeStruct(this.someField); } // DeprecationComments_SomeStruct "private" section, not exported. @@ -195,9 +198,9 @@ final _smokeDeprecationcommentsGetTypeId = __lib.catchArgumentError(() => __lib. Pointer Function(Pointer) >('library_smoke_DeprecationComments_get_type_id')); class DeprecationComments$Lambdas implements DeprecationComments { - bool Function(String) someMethodWithAllCommentsLambda; - bool Function() isSomePropertyGetLambda; - void Function(bool) isSomePropertySetLambda; + DeprecationComments_Usefulness Function(String) someMethodWithAllCommentsLambda; + DeprecationComments_Usefulness Function() isSomePropertyGetLambda; + void Function(DeprecationComments_Usefulness) isSomePropertySetLambda; String Function() propertyButNotAccessorsGetLambda; void Function(String) propertyButNotAccessorsSetLambda; DeprecationComments$Lambdas( @@ -209,12 +212,12 @@ class DeprecationComments$Lambdas implements DeprecationComments { ); @override - bool someMethodWithAllComments(String input) => + DeprecationComments_Usefulness someMethodWithAllComments(String input) => someMethodWithAllCommentsLambda(input); @override - bool get isSomeProperty => isSomePropertyGetLambda(); + DeprecationComments_Usefulness get isSomeProperty => isSomePropertyGetLambda(); @override - set isSomeProperty(bool value) => isSomePropertySetLambda(value); + set isSomeProperty(DeprecationComments_Usefulness value) => isSomePropertySetLambda(value); @override String get propertyButNotAccessors => propertyButNotAccessorsGetLambda(); @override @@ -224,7 +227,7 @@ class DeprecationComments$Impl extends __lib.NativeBase implements DeprecationCo DeprecationComments$Impl(Pointer handle) : super(handle); @override - bool someMethodWithAllComments(String input) { + DeprecationComments_Usefulness someMethodWithAllComments(String input) { final _someMethodWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_DeprecationComments_someMethodWithAllComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -238,7 +241,7 @@ class DeprecationComments$Impl extends __lib.NativeBase implements DeprecationCo } /// Gets some very useful property. @Deprecated("Unfortunately, this property's getter is deprecated.\nUse [Comments.isSomeProperty] instead.") - bool get isSomeProperty { + DeprecationComments_Usefulness get isSomeProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_DeprecationComments_isSomeProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -250,7 +253,7 @@ class DeprecationComments$Impl extends __lib.NativeBase implements DeprecationCo } /// Sets some very useful property. @Deprecated("Unfortunately, this property's setter is deprecated.\nUse [Comments.isSomeProperty] instead.") - set isSomeProperty(bool value) { + set isSomeProperty(DeprecationComments_Usefulness value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Uint8), void Function(Pointer, int, int)>('library_smoke_DeprecationComments_isSomeProperty_set__Boolean')); final _valueHandle = booleanToFfi(value); final _handle = this.handle; @@ -279,7 +282,7 @@ class DeprecationComments$Impl extends __lib.NativeBase implements DeprecationCo } } int _smokeDeprecationcommentssomeMethodWithAllCommentsStatic(Object _obj, Pointer input, Pointer _result) { - bool? _resultObject; + DeprecationComments_Usefulness? _resultObject; try { _resultObject = (_obj as DeprecationComments).someMethodWithAllComments(stringFromFfi(input)); _result.value = booleanToFfi(_resultObject); diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments_only.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments_only.dart index 32b00fec9a..fa0c1ac2f8 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments_only.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/deprecation_comments_only.dart @@ -8,9 +8,9 @@ import 'package:library/src/builtin_types__conversion.dart'; abstract class DeprecationCommentsOnly { @Deprecated("Unfortunately, this interface is deprecated.") factory DeprecationCommentsOnly( - bool Function(String) someMethodWithAllCommentsLambda, - bool Function() isSomePropertyGetLambda, - void Function(bool) isSomePropertySetLambda + DeprecationCommentsOnly_Usefulness Function(String) someMethodWithAllCommentsLambda, + DeprecationCommentsOnly_Usefulness Function() isSomePropertyGetLambda, + void Function(DeprecationCommentsOnly_Usefulness) isSomePropertySetLambda ) => DeprecationCommentsOnly$Lambdas( someMethodWithAllCommentsLambda, isSomePropertyGetLambda, @@ -18,18 +18,20 @@ abstract class DeprecationCommentsOnly { ); @Deprecated("Unfortunately, this constant is deprecated.") - static final bool veryUseful = true; + static final DeprecationCommentsOnly_Usefulness veryUseful = true; /// [input] Very useful input parameter /// - /// Returns [bool]. Usefulness of the input + /// Returns [DeprecationCommentsOnly_Usefulness]. Usefulness of the input /// @Deprecated("Unfortunately, this method is deprecated.") - bool someMethodWithAllComments(String input); + DeprecationCommentsOnly_Usefulness someMethodWithAllComments(String input); @Deprecated("Unfortunately, this property's getter is deprecated.") - bool get isSomeProperty; + DeprecationCommentsOnly_Usefulness get isSomeProperty; @Deprecated("Unfortunately, this property's setter is deprecated.") - set isSomeProperty(bool value); + set isSomeProperty(DeprecationCommentsOnly_Usefulness value); } +@Deprecated("Unfortunately, this typedef is deprecated.") +typedef DeprecationCommentsOnly_Usefulness = bool; @Deprecated("Unfortunately, this enum is deprecated.") enum DeprecationCommentsOnly_SomeEnum { @Deprecated("Unfortunately, this item is deprecated.") @@ -85,7 +87,7 @@ void smokeDeprecationcommentsonlySomeenumReleaseFfiHandleNullable(Pointer @Deprecated("Unfortunately, this struct is deprecated.") class DeprecationCommentsOnly_SomeStruct { @Deprecated("Unfortunately, this field is deprecated.") - bool someField; + DeprecationCommentsOnly_Usefulness someField; DeprecationCommentsOnly_SomeStruct(this.someField); } // DeprecationCommentsOnly_SomeStruct "private" section, not exported. @@ -170,9 +172,9 @@ final _smokeDeprecationcommentsonlyGetTypeId = __lib.catchArgumentError(() => __ Pointer Function(Pointer) >('library_smoke_DeprecationCommentsOnly_get_type_id')); class DeprecationCommentsOnly$Lambdas implements DeprecationCommentsOnly { - bool Function(String) someMethodWithAllCommentsLambda; - bool Function() isSomePropertyGetLambda; - void Function(bool) isSomePropertySetLambda; + DeprecationCommentsOnly_Usefulness Function(String) someMethodWithAllCommentsLambda; + DeprecationCommentsOnly_Usefulness Function() isSomePropertyGetLambda; + void Function(DeprecationCommentsOnly_Usefulness) isSomePropertySetLambda; DeprecationCommentsOnly$Lambdas( this.someMethodWithAllCommentsLambda, this.isSomePropertyGetLambda, @@ -180,18 +182,18 @@ class DeprecationCommentsOnly$Lambdas implements DeprecationCommentsOnly { ); @override - bool someMethodWithAllComments(String input) => + DeprecationCommentsOnly_Usefulness someMethodWithAllComments(String input) => someMethodWithAllCommentsLambda(input); @override - bool get isSomeProperty => isSomePropertyGetLambda(); + DeprecationCommentsOnly_Usefulness get isSomeProperty => isSomePropertyGetLambda(); @override - set isSomeProperty(bool value) => isSomePropertySetLambda(value); + set isSomeProperty(DeprecationCommentsOnly_Usefulness value) => isSomePropertySetLambda(value); } class DeprecationCommentsOnly$Impl extends __lib.NativeBase implements DeprecationCommentsOnly { DeprecationCommentsOnly$Impl(Pointer handle) : super(handle); @override - bool someMethodWithAllComments(String input) { + DeprecationCommentsOnly_Usefulness someMethodWithAllComments(String input) { final _someMethodWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_DeprecationCommentsOnly_someMethodWithAllComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; @@ -204,7 +206,7 @@ class DeprecationCommentsOnly$Impl extends __lib.NativeBase implements Deprecati } } @Deprecated("Unfortunately, this property's getter is deprecated.") - bool get isSomeProperty { + DeprecationCommentsOnly_Usefulness get isSomeProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_DeprecationCommentsOnly_isSomeProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -215,7 +217,7 @@ class DeprecationCommentsOnly$Impl extends __lib.NativeBase implements Deprecati } } @Deprecated("Unfortunately, this property's setter is deprecated.") - set isSomeProperty(bool value) { + set isSomeProperty(DeprecationCommentsOnly_Usefulness value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Uint8), void Function(Pointer, int, int)>('library_smoke_DeprecationCommentsOnly_isSomeProperty_set__Boolean')); final _valueHandle = booleanToFfi(value); final _handle = this.handle; @@ -224,7 +226,7 @@ class DeprecationCommentsOnly$Impl extends __lib.NativeBase implements Deprecati } } int _smokeDeprecationcommentsonlysomeMethodWithAllCommentsStatic(Object _obj, Pointer input, Pointer _result) { - bool? _resultObject; + DeprecationCommentsOnly_Usefulness? _resultObject; try { _resultObject = (_obj as DeprecationCommentsOnly).someMethodWithAllComments(stringFromFfi(input)); _result.value = booleanToFfi(_resultObject); diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments.dart index 136edc20d8..47058ef325 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments.dart @@ -9,28 +9,31 @@ abstract class ExcludedComments { /// This is some very useful constant. /// @nodoc - static final bool veryUseful = true; + static final ExcludedComments_Usefulness veryUseful = true; /// This is some very useful method that measures the usefulness of its input. /// /// [inputParameter] Very useful input parameter /// - /// Returns [bool]. Usefulness of the input + /// Returns [ExcludedComments_Usefulness]. Usefulness of the input /// /// Throws [ExcludedComments_SomethingWrongException]. Sometimes it happens. /// /// @nodoc - bool someMethodWithAllComments(String inputParameter); + ExcludedComments_Usefulness someMethodWithAllComments(String inputParameter); /// This is some very useful method that does nothing. /// /// @nodoc void someMethodWithoutReturnTypeOrInputParameters(); /// Gets some very useful property. /// @nodoc - bool get isSomeProperty; + ExcludedComments_Usefulness get isSomeProperty; /// Sets some very useful property. /// @nodoc - set isSomeProperty(bool value); + set isSomeProperty(ExcludedComments_Usefulness value); } +/// This is some very useful typealias. +/// @nodoc +typedef ExcludedComments_Usefulness = bool; /// This is some very useful enum. /// @nodoc enum ExcludedComments_SomeEnum { @@ -97,7 +100,7 @@ class ExcludedComments_SomeStruct { /// How useful this struct is /// remains to be seen /// @nodoc - bool someField; + ExcludedComments_Usefulness someField; /// This is how easy it is to construct. /// [someField] How useful this struct is /// remains to be seen @@ -288,7 +291,7 @@ class ExcludedComments$Impl extends __lib.NativeBase implements ExcludedComments ExcludedComments$Impl(Pointer handle) : super(handle); @override - bool someMethodWithAllComments(String inputParameter) { + ExcludedComments_Usefulness someMethodWithAllComments(String inputParameter) { final _someMethodWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_ExcludedComments_someMethodWithAllComments__String')); final _inputParameterHandle = stringToFfi(inputParameter); final _handle = this.handle; @@ -318,7 +321,7 @@ class ExcludedComments$Impl extends __lib.NativeBase implements ExcludedComments _someMethodWithoutReturnTypeOrInputParametersFfi(_handle, __lib.LibraryContext.isolateId); } @override - bool get isSomeProperty { + ExcludedComments_Usefulness get isSomeProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_ExcludedComments_isSomeProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -329,7 +332,7 @@ class ExcludedComments$Impl extends __lib.NativeBase implements ExcludedComments } } @override - set isSomeProperty(bool value) { + set isSomeProperty(ExcludedComments_Usefulness value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Uint8), void Function(Pointer, int, int)>('library_smoke_ExcludedComments_isSomeProperty_set__Boolean')); final _valueHandle = booleanToFfi(value); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments_only.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments_only.dart index 3f36cb576b..f7d00868f6 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments_only.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/excluded_comments_only.dart @@ -7,17 +7,19 @@ import 'package:library/src/builtin_types__conversion.dart'; abstract class ExcludedCommentsOnly { /// @nodoc - static final bool veryUseful = true; + static final ExcludedCommentsOnly_Usefulness veryUseful = true; /// @nodoc - bool someMethodWithAllComments(String inputParameter); + ExcludedCommentsOnly_Usefulness someMethodWithAllComments(String inputParameter); /// @nodoc void someMethodWithoutReturnTypeOrInputParameters(); /// @nodoc - bool get isSomeProperty; + ExcludedCommentsOnly_Usefulness get isSomeProperty; /// @nodoc - set isSomeProperty(bool value); + set isSomeProperty(ExcludedCommentsOnly_Usefulness value); } /// @nodoc +typedef ExcludedCommentsOnly_Usefulness = bool; +/// @nodoc enum ExcludedCommentsOnly_SomeEnum { /// @nodoc useless @@ -77,7 +79,7 @@ class ExcludedCommentsOnly_SomethingWrongException implements Exception { /// @nodoc class ExcludedCommentsOnly_SomeStruct { /// @nodoc - bool someField; + ExcludedCommentsOnly_Usefulness someField; ExcludedCommentsOnly_SomeStruct(this.someField); } // ExcludedCommentsOnly_SomeStruct "private" section, not exported. @@ -264,7 +266,7 @@ class ExcludedCommentsOnly$Impl extends __lib.NativeBase implements ExcludedComm ExcludedCommentsOnly$Impl(Pointer handle) : super(handle); @override - bool someMethodWithAllComments(String inputParameter) { + ExcludedCommentsOnly_Usefulness someMethodWithAllComments(String inputParameter) { final _someMethodWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_ExcludedCommentsOnly_someMethodWithAllComments__String')); final _inputParameterHandle = stringToFfi(inputParameter); final _handle = this.handle; @@ -294,7 +296,7 @@ class ExcludedCommentsOnly$Impl extends __lib.NativeBase implements ExcludedComm _someMethodWithoutReturnTypeOrInputParametersFfi(_handle, __lib.LibraryContext.isolateId); } @override - bool get isSomeProperty { + ExcludedCommentsOnly_Usefulness get isSomeProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32), int Function(Pointer, int)>('library_smoke_ExcludedCommentsOnly_isSomeProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -305,7 +307,7 @@ class ExcludedCommentsOnly$Impl extends __lib.NativeBase implements ExcludedComm } } @override - set isSomeProperty(bool value) { + set isSomeProperty(ExcludedCommentsOnly_Usefulness value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Uint8), void Function(Pointer, int, int)>('library_smoke_ExcludedCommentsOnly_isSomeProperty_set__Boolean')); final _valueHandle = booleanToFfi(value); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/unicode_comments.dart b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/unicode_comments.dart index b614c584cc..87adf352dd 100644 --- a/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/unicode_comments.dart +++ b/gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/unicode_comments.dart @@ -10,11 +10,11 @@ abstract class UnicodeComments { /// /// [input] שלום /// - /// Returns [bool]. товарищ + /// Returns [Comments_Usefulness]. товарищ /// /// Throws [Comments_SomethingWrongException]. ネコ /// - bool someMethodWithAllComments(String input); + Comments_Usefulness someMethodWithAllComments(String input); } // UnicodeComments "private" section, not exported. final _smokeUnicodecommentsRegisterFinalizer = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction< @@ -49,7 +49,7 @@ class UnicodeComments$Impl extends __lib.NativeBase implements UnicodeComments { UnicodeComments$Impl(Pointer handle) : super(handle); @override - bool someMethodWithAllComments(String input) { + Comments_Usefulness someMethodWithAllComments(String input) { final _someMethodWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_UnicodeComments_someMethodWithAllComments__String')); final _inputHandle = stringToFfi(input); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/generic_types__conversion.dart b/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/generic_types__conversion.dart index ec8b078995..968463534a 100644 --- a/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/generic_types__conversion.dart +++ b/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/generic_types__conversion.dart @@ -1,4 +1,5 @@ import 'package:library/src/builtin_types__conversion.dart'; +import 'package:library/src/smoke/dates_steady.dart'; import 'dart:ffi'; import 'package:library/src/_library_context.dart' as __lib; final _foobarListofDateCreateHandle = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction< @@ -118,7 +119,7 @@ final _foobarListofDateStd2chrono2steady1clock2time1pointIteratorGet = __lib.cat Uint64 Function(Pointer), int Function(Pointer) >('library_foobar_ListOf_Date_std_2chrono_2steady_1clock_2time_1point_iterator_get')); -Pointer foobarListofDateStd2chrono2steady1clock2time1pointToFfi(List value) { +Pointer foobarListofDateStd2chrono2steady1clock2time1pointToFfi(List value) { final _result = _foobarListofDateStd2chrono2steady1clock2time1pointCreateHandle(); for (final element in value) { final _elementHandle = dateToFfi(element); @@ -127,8 +128,8 @@ Pointer foobarListofDateStd2chrono2steady1clock2time1pointToFfi(List foobarListofDateStd2chrono2steady1clock2time1pointFromFfi(Pointer handle) { - final result = List.empty(growable: true); +List foobarListofDateStd2chrono2steady1clock2time1pointFromFfi(Pointer handle) { + final result = List.empty(growable: true); final _iteratorHandle = _foobarListofDateStd2chrono2steady1clock2time1pointIterator(handle); while (_foobarListofDateStd2chrono2steady1clock2time1pointIteratorIsValid(handle, _iteratorHandle) != 0) { final _elementHandle = _foobarListofDateStd2chrono2steady1clock2time1pointIteratorGet(_iteratorHandle); @@ -155,14 +156,14 @@ final _foobarListofDateStd2chrono2steady1clock2time1pointGetValueNullable = __li Pointer Function(Pointer), Pointer Function(Pointer) >('library_foobar_ListOf_Date_std_2chrono_2steady_1clock_2time_1point_get_value_nullable')); -Pointer foobarListofDateStd2chrono2steady1clock2time1pointToFfiNullable(List? value) { +Pointer foobarListofDateStd2chrono2steady1clock2time1pointToFfiNullable(List? value) { if (value == null) return Pointer.fromAddress(0); final _handle = foobarListofDateStd2chrono2steady1clock2time1pointToFfi(value); final result = _foobarListofDateStd2chrono2steady1clock2time1pointCreateHandleNullable(_handle); foobarListofDateStd2chrono2steady1clock2time1pointReleaseFfiHandle(_handle); return result; } -List? foobarListofDateStd2chrono2steady1clock2time1pointFromFfiNullable(Pointer handle) { +List? foobarListofDateStd2chrono2steady1clock2time1pointFromFfiNullable(Pointer handle) { if (handle.address == 0) return null; final _handle = _foobarListofDateStd2chrono2steady1clock2time1pointGetValueNullable(handle); final result = foobarListofDateStd2chrono2steady1clock2time1pointFromFfi(_handle); @@ -207,7 +208,7 @@ final _foobarMapofDateStd2chrono2steady1clock2time1pointToStringIteratorGetValue Pointer Function(Pointer), Pointer Function(Pointer) >('library_foobar_MapOf_Date_std_2chrono_2steady_1clock_2time_1point_to_String_iterator_get_value')); -Pointer foobarMapofDateStd2chrono2steady1clock2time1pointToStringToFfi(Map value) { +Pointer foobarMapofDateStd2chrono2steady1clock2time1pointToStringToFfi(Map value) { final _result = _foobarMapofDateStd2chrono2steady1clock2time1pointToStringCreateHandle(); for (final entry in value.entries) { final _keyHandle = dateToFfi(entry.key); @@ -218,8 +219,8 @@ Pointer foobarMapofDateStd2chrono2steady1clock2time1pointToStringToFfi(Map } return _result; } -Map foobarMapofDateStd2chrono2steady1clock2time1pointToStringFromFfi(Pointer handle) { - final result = Map(); +Map foobarMapofDateStd2chrono2steady1clock2time1pointToStringFromFfi(Pointer handle) { + final result = Map(); final _iteratorHandle = _foobarMapofDateStd2chrono2steady1clock2time1pointToStringIterator(handle); while (_foobarMapofDateStd2chrono2steady1clock2time1pointToStringIteratorIsValid(handle, _iteratorHandle) != 0) { final _keyHandle = _foobarMapofDateStd2chrono2steady1clock2time1pointToStringIteratorGetKey(_iteratorHandle); @@ -249,14 +250,14 @@ final _foobarMapofDateStd2chrono2steady1clock2time1pointToStringGetValueNullable Pointer Function(Pointer), Pointer Function(Pointer) >('library_foobar_MapOf_Date_std_2chrono_2steady_1clock_2time_1point_to_String_get_value_nullable')); -Pointer foobarMapofDateStd2chrono2steady1clock2time1pointToStringToFfiNullable(Map? value) { +Pointer foobarMapofDateStd2chrono2steady1clock2time1pointToStringToFfiNullable(Map? value) { if (value == null) return Pointer.fromAddress(0); final _handle = foobarMapofDateStd2chrono2steady1clock2time1pointToStringToFfi(value); final result = _foobarMapofDateStd2chrono2steady1clock2time1pointToStringCreateHandleNullable(_handle); foobarMapofDateStd2chrono2steady1clock2time1pointToStringReleaseFfiHandle(_handle); return result; } -Map? foobarMapofDateStd2chrono2steady1clock2time1pointToStringFromFfiNullable(Pointer handle) { +Map? foobarMapofDateStd2chrono2steady1clock2time1pointToStringFromFfiNullable(Pointer handle) { if (handle.address == 0) return null; final _handle = _foobarMapofDateStd2chrono2steady1clock2time1pointToStringGetValueNullable(handle); final result = foobarMapofDateStd2chrono2steady1clock2time1pointToStringFromFfi(_handle); diff --git a/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates.dart b/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates.dart index cf334867d3..2a00b857ac 100644 --- a/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates.dart +++ b/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates.dart @@ -13,6 +13,9 @@ abstract class Dates { Set get dateSet; set dateSet(Set value); } +typedef Dates_DateTypeDef = DateTime; +typedef Dates_DateArray = List; +typedef Dates_DateMap = Map; class Dates_DateStruct { DateTime dateField; DateTime? nullableDateField; diff --git a/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates_steady.dart b/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates_steady.dart index 187b2f6d2f..637627b72e 100644 --- a/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates_steady.dart +++ b/gluecodium/src/test/resources/smoke/dates/output/dart/lib/src/smoke/dates_steady.dart @@ -5,14 +5,16 @@ import 'package:library/src/_token_cache.dart' as __lib; import 'package:library/src/builtin_types__conversion.dart'; import 'package:library/src/generic_types__conversion.dart'; abstract class DatesSteady { - - DateTime dateMethod(DateTime input); - DateTime? nullableDateMethod(DateTime? input); - List dateListMethod(List input); + DatesSteady_MonotonicDate dateMethod(DatesSteady_MonotonicDate input); + DatesSteady_MonotonicDate? nullableDateMethod(DatesSteady_MonotonicDate? input); + DatesSteady_DateList dateListMethod(DatesSteady_DateList input); } +typedef DatesSteady_MonotonicDate = DateTime; +typedef DatesSteady_DateList = List; +typedef DatesSteady_DateMap = Map; class DatesSteady_DateStruct { - DateTime dateField; - DateTime? nullableDateField; + DatesSteady_MonotonicDate dateField; + DatesSteady_MonotonicDate? nullableDateField; DatesSteady_DateStruct(this.dateField, this.nullableDateField); } // DatesSteady_DateStruct "private" section, not exported. @@ -99,9 +101,8 @@ final _smokeDatessteadyReleaseHandle = __lib.catchArgumentError(() => __lib.nati >('library_smoke_DatesSteady_release_handle')); class DatesSteady$Impl extends __lib.NativeBase implements DatesSteady { DatesSteady$Impl(Pointer handle) : super(handle); - @override - DateTime dateMethod(DateTime input) { + DatesSteady_MonotonicDate dateMethod(DatesSteady_MonotonicDate input) { final _dateMethodFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Uint64), int Function(Pointer, int, int)>('library_smoke_DatesSteady_dateMethod__Date')); final _inputHandle = dateToFfi(input); final _handle = this.handle; @@ -114,7 +115,7 @@ class DatesSteady$Impl extends __lib.NativeBase implements DatesSteady { } } @override - DateTime? nullableDateMethod(DateTime? input) { + DatesSteady_MonotonicDate? nullableDateMethod(DatesSteady_MonotonicDate? input) { final _nullableDateMethodFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_DatesSteady_nullableDateMethod__Date_')); final _inputHandle = dateToFfiNullable(input); final _handle = this.handle; @@ -127,7 +128,7 @@ class DatesSteady$Impl extends __lib.NativeBase implements DatesSteady { } } @override - List dateListMethod(List input) { + DatesSteady_DateList dateListMethod(DatesSteady_DateList input) { final _dateListMethodFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_DatesSteady_dateListMethod__ListOf_Date_std_2chrono_2steady_1clock_2time_1point')); final _inputHandle = foobarListofDateStd2chrono2steady1clock2time1pointToFfi(input); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/defaults/output/dart/lib/src/smoke/default_values.dart b/gluecodium/src/test/resources/smoke/defaults/output/dart/lib/src/smoke/default_values.dart index cf4b33db27..ac2c6d5645 100644 --- a/gluecodium/src/test/resources/smoke/defaults/output/dart/lib/src/smoke/default_values.dart +++ b/gluecodium/src/test/resources/smoke/defaults/output/dart/lib/src/smoke/default_values.dart @@ -12,6 +12,13 @@ abstract class DefaultValues { @visibleForTesting static dynamic $prototype = DefaultValues$Impl(Pointer.fromAddress(0)); } +typedef DefaultValues_LongTypedef = int; +typedef DefaultValues_BooleanTypedef = bool; +typedef DefaultValues_StringTypedef = String; +typedef DefaultValues_EnumTypedef = DefaultValues_SomeEnum; +typedef DefaultValues_FloatArray = List; +typedef DefaultValues_IdToStringMap = Map; +typedef DefaultValues_StringSet = Set; enum DefaultValues_SomeEnum { fooValue, barValue @@ -472,10 +479,10 @@ void smokeDefaultvaluesStructwithspecialdefaultsReleaseFfiHandleNullable(Pointer // End of DefaultValues_StructWithSpecialDefaults "private" section. class DefaultValues_StructWithEmptyDefaults { List intsField; - List floatsField; - Map mapField; + DefaultValues_FloatArray floatsField; + DefaultValues_IdToStringMap mapField; DefaultValues_StructWithDefaults structField; - Set setTypeField; + DefaultValues_StringSet setTypeField; DefaultValues_StructWithEmptyDefaults(this.intsField, this.floatsField, this.mapField, this.structField, this.setTypeField); DefaultValues_StructWithEmptyDefaults.withDefaults() : intsField = [], floatsField = [], mapField = {}, structField = DefaultValues_StructWithDefaults.withDefaults(), setTypeField = {}; @@ -577,13 +584,13 @@ void smokeDefaultvaluesStructwithemptydefaultsReleaseFfiHandleNullable(Pointer __lib.nativeLibrary.lookupFunction< diff --git a/gluecodium/src/test/resources/smoke/defaults/output/dart/lib/src/smoke/struct_with_initializer_defaults.dart b/gluecodium/src/test/resources/smoke/defaults/output/dart/lib/src/smoke/struct_with_initializer_defaults.dart index 0ea16ac4d9..c94650e58f 100644 --- a/gluecodium/src/test/resources/smoke/defaults/output/dart/lib/src/smoke/struct_with_initializer_defaults.dart +++ b/gluecodium/src/test/resources/smoke/defaults/output/dart/lib/src/smoke/struct_with_initializer_defaults.dart @@ -1,13 +1,14 @@ import 'dart:ffi'; import 'package:library/src/_library_context.dart' as __lib; import 'package:library/src/generic_types__conversion.dart'; +import 'package:library/src/smoke/default_values.dart'; import 'package:library/src/smoke/types_with_defaults.dart'; class StructWithInitializerDefaults { List intsField; - List floatsField; + DefaultValues_FloatArray floatsField; StructWithAnEnum structField; - Set setTypeField; - Map mapField; + DefaultValues_StringSet setTypeField; + DefaultValues_IdToStringMap mapField; StructWithInitializerDefaults(this.intsField, this.floatsField, this.structField, this.setTypeField, this.mapField); StructWithInitializerDefaults.withDefaults() : intsField = [4, -2, 42], floatsField = [3.14, double.negativeInfinity], structField = StructWithAnEnum(AnEnum.disabled), setTypeField = {"foo", "bar"}, mapField = {1: "foo", 42: "bar"}; diff --git a/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_milliseconds.dart b/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_milliseconds.dart index 26df6e0ad0..a479c344f0 100644 --- a/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_milliseconds.dart +++ b/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_milliseconds.dart @@ -3,6 +3,7 @@ import 'package:library/src/_library_context.dart' as __lib; import 'package:library/src/_native_base.dart' as __lib; import 'package:library/src/_token_cache.dart' as __lib; import 'package:library/src/builtin_types__conversion.dart'; +import 'package:library/src/generic_types__conversion.dart'; abstract class DurationMilliseconds { Duration durationFunction(Duration input); @@ -10,6 +11,11 @@ abstract class DurationMilliseconds { Duration get durationProperty; set durationProperty(Duration value); } +typedef DurationMilliseconds_DurationTypeAlias = Duration; +typedef DurationMilliseconds_DurationList = List; +typedef DurationMilliseconds_DurationSet = Set; +typedef DurationMilliseconds_DurationMap = Map; +typedef DurationMilliseconds_DurationKeyMap = Map; class DurationMilliseconds_DurationStruct { Duration durationField; DurationMilliseconds_DurationStruct(this.durationField); diff --git a/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_seconds.dart b/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_seconds.dart index 814fbfe92b..a06ae0bc44 100644 --- a/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_seconds.dart +++ b/gluecodium/src/test/resources/smoke/durations/output/dart/lib/src/smoke/duration_seconds.dart @@ -3,6 +3,7 @@ import 'package:library/src/_library_context.dart' as __lib; import 'package:library/src/_native_base.dart' as __lib; import 'package:library/src/_token_cache.dart' as __lib; import 'package:library/src/builtin_types__conversion.dart'; +import 'package:library/src/generic_types__conversion.dart'; abstract class DurationSeconds { Duration durationFunction(Duration input); @@ -10,6 +11,11 @@ abstract class DurationSeconds { Duration get durationProperty; set durationProperty(Duration value); } +typedef DurationSeconds_DurationTypeAlias = Duration; +typedef DurationSeconds_DurationList = List; +typedef DurationSeconds_DurationSet = Set; +typedef DurationSeconds_DurationMap = Map; +typedef DurationSeconds_DurationKeyMap = Map; class DurationSeconds_DurationStruct { Duration durationField; DurationSeconds_DurationStruct(this.durationField); diff --git a/gluecodium/src/test/resources/smoke/enums/output/dart/lib/src/smoke/enums.dart b/gluecodium/src/test/resources/smoke/enums/output/dart/lib/src/smoke/enums.dart index 3fac8f0838..6e3d62ca59 100644 --- a/gluecodium/src/test/resources/smoke/enums/output/dart/lib/src/smoke/enums.dart +++ b/gluecodium/src/test/resources/smoke/enums/output/dart/lib/src/smoke/enums.dart @@ -3,6 +3,7 @@ import 'package:library/src/_library_context.dart' as __lib; import 'package:library/src/_native_base.dart' as __lib; import 'package:library/src/_token_cache.dart' as __lib; import 'package:library/src/builtin_types__conversion.dart'; +import 'package:library/src/generic_types__conversion.dart'; import 'package:meta/meta.dart'; abstract class Enums { @@ -14,6 +15,7 @@ abstract class Enums { @visibleForTesting static dynamic $prototype = Enums$Impl(Pointer.fromAddress(0)); } +typedef Enums_ExampleMap = Map; enum Enums_SimpleEnum { first, second diff --git a/gluecodium/src/test/resources/smoke/equatable/output/dart/lib/src/smoke/equatable.dart b/gluecodium/src/test/resources/smoke/equatable/output/dart/lib/src/smoke/equatable.dart index 2fe9690f4d..60906c0bd5 100644 --- a/gluecodium/src/test/resources/smoke/equatable/output/dart/lib/src/smoke/equatable.dart +++ b/gluecodium/src/test/resources/smoke/equatable/output/dart/lib/src/smoke/equatable.dart @@ -3,6 +3,7 @@ import 'package:collection/collection.dart'; import 'package:library/src/_library_context.dart' as __lib; import 'package:library/src/builtin_types__conversion.dart'; import 'package:library/src/generic_types__conversion.dart'; +typedef ErrorCodeToMessageMap = Map; enum SomeEnum { foo, bar @@ -68,7 +69,7 @@ class EquatableStruct { NestedEquatableStruct structField; SomeEnum enumField; List arrayField; - Map mapField; + ErrorCodeToMessageMap mapField; EquatableStruct(this.boolField, this.intField, this.longField, this.floatField, this.doubleField, this.stringField, this.structField, this.enumField, this.arrayField, this.mapField); @override bool operator ==(Object other) { @@ -244,7 +245,7 @@ class EquatableNullableStruct { NestedEquatableStruct? structField; SomeEnum? enumField; List? arrayField; - Map? mapField; + ErrorCodeToMessageMap? mapField; EquatableNullableStruct(this.boolField, this.intField, this.uintField, this.floatField, this.stringField, this.structField, this.enumField, this.arrayField, this.mapField); @override bool operator ==(Object other) { diff --git a/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/class.dart b/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/class.dart index 8fe30b86b7..32fa0eb3e4 100644 --- a/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/class.dart +++ b/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/class.dart @@ -10,8 +10,7 @@ import 'package:library/src/package/types.dart'; import 'package:meta/meta.dart'; abstract class Class implements Interface { factory Class() => $prototype.constructor(); - - Struct fun(List double); + Struct fun(ULong double); Enum get property; set property(Enum value); /// @nodoc @@ -55,7 +54,6 @@ final _funReturnHasError = __lib.catchArgumentError(() => __lib.nativeLibrary.lo @visibleForTesting class Class$Impl extends __lib.NativeBase implements Class { Class$Impl(Pointer handle) : super(handle); - Class constructor() { final _result_handle = _constructor(); final _result = Class$Impl(_result_handle); @@ -69,7 +67,7 @@ class Class$Impl extends __lib.NativeBase implements Class { return __resultHandle; } @override - Struct fun(List double) { + Struct fun(ULong double) { final _funFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_package_Class_fun__ListOf_package_Types_Struct')); final _doubleHandle = foobarListofPackageTypesStructToFfi(double); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/types.dart b/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/types.dart index a734ad3f34..894f27f280 100644 --- a/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/types.dart +++ b/gluecodium/src/test/resources/smoke/escaped_names/output/dart/lib/src/package/types.dart @@ -1,5 +1,7 @@ import 'dart:ffi'; import 'package:library/src/_library_context.dart' as __lib; +import 'package:library/src/generic_types__conversion.dart'; +typedef ULong = List; enum Enum { naN } diff --git a/gluecodium/src/test/resources/smoke/generic_types/output/dart/lib/src/smoke/generic_types_with_basic_types.dart b/gluecodium/src/test/resources/smoke/generic_types/output/dart/lib/src/smoke/generic_types_with_basic_types.dart index 2df7c991d7..3ace94067e 100644 --- a/gluecodium/src/test/resources/smoke/generic_types/output/dart/lib/src/smoke/generic_types_with_basic_types.dart +++ b/gluecodium/src/test/resources/smoke/generic_types/output/dart/lib/src/smoke/generic_types_with_basic_types.dart @@ -8,9 +8,9 @@ abstract class GenericTypesWithBasicTypes { List methodWithList(List input); Map methodWithMap(Map input); Set methodWithSet(Set input); - List methodWithListTypeAlias(List input); - Map methodWithMapTypeAlias(Map input); - Set methodWithSetTypeAlias(Set input); + GenericTypesWithBasicTypes_BasicList methodWithListTypeAlias(GenericTypesWithBasicTypes_BasicList input); + GenericTypesWithBasicTypes_BasicMap methodWithMapTypeAlias(GenericTypesWithBasicTypes_BasicMap input); + GenericTypesWithBasicTypes_BasicSet methodWithSetTypeAlias(GenericTypesWithBasicTypes_BasicSet input); List get listProperty; set listProperty(List value); Map get mapProperty; @@ -18,6 +18,9 @@ abstract class GenericTypesWithBasicTypes { Set get setProperty; set setProperty(Set value); } +typedef GenericTypesWithBasicTypes_BasicList = List; +typedef GenericTypesWithBasicTypes_BasicMap = Map; +typedef GenericTypesWithBasicTypes_BasicSet = Set; class GenericTypesWithBasicTypes_StructWithGenerics { List numbersList; Map numbersMap; @@ -158,7 +161,7 @@ class GenericTypesWithBasicTypes$Impl extends __lib.NativeBase implements Generi } } @override - List methodWithListTypeAlias(List input) { + GenericTypesWithBasicTypes_BasicList methodWithListTypeAlias(GenericTypesWithBasicTypes_BasicList input) { final _methodWithListTypeAliasFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_GenericTypesWithBasicTypes_methodWithListTypeAlias__ListOf_String')); final _inputHandle = foobarListofStringToFfi(input); final _handle = this.handle; @@ -171,7 +174,7 @@ class GenericTypesWithBasicTypes$Impl extends __lib.NativeBase implements Generi } } @override - Map methodWithMapTypeAlias(Map input) { + GenericTypesWithBasicTypes_BasicMap methodWithMapTypeAlias(GenericTypesWithBasicTypes_BasicMap input) { final _methodWithMapTypeAliasFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_GenericTypesWithBasicTypes_methodWithMapTypeAlias__MapOf_String_to_String')); final _inputHandle = foobarMapofStringToStringToFfi(input); final _handle = this.handle; @@ -184,7 +187,7 @@ class GenericTypesWithBasicTypes$Impl extends __lib.NativeBase implements Generi } } @override - Set methodWithSetTypeAlias(Set input) { + GenericTypesWithBasicTypes_BasicSet methodWithSetTypeAlias(GenericTypesWithBasicTypes_BasicSet input) { final _methodWithSetTypeAliasFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_GenericTypesWithBasicTypes_methodWithSetTypeAlias__SetOf_String')); final _inputHandle = foobarSetofStringToFfi(input); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/calculator_listener.dart b/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/calculator_listener.dart index ae32aa6818..5569f137d8 100644 --- a/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/calculator_listener.dart +++ b/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/calculator_listener.dart @@ -12,7 +12,7 @@ abstract class CalculatorListener { void Function(double) onCalculationResultConstLambda, void Function(CalculatorListener_ResultStruct) onCalculationResultStructLambda, void Function(List) onCalculationResultArrayLambda, - void Function(Map) onCalculationResultMapLambda, + void Function(CalculatorListener_NamedCalculationResults) onCalculationResultMapLambda, void Function(CalculationResult) onCalculationResultInstanceLambda, ) => CalculatorListener$Lambdas( onCalculationResultLambda, @@ -27,9 +27,10 @@ abstract class CalculatorListener { void onCalculationResultConst(double calculationResult); void onCalculationResultStruct(CalculatorListener_ResultStruct calculationResult); void onCalculationResultArray(List calculationResult); - void onCalculationResultMap(Map calculationResults); + void onCalculationResultMap(CalculatorListener_NamedCalculationResults calculationResults); void onCalculationResultInstance(CalculationResult calculationResult); } +typedef CalculatorListener_NamedCalculationResults = Map; class CalculatorListener_ResultStruct { double result; CalculatorListener_ResultStruct(this.result); @@ -118,7 +119,7 @@ class CalculatorListener$Lambdas implements CalculatorListener { void Function(double) onCalculationResultConstLambda; void Function(CalculatorListener_ResultStruct) onCalculationResultStructLambda; void Function(List) onCalculationResultArrayLambda; - void Function(Map) onCalculationResultMapLambda; + void Function(CalculatorListener_NamedCalculationResults) onCalculationResultMapLambda; void Function(CalculationResult) onCalculationResultInstanceLambda; CalculatorListener$Lambdas( this.onCalculationResultLambda, @@ -142,7 +143,7 @@ class CalculatorListener$Lambdas implements CalculatorListener { void onCalculationResultArray(List calculationResult) => onCalculationResultArrayLambda(calculationResult); @override - void onCalculationResultMap(Map calculationResults) => + void onCalculationResultMap(CalculatorListener_NamedCalculationResults calculationResults) => onCalculationResultMapLambda(calculationResults); @override void onCalculationResultInstance(CalculationResult calculationResult) => @@ -182,7 +183,7 @@ class CalculatorListener$Impl extends __lib.NativeBase implements CalculatorList foobarListofDoubleReleaseFfiHandle(_calculationResultHandle); } @override - void onCalculationResultMap(Map calculationResults) { + void onCalculationResultMap(CalculatorListener_NamedCalculationResults calculationResults) { final _onCalculationResultMapFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), void Function(Pointer, int, Pointer)>('library_smoke_CalculatorListener_onCalculationResultMap__MapOf_String_to_Double')); final _calculationResultsHandle = foobarMapofStringToDoubleToFfi(calculationResults); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listener_with_properties.dart b/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listener_with_properties.dart index e699edf136..514fbcda6b 100644 --- a/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listener_with_properties.dart +++ b/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listener_with_properties.dart @@ -19,8 +19,8 @@ abstract class ListenerWithProperties { void Function(ListenerWithProperties_ResultEnum) enumeratedMessageSetLambda, List Function() arrayedMessageGetLambda, void Function(List) arrayedMessageSetLambda, - Map Function() mappedMessageGetLambda, - void Function(Map) mappedMessageSetLambda, + ListenerWithProperties_StringToDouble Function() mappedMessageGetLambda, + void Function(ListenerWithProperties_StringToDouble) mappedMessageSetLambda, Uint8List Function() bufferedMessageGetLambda, void Function(Uint8List) bufferedMessageSetLambda ) => ListenerWithProperties$Lambdas( @@ -50,11 +50,12 @@ abstract class ListenerWithProperties { set enumeratedMessage(ListenerWithProperties_ResultEnum value); List get arrayedMessage; set arrayedMessage(List value); - Map get mappedMessage; - set mappedMessage(Map value); + ListenerWithProperties_StringToDouble get mappedMessage; + set mappedMessage(ListenerWithProperties_StringToDouble value); Uint8List get bufferedMessage; set bufferedMessage(Uint8List value); } +typedef ListenerWithProperties_StringToDouble = Map; enum ListenerWithProperties_ResultEnum { none, result @@ -204,8 +205,8 @@ class ListenerWithProperties$Lambdas implements ListenerWithProperties { void Function(ListenerWithProperties_ResultEnum) enumeratedMessageSetLambda; List Function() arrayedMessageGetLambda; void Function(List) arrayedMessageSetLambda; - Map Function() mappedMessageGetLambda; - void Function(Map) mappedMessageSetLambda; + ListenerWithProperties_StringToDouble Function() mappedMessageGetLambda; + void Function(ListenerWithProperties_StringToDouble) mappedMessageSetLambda; Uint8List Function() bufferedMessageGetLambda; void Function(Uint8List) bufferedMessageSetLambda; ListenerWithProperties$Lambdas( @@ -246,9 +247,9 @@ class ListenerWithProperties$Lambdas implements ListenerWithProperties { @override set arrayedMessage(List value) => arrayedMessageSetLambda(value); @override - Map get mappedMessage => mappedMessageGetLambda(); + ListenerWithProperties_StringToDouble get mappedMessage => mappedMessageGetLambda(); @override - set mappedMessage(Map value) => mappedMessageSetLambda(value); + set mappedMessage(ListenerWithProperties_StringToDouble value) => mappedMessageSetLambda(value); @override Uint8List get bufferedMessage => bufferedMessageGetLambda(); @override @@ -342,7 +343,7 @@ class ListenerWithProperties$Impl extends __lib.NativeBase implements ListenerWi _setFfi(_handle, __lib.LibraryContext.isolateId, _valueHandle); foobarListofStringReleaseFfiHandle(_valueHandle); } - Map get mappedMessage { + ListenerWithProperties_StringToDouble get mappedMessage { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32), Pointer Function(Pointer, int)>('library_smoke_ListenerWithProperties_mappedMessage_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -352,7 +353,7 @@ class ListenerWithProperties$Impl extends __lib.NativeBase implements ListenerWi foobarMapofStringToDoubleReleaseFfiHandle(__resultHandle); } } - set mappedMessage(Map value) { + set mappedMessage(ListenerWithProperties_StringToDouble value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), void Function(Pointer, int, Pointer)>('library_smoke_ListenerWithProperties_mappedMessage_set__MapOf_String_to_Double')); final _valueHandle = foobarMapofStringToDoubleToFfi(value); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listeners_with_return_values.dart b/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listeners_with_return_values.dart index 47c837acbe..5e1749a48e 100644 --- a/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listeners_with_return_values.dart +++ b/gluecodium/src/test/resources/smoke/listeners/output/dart/lib/src/smoke/listeners_with_return_values.dart @@ -13,7 +13,7 @@ abstract class ListenersWithReturnValues { ListenersWithReturnValues_ResultStruct Function() fetchDataStructLambda, ListenersWithReturnValues_ResultEnum Function() fetchDataEnumLambda, List Function() fetchDataArrayLambda, - Map Function() fetchDataMapLambda, + ListenersWithReturnValues_StringToDouble Function() fetchDataMapLambda, CalculationResult Function() fetchDataInstanceLambda, ) => ListenersWithReturnValues$Lambdas( fetchDataDoubleLambda, @@ -30,9 +30,10 @@ abstract class ListenersWithReturnValues { ListenersWithReturnValues_ResultStruct fetchDataStruct(); ListenersWithReturnValues_ResultEnum fetchDataEnum(); List fetchDataArray(); - Map fetchDataMap(); + ListenersWithReturnValues_StringToDouble fetchDataMap(); CalculationResult fetchDataInstance(); } +typedef ListenersWithReturnValues_StringToDouble = Map; enum ListenersWithReturnValues_ResultEnum { none, result @@ -177,7 +178,7 @@ class ListenersWithReturnValues$Lambdas implements ListenersWithReturnValues { ListenersWithReturnValues_ResultStruct Function() fetchDataStructLambda; ListenersWithReturnValues_ResultEnum Function() fetchDataEnumLambda; List Function() fetchDataArrayLambda; - Map Function() fetchDataMapLambda; + ListenersWithReturnValues_StringToDouble Function() fetchDataMapLambda; CalculationResult Function() fetchDataInstanceLambda; ListenersWithReturnValues$Lambdas( this.fetchDataDoubleLambda, @@ -205,7 +206,7 @@ class ListenersWithReturnValues$Lambdas implements ListenersWithReturnValues { List fetchDataArray() => fetchDataArrayLambda(); @override - Map fetchDataMap() => + ListenersWithReturnValues_StringToDouble fetchDataMap() => fetchDataMapLambda(); @override CalculationResult fetchDataInstance() => @@ -269,7 +270,7 @@ class ListenersWithReturnValues$Impl extends __lib.NativeBase implements Listene } } @override - Map fetchDataMap() { + ListenersWithReturnValues_StringToDouble fetchDataMap() { final _fetchDataMapFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32), Pointer Function(Pointer, int)>('library_smoke_ListenersWithReturnValues_fetchDataMap')); final _handle = this.handle; final __resultHandle = _fetchDataMapFfi(_handle, __lib.LibraryContext.isolateId); @@ -337,7 +338,7 @@ int _smokeListenerswithreturnvaluesfetchDataArrayStatic(Object _obj, Pointer> _result) { - Map? _resultObject; + ListenersWithReturnValues_StringToDouble? _resultObject; try { _resultObject = (_obj as ListenersWithReturnValues).fetchDataMap(); _result.value = foobarMapofStringToDoubleToFfi(_resultObject); diff --git a/gluecodium/src/test/resources/smoke/locales/output/dart/lib/src/smoke/locales.dart b/gluecodium/src/test/resources/smoke/locales/output/dart/lib/src/smoke/locales.dart index 6e1772e10e..062b1fedcd 100644 --- a/gluecodium/src/test/resources/smoke/locales/output/dart/lib/src/smoke/locales.dart +++ b/gluecodium/src/test/resources/smoke/locales/output/dart/lib/src/smoke/locales.dart @@ -4,12 +4,18 @@ import 'package:library/src/_library_context.dart' as __lib; import 'package:library/src/_native_base.dart' as __lib; import 'package:library/src/_token_cache.dart' as __lib; import 'package:library/src/builtin_types__conversion.dart'; +import 'package:library/src/generic_types__conversion.dart'; abstract class Locales { Locale localeMethod(Locale input); Locale get localeProperty; set localeProperty(Locale value); } +typedef Locales_LocaleTypeDef = Locale; +typedef Locales_LocaleArray = List; +typedef Locales_LocaleMap = Map; +typedef Locales_LocaleSet = Set; +typedef Locales_LocaleKeyMap = Map; class Locales_LocaleStruct { Locale localeField; Locales_LocaleStruct(this.localeField); diff --git a/gluecodium/src/test/resources/smoke/method_overloads/output/dart/lib/src/smoke/method_overloads.dart b/gluecodium/src/test/resources/smoke/method_overloads/output/dart/lib/src/smoke/method_overloads.dart index 75720468c7..bba734751a 100644 --- a/gluecodium/src/test/resources/smoke/method_overloads/output/dart/lib/src/smoke/method_overloads.dart +++ b/gluecodium/src/test/resources/smoke/method_overloads/output/dart/lib/src/smoke/method_overloads.dart @@ -11,12 +11,14 @@ abstract class MethodOverloads { bool isBooleanString(String input); bool isBooleanPoint(MethodOverloads_Point input); bool isBooleanMulti(bool input1, int input2, String input3, MethodOverloads_Point input4); - bool isBooleanStringArray(List input); - bool isBooleanIntArray(List input); + bool isBooleanStringArray(MethodOverloads_StringArray input); + bool isBooleanIntArray(MethodOverloads_IntArray input); bool isBooleanConst(); bool isFloatString(String input); - bool isFloatList(List input); + bool isFloatList(MethodOverloads_IntArray input); } +typedef MethodOverloads_StringArray = List; +typedef MethodOverloads_IntArray = List; class MethodOverloads_Point { double x; double y; @@ -173,7 +175,7 @@ class MethodOverloads$Impl extends __lib.NativeBase implements MethodOverloads { } } @override - bool isBooleanStringArray(List input) { + bool isBooleanStringArray(MethodOverloads_StringArray input) { final _isBooleanStringArrayFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_MethodOverloads_isBoolean__ListOf_String')); final _inputHandle = foobarListofStringToFfi(input); final _handle = this.handle; @@ -186,7 +188,7 @@ class MethodOverloads$Impl extends __lib.NativeBase implements MethodOverloads { } } @override - bool isBooleanIntArray(List input) { + bool isBooleanIntArray(MethodOverloads_IntArray input) { final _isBooleanIntArrayFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_MethodOverloads_isBoolean__ListOf_Byte')); final _inputHandle = foobarListofByteToFfi(input); final _handle = this.handle; @@ -223,7 +225,7 @@ class MethodOverloads$Impl extends __lib.NativeBase implements MethodOverloads { } } @override - bool isFloatList(List input) { + bool isFloatList(MethodOverloads_IntArray input) { final _isFloatListFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), int Function(Pointer, int, Pointer)>('library_smoke_MethodOverloads_isFloat__ListOf_Byte')); final _inputHandle = foobarListofByteToFfi(input); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/nesting/output/dart/lib/src/smoke/use_free_types.dart b/gluecodium/src/test/resources/smoke/nesting/output/dart/lib/src/smoke/use_free_types.dart index 8faa28bd3f..fc5f1e5e84 100644 --- a/gluecodium/src/test/resources/smoke/nesting/output/dart/lib/src/smoke/use_free_types.dart +++ b/gluecodium/src/test/resources/smoke/nesting/output/dart/lib/src/smoke/use_free_types.dart @@ -6,9 +6,9 @@ import 'package:library/src/builtin_types__conversion.dart'; import 'package:library/src/smoke/free_enum.dart'; import 'package:library/src/smoke/free_exception.dart'; import 'package:library/src/smoke/free_point.dart'; +import 'package:library/src/smoke/free_type_def.dart'; abstract class UseFreeTypes { - - DateTime doStuff(FreePoint point, FreeEnum mode); + FreeTypeDef doStuff(FreePoint point, FreeEnum mode); } // UseFreeTypes "private" section, not exported. final _smokeUsefreetypesRegisterFinalizer = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction< @@ -41,9 +41,8 @@ final _doStuffReturnHasError = __lib.catchArgumentError(() => __lib.nativeLibrar >('library_smoke_UseFreeTypes_doStuff__FreePoint_FreeEnum_return_has_error')); class UseFreeTypes$Impl extends __lib.NativeBase implements UseFreeTypes { UseFreeTypes$Impl(Pointer handle) : super(handle); - @override - DateTime doStuff(FreePoint point, FreeEnum mode) { + FreeTypeDef doStuff(FreePoint point, FreeEnum mode) { final _doStuffFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer, Uint32), Pointer Function(Pointer, int, Pointer, int)>('library_smoke_UseFreeTypes_doStuff__FreePoint_FreeEnum')); final _pointHandle = smokeFreepointToFfi(point); final _modeHandle = smokeFreeenumToFfi(mode); diff --git a/gluecodium/src/test/resources/smoke/nullable/output/dart/lib/src/smoke/nullable.dart b/gluecodium/src/test/resources/smoke/nullable/output/dart/lib/src/smoke/nullable.dart index 006e5cdff3..cdadb95b82 100644 --- a/gluecodium/src/test/resources/smoke/nullable/output/dart/lib/src/smoke/nullable.dart +++ b/gluecodium/src/test/resources/smoke/nullable/output/dart/lib/src/smoke/nullable.dart @@ -13,9 +13,9 @@ abstract class Nullable { int? methodWithInt(int? input); Nullable_SomeStruct? methodWithSomeStruct(Nullable_SomeStruct? input); Nullable_SomeEnum? methodWithSomeEnum(Nullable_SomeEnum? input); - List? methodWithSomeArray(List? input); + Nullable_SomeArray? methodWithSomeArray(Nullable_SomeArray? input); List? methodWithInlineArray(List? input); - Map? methodWithSomeMap(Map? input); + Nullable_SomeMap? methodWithSomeMap(Nullable_SomeMap? input); SomeInterface? methodWithInstance(SomeInterface? input); String? get stringProperty; set stringProperty(String? value); @@ -29,15 +29,17 @@ abstract class Nullable { set structProperty(Nullable_SomeStruct? value); Nullable_SomeEnum? get enumProperty; set enumProperty(Nullable_SomeEnum? value); - List? get arrayProperty; - set arrayProperty(List? value); + Nullable_SomeArray? get arrayProperty; + set arrayProperty(Nullable_SomeArray? value); List? get inlineArrayProperty; set inlineArrayProperty(List? value); - Map? get mapProperty; - set mapProperty(Map? value); + Nullable_SomeMap? get mapProperty; + set mapProperty(Nullable_SomeMap? value); SomeInterface? get instanceProperty; set instanceProperty(SomeInterface? value); } +typedef Nullable_SomeArray = List; +typedef Nullable_SomeMap = Map; enum Nullable_SomeEnum { on, off @@ -163,9 +165,9 @@ class Nullable_NullableStruct { double? doubleField; Nullable_SomeStruct? structField; Nullable_SomeEnum? enumField; - List? arrayField; + Nullable_SomeArray? arrayField; List? inlineArrayField; - Map? mapField; + Nullable_SomeMap? mapField; SomeInterface? instanceField; Nullable_NullableStruct(this.stringField, this.boolField, this.doubleField, this.structField, this.enumField, this.arrayField, this.inlineArrayField, this.mapField, this.instanceField); } @@ -530,7 +532,7 @@ class Nullable$Impl extends __lib.NativeBase implements Nullable { } } @override - List? methodWithSomeArray(List? input) { + Nullable_SomeArray? methodWithSomeArray(Nullable_SomeArray? input) { final _methodWithSomeArrayFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_Nullable_methodWithSomeArray__ListOf_String_')); final _inputHandle = foobarListofStringToFfiNullable(input); final _handle = this.handle; @@ -556,7 +558,7 @@ class Nullable$Impl extends __lib.NativeBase implements Nullable { } } @override - Map? methodWithSomeMap(Map? input) { + Nullable_SomeMap? methodWithSomeMap(Nullable_SomeMap? input) { final _methodWithSomeMapFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_Nullable_methodWithSomeMap__MapOf_Long_to_String_')); final _inputHandle = foobarMapofLongToStringToFfiNullable(input); final _handle = this.handle; @@ -696,7 +698,7 @@ class Nullable$Impl extends __lib.NativeBase implements Nullable { smokeNullableSomeenumReleaseFfiHandleNullable(_valueHandle); } @override - List? get arrayProperty { + Nullable_SomeArray? get arrayProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32), Pointer Function(Pointer, int)>('library_smoke_Nullable_arrayProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -707,7 +709,7 @@ class Nullable$Impl extends __lib.NativeBase implements Nullable { } } @override - set arrayProperty(List? value) { + set arrayProperty(Nullable_SomeArray? value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), void Function(Pointer, int, Pointer)>('library_smoke_Nullable_arrayProperty_set__ListOf_String_')); final _valueHandle = foobarListofStringToFfiNullable(value); final _handle = this.handle; @@ -734,7 +736,7 @@ class Nullable$Impl extends __lib.NativeBase implements Nullable { foobarListofStringReleaseFfiHandleNullable(_valueHandle); } @override - Map? get mapProperty { + Nullable_SomeMap? get mapProperty { final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32), Pointer Function(Pointer, int)>('library_smoke_Nullable_mapProperty_get')); final _handle = this.handle; final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId); @@ -745,7 +747,7 @@ class Nullable$Impl extends __lib.NativeBase implements Nullable { } } @override - set mapProperty(Map? value) { + set mapProperty(Nullable_SomeMap? value) { final _setFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction, Int32, Pointer), void Function(Pointer, int, Pointer)>('library_smoke_Nullable_mapProperty_set__MapOf_Long_to_String_')); final _valueHandle = foobarMapofLongToStringToFfiNullable(value); final _handle = this.handle; diff --git a/gluecodium/src/test/resources/smoke/platform_names/output/dart/lib/src/smoke/wee_types.dart b/gluecodium/src/test/resources/smoke/platform_names/output/dart/lib/src/smoke/wee_types.dart index 1191afc3d5..fb76bb37aa 100644 --- a/gluecodium/src/test/resources/smoke/platform_names/output/dart/lib/src/smoke/wee_types.dart +++ b/gluecodium/src/test/resources/smoke/platform_names/output/dart/lib/src/smoke/wee_types.dart @@ -2,6 +2,7 @@ import 'dart:ffi'; import 'package:library/src/_library_context.dart' as __lib; import 'package:library/src/builtin_types__conversion.dart'; import 'package:meta/meta.dart'; +typedef BasicTypedef = double; enum werrEnum { WEE_ITEM } diff --git a/gluecodium/src/test/resources/smoke/structs/output/dart/lib/src/smoke/structs.dart b/gluecodium/src/test/resources/smoke/structs/output/dart/lib/src/smoke/structs.dart index f432edc11b..4a27e654fb 100644 --- a/gluecodium/src/test/resources/smoke/structs/output/dart/lib/src/smoke/structs.dart +++ b/gluecodium/src/test/resources/smoke/structs/output/dart/lib/src/smoke/structs.dart @@ -17,6 +17,7 @@ abstract class Structs { @visibleForTesting static dynamic $prototype = Structs$Impl(Pointer.fromAddress(0)); } +typedef Structs_ArrayOfImmutable = List; enum Structs_FooBar { foo, bar @@ -520,7 +521,7 @@ void smokeStructsDoublenestingimmutablestructReleaseFfiHandleNullable(Pointer arrayField; + Structs_ArrayOfImmutable arrayField; Structs_StructWithArrayOfImmutable(this.arrayField); } // Structs_StructWithArrayOfImmutable "private" section, not exported. diff --git a/gluecodium/src/test/resources/smoke/visibility/output/dart/lib/src/smoke/public_class.dart b/gluecodium/src/test/resources/smoke/visibility/output/dart/lib/src/smoke/public_class.dart index dcacb1ea26..9a43a97fe7 100644 --- a/gluecodium/src/test/resources/smoke/visibility/output/dart/lib/src/smoke/public_class.dart +++ b/gluecodium/src/test/resources/smoke/visibility/output/dart/lib/src/smoke/public_class.dart @@ -3,11 +3,12 @@ import 'package:library/src/_library_context.dart' as __lib; import 'package:library/src/_native_base.dart' as __lib; import 'package:library/src/_token_cache.dart' as __lib; import 'package:library/src/builtin_types__conversion.dart'; +import 'package:library/src/generic_types__conversion.dart'; import 'package:meta/meta.dart'; abstract class PublicClass { /// @nodoc - PublicClass_InternalStruct internal_internalMethod(PublicClass_InternalStruct input); + PublicClass_InternalStructTypeDef internal_internalMethod(PublicClass_InternalStruct input); /// @nodoc @internal PublicClass_InternalStruct get internal_internalStructProperty; @@ -21,6 +22,15 @@ abstract class PublicClass { } /// @nodoc @internal +typedef internal_PublicClass_InternalArray = List; +/// @nodoc +@internal +typedef internal_PublicClass_InternalStructTypeDef = PublicClass_InternalStruct; +/// @nodoc +@internal +typedef internal_PublicClass_StringToInternalStructMap = Map; +/// @nodoc +@internal enum PublicClass_InternalEnum { foo, bar @@ -303,7 +313,7 @@ class PublicClass$Impl extends __lib.NativeBase implements PublicClass { PublicClass$Impl(Pointer handle) : super(handle); @override - PublicClass_InternalStruct internal_internalMethod(PublicClass_InternalStruct input) { + PublicClass_InternalStructTypeDef internal_internalMethod(PublicClass_InternalStruct input) { final _internalMethodFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction Function(Pointer, Int32, Pointer), Pointer Function(Pointer, int, Pointer)>('library_smoke_PublicClass_internalMethod__InternalStruct')); final _inputHandle = smokePublicclassInternalstructToFfi(input); final _handle = this.handle;