Skip to content

Commit 27bd85e

Browse files
committed
Update smoke tests for type alias support in Dart
See: #907 Signed-off-by: Daniel Kamkha <daniel.kamkha@here.com>
1 parent dd8bc5a commit 27bd85e

File tree

35 files changed

+297
-226
lines changed

35 files changed

+297
-226
lines changed

gluecodium/src/test/resources/smoke/comments/output/dart/lib/src/smoke/comments.dart

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,29 @@ import 'package:meta/meta.dart';
88
abstract class Comments {
99

1010
/// This is some very useful constant.
11-
static final bool veryUseful = true;
11+
static final Comments_Usefulness veryUseful = true;
1212
/// This is some very useful method that measures the usefulness of its input.
1313
///
1414
/// [inputParameter] Very useful input parameter
1515
///
16-
/// Returns [bool]. Usefulness of the input
16+
/// Returns [Comments_Usefulness]. Usefulness of the input
1717
///
1818
/// Throws [Comments_SomethingWrongException]. Sometimes it happens.
1919
///
20-
bool someMethodWithAllComments(String inputParameter);
20+
Comments_Usefulness someMethodWithAllComments(String inputParameter);
2121
/// This is some very useful method that measures the usefulness of its input.
2222
///
2323
/// [input] Very useful input parameter
2424
///
25-
bool someMethodWithInputComments(String input);
25+
Comments_Usefulness someMethodWithInputComments(String input);
2626
/// This is some very useful method that measures the usefulness of its input.
2727
///
28-
/// Returns [bool]. Usefulness of the input
28+
/// Returns [Comments_Usefulness]. Usefulness of the input
2929
///
30-
bool someMethodWithOutputComments(String input);
30+
Comments_Usefulness someMethodWithOutputComments(String input);
3131
/// This is some very useful method that measures the usefulness of its input.
3232
///
33-
bool someMethodWithNoComments(String input);
33+
Comments_Usefulness someMethodWithNoComments(String input);
3434
/// This is some very useful method that does not measure the usefulness of its input.
3535
///
3636
/// [input] Very useful input parameter
@@ -41,12 +41,12 @@ abstract class Comments {
4141
void someMethodWithoutReturnTypeWithNoComments(String input);
4242
/// This is some very useful method that measures the usefulness of something.
4343
///
44-
/// Returns [bool]. Usefulness of the input
44+
/// Returns [Comments_Usefulness]. Usefulness of the input
4545
///
46-
bool someMethodWithoutInputParametersWithAllComments();
46+
Comments_Usefulness someMethodWithoutInputParametersWithAllComments();
4747
/// This is some very useful method that measures the usefulness of something.
4848
///
49-
bool someMethodWithoutInputParametersWithNoComments();
49+
Comments_Usefulness someMethodWithoutInputParametersWithNoComments();
5050
void someMethodWithNothing();
5151
/// This is some very useful method that does nothing.
5252
///
@@ -58,10 +58,12 @@ abstract class Comments {
5858
///
5959
String returnCommentOnly(String undocumented);
6060
/// Gets some very useful property.
61-
bool get isSomeProperty;
61+
Comments_Usefulness get isSomeProperty;
6262
/// Sets some very useful property.
63-
set isSomeProperty(bool value);
63+
set isSomeProperty(Comments_Usefulness value);
6464
}
65+
/// This is some very useful typedef.
66+
typedef Comments_Usefulness = bool;
6567
/// This is some very useful enum.
6668
enum Comments_SomeEnum {
6769
/// Not quite useful
@@ -129,7 +131,7 @@ class Comments_SomethingWrongException implements Exception {
129131
class Comments_SomeStruct {
130132
/// How useful this struct is
131133
/// remains to be seen
132-
bool someField;
134+
Comments_Usefulness someField;
133135
/// Can be `null`
134136
String? nullableField;
135137
/// This is how easy it is to construct.
@@ -354,7 +356,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments {
354356
Comments$Impl(Pointer<Void> handle) : super(handle);
355357

356358
@override
357-
bool someMethodWithAllComments(String inputParameter) {
359+
Comments_Usefulness someMethodWithAllComments(String inputParameter) {
358360
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'));
359361
final _inputParameterHandle = stringToFfi(inputParameter);
360362
final _handle = this.handle;
@@ -378,7 +380,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments {
378380
}
379381
}
380382
@override
381-
bool someMethodWithInputComments(String input) {
383+
Comments_Usefulness someMethodWithInputComments(String input) {
382384
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'));
383385
final _inputHandle = stringToFfi(input);
384386
final _handle = this.handle;
@@ -391,7 +393,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments {
391393
}
392394
}
393395
@override
394-
bool someMethodWithOutputComments(String input) {
396+
Comments_Usefulness someMethodWithOutputComments(String input) {
395397
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'));
396398
final _inputHandle = stringToFfi(input);
397399
final _handle = this.handle;
@@ -404,7 +406,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments {
404406
}
405407
}
406408
@override
407-
bool someMethodWithNoComments(String input) {
409+
Comments_Usefulness someMethodWithNoComments(String input) {
408410
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'));
409411
final _inputHandle = stringToFfi(input);
410412
final _handle = this.handle;
@@ -433,7 +435,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments {
433435
stringReleaseFfiHandle(_inputHandle);
434436
}
435437
@override
436-
bool someMethodWithoutInputParametersWithAllComments() {
438+
Comments_Usefulness someMethodWithoutInputParametersWithAllComments() {
437439
final _someMethodWithoutInputParametersWithAllCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<Uint8 Function(Pointer<Void>, Int32), int Function(Pointer<Void>, int)>('library_smoke_Comments_someMethodWithoutInputParametersWithAllComments'));
438440
final _handle = this.handle;
439441
final __resultHandle = _someMethodWithoutInputParametersWithAllCommentsFfi(_handle, __lib.LibraryContext.isolateId);
@@ -444,7 +446,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments {
444446
}
445447
}
446448
@override
447-
bool someMethodWithoutInputParametersWithNoComments() {
449+
Comments_Usefulness someMethodWithoutInputParametersWithNoComments() {
448450
final _someMethodWithoutInputParametersWithNoCommentsFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<Uint8 Function(Pointer<Void>, Int32), int Function(Pointer<Void>, int)>('library_smoke_Comments_someMethodWithoutInputParametersWithNoComments'));
449451
final _handle = this.handle;
450452
final __resultHandle = _someMethodWithoutInputParametersWithNoCommentsFfi(_handle, __lib.LibraryContext.isolateId);
@@ -495,7 +497,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments {
495497
}
496498
}
497499
@override
498-
bool get isSomeProperty {
500+
Comments_Usefulness get isSomeProperty {
499501
final _getFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<Uint8 Function(Pointer<Void>, Int32), int Function(Pointer<Void>, int)>('library_smoke_Comments_isSomeProperty_get'));
500502
final _handle = this.handle;
501503
final __resultHandle = _getFfi(_handle, __lib.LibraryContext.isolateId);
@@ -506,7 +508,7 @@ class Comments$Impl extends __lib.NativeBase implements Comments {
506508
}
507509
}
508510
@override
509-
set isSomeProperty(bool value) {
511+
set isSomeProperty(Comments_Usefulness value) {
510512
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'));
511513
final _valueHandle = booleanToFfi(value);
512514
final _handle = this.handle;

0 commit comments

Comments
 (0)