Skip to content

Commit

Permalink
Update smoke tests for type alias support in Dart
Browse files Browse the repository at this point in the history
See: #907
Signed-off-by: Daniel Kamkha <[email protected]>
  • Loading branch information
DanielKamkha committed Nov 12, 2021
1 parent 5adda53 commit e237876
Show file tree
Hide file tree
Showing 30 changed files with 292 additions and 217 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@ abstract class Comments {
@Deprecated("Does nothing")
void release();
/// 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
Expand All @@ -43,12 +43,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.
///
Expand All @@ -60,10 +60,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
Expand Down Expand Up @@ -131,7 +133,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.
Expand Down Expand Up @@ -357,7 +359,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments {
@override
void release() {}
@override
bool someMethodWithAllComments(String inputParameter) {
Comments_Usefulness someMethodWithAllComments(String inputParameter) {
final _someMethodWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<Pointer<Void> Function(Pointer<Void>, Int32, Pointer<Void>), Pointer<Void> Function(Pointer<Void>, int, Pointer<Void>)>('library_smoke_Comments_someMethodWithAllComments__String'));
final _inputParameterHandle = stringToFfi(inputParameter);
final _handle = this.handle;
Expand All @@ -381,7 +383,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<Uint8 Function(Pointer<Void>, Int32, Pointer<Void>), int Function(Pointer<Void>, int, Pointer<Void>)>('library_smoke_Comments_someMethodWithInputComments__String'));
final _inputHandle = stringToFfi(input);
final _handle = this.handle;
Expand All @@ -394,7 +396,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<Uint8 Function(Pointer<Void>, Int32, Pointer<Void>), int Function(Pointer<Void>, int, Pointer<Void>)>('library_smoke_Comments_someMethodWithOutputComments__String'));
final _inputHandle = stringToFfi(input);
final _handle = this.handle;
Expand All @@ -407,7 +409,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<Uint8 Function(Pointer<Void>, Int32, Pointer<Void>), int Function(Pointer<Void>, int, Pointer<Void>)>('library_smoke_Comments_someMethodWithNoComments__String'));
final _inputHandle = stringToFfi(input);
final _handle = this.handle;
Expand Down Expand Up @@ -436,7 +438,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments {
stringReleaseFfiHandle(_inputHandle);
}
@override
bool someMethodWithoutInputParametersWithAllComments() {
Comments_Usefulness someMethodWithoutInputParametersWithAllComments() {
final _someMethodWithoutInputParametersWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<Uint8 Function(Pointer<Void>, Int32), int Function(Pointer<Void>, int)>('library_smoke_Comments_someMethodWithoutInputParametersWithAllComments'));
final _handle = this.handle;
final __resultHandle = _someMethodWithoutInputParametersWithAllCommentsFfi(_handle, __lib.LibraryContext.isolateId);
Expand All @@ -447,7 +449,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments {
}
}
@override
bool someMethodWithoutInputParametersWithNoComments() {
Comments_Usefulness someMethodWithoutInputParametersWithNoComments() {
final _someMethodWithoutInputParametersWithNoCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<Uint8 Function(Pointer<Void>, Int32), int Function(Pointer<Void>, int)>('library_smoke_Comments_someMethodWithoutInputParametersWithNoComments'));
final _handle = this.handle;
final __resultHandle = _someMethodWithoutInputParametersWithNoCommentsFfi(_handle, __lib.LibraryContext.isolateId);
Expand Down Expand Up @@ -498,7 +500,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments {
}
}
@override
bool get isSomeProperty {
Comments_Usefulness get isSomeProperty {
final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<Uint8 Function(Pointer<Void>, Int32), int Function(Pointer<Void>, int)>('library_smoke_Comments_isSomeProperty_get'));
final _handle = this.handle;
final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId);
Expand All @@ -509,7 +511,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<Void Function(Pointer<Void>, Int32, Uint8), void Function(Pointer<Void>, int, int)>('library_smoke_Comments_isSomeProperty_set__Boolean'));
final _valueHandle = booleanToFfi(value);
final _handle = this.handle;
Expand Down
Loading

0 comments on commit e237876

Please sign in to comment.