Skip to content

Commit

Permalink
🎨 Added group numeric functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Guldem committed Aug 11, 2023
1 parent b6999e2 commit 0dc232b
Show file tree
Hide file tree
Showing 4 changed files with 246 additions and 251 deletions.
131 changes: 63 additions & 68 deletions lib/src/parameterized_group_numeric.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void parameterizedGroup1<A1>(
dynamic tags,
Map<String, dynamic>? onPlatform,
int? retry,
})=>
}) =>
parameterizedGroup(
description,
values,
Expand All @@ -41,7 +41,6 @@ void parameterizedGroup1<A1>(
retry: retry,
);


/// Parameterized group with 2 input arguments. See [parameterizedGroup] for more info.
@isTestGroup
void parameterizedGroup2<A1, A2>(
Expand Down Expand Up @@ -116,7 +115,6 @@ void parameterizedGroup3<A1, A2, A3>(
retry: retry,
);


/// Parameterized group with 4 input arguments. See [parameterizedGroup] for more info.
@isTestGroup
void parameterizedGroup4<A1, A2, A3, A4>(
Expand All @@ -139,7 +137,7 @@ void parameterizedGroup4<A1, A2, A3, A4>(
dynamic tags,
Map<String, dynamic>? onPlatform,
int? retry,
})=>
}) =>
parameterizedGroup(
description,
values,
Expand All @@ -154,7 +152,6 @@ void parameterizedGroup4<A1, A2, A3, A4>(
retry: retry,
);


/// Parameterized group with 5 input arguments. See [parameterizedGroup] for more info.
@isTestGroup
void parameterizedGroup5<A1, A2, A3, A4, A5>(
Expand Down Expand Up @@ -192,7 +189,6 @@ void parameterizedGroup5<A1, A2, A3, A4, A5>(
retry: retry,
);


/// Parameterized group with 6 input arguments. See [parameterizedGroup] for more info.
@isTestGroup
void parameterizedGroup6<A1, A2, A3, A4, A5, A6>(
Expand Down Expand Up @@ -230,7 +226,6 @@ void parameterizedGroup6<A1, A2, A3, A4, A5, A6>(
retry: retry,
);


/// Parameterized group with 7 input arguments. See [parameterizedGroup] for more info.
@isTestGroup
void parameterizedGroup7<A1, A2, A3, A4, A5, A6, A7>(
Expand Down Expand Up @@ -271,26 +266,26 @@ void parameterizedGroup7<A1, A2, A3, A4, A5, A6, A7>(
/// Parameterized group with 8 input arguments. See [parameterizedGroup] for more info.
@isTestGroup
void parameterizedGroup8<A1, A2, A3, A4, A5, A6, A7, A8>(
/// Group description.
Object description,

/// List of group values. For each values in the list a group test will be executed.
Iterable<dynamic> values,

/// The test body which is executed for each group value.
/// See [TestParameters] for more info on different bodies.
dynamic Function(A1, A2, A3, A4, A5, A6, A7, A8) body, {
dynamic Function()? setUp,

/// Provide a tearDown function to the `group` test.
dynamic Function()? tearDown,
String? testOn,
Timeout? timeout,
dynamic skip,
dynamic tags,
Map<String, dynamic>? onPlatform,
int? retry,
}) =>
/// Group description.
Object description,

/// List of group values. For each values in the list a group test will be executed.
Iterable<dynamic> values,

/// The test body which is executed for each group value.
/// See [TestParameters] for more info on different bodies.
dynamic Function(A1, A2, A3, A4, A5, A6, A7, A8) body, {
dynamic Function()? setUp,

/// Provide a tearDown function to the `group` test.
dynamic Function()? tearDown,
String? testOn,
Timeout? timeout,
dynamic skip,
dynamic tags,
Map<String, dynamic>? onPlatform,
int? retry,
}) =>
parameterizedGroup(
description,
values,
Expand All @@ -308,26 +303,26 @@ void parameterizedGroup8<A1, A2, A3, A4, A5, A6, A7, A8>(
/// Parameterized group with 9 input arguments. See [parameterizedGroup] for more info.
@isTestGroup
void parameterizedGroup9<A1, A2, A3, A4, A5, A6, A7, A8, A9>(
/// Group description.
Object description,

/// List of group values. For each values in the list a group test will be executed.
Iterable<dynamic> values,

/// The test body which is executed for each group value.
/// See [TestParameters] for more info on different bodies.
dynamic Function(A1, A2, A3, A4, A5, A6, A7, A8, A9) body, {
dynamic Function()? setUp,

/// Provide a tearDown function to the `group` test.
dynamic Function()? tearDown,
String? testOn,
Timeout? timeout,
dynamic skip,
dynamic tags,
Map<String, dynamic>? onPlatform,
int? retry,
}) =>
/// Group description.
Object description,

/// List of group values. For each values in the list a group test will be executed.
Iterable<dynamic> values,

/// The test body which is executed for each group value.
/// See [TestParameters] for more info on different bodies.
dynamic Function(A1, A2, A3, A4, A5, A6, A7, A8, A9) body, {
dynamic Function()? setUp,

/// Provide a tearDown function to the `group` test.
dynamic Function()? tearDown,
String? testOn,
Timeout? timeout,
dynamic skip,
dynamic tags,
Map<String, dynamic>? onPlatform,
int? retry,
}) =>
parameterizedGroup(
description,
values,
Expand All @@ -345,26 +340,26 @@ void parameterizedGroup9<A1, A2, A3, A4, A5, A6, A7, A8, A9>(
/// Parameterized group with 10 input arguments. See [parameterizedGroup] for more info.
@isTestGroup
void parameterizedGroup10<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>(
/// Group description.
Object description,

/// List of group values. For each values in the list a group test will be executed.
Iterable<dynamic> values,

/// The test body which is executed for each group value.
/// See [TestParameters] for more info on different bodies.
dynamic Function(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) body, {
dynamic Function()? setUp,

/// Provide a tearDown function to the `group` test.
dynamic Function()? tearDown,
String? testOn,
Timeout? timeout,
dynamic skip,
dynamic tags,
Map<String, dynamic>? onPlatform,
int? retry,
}) =>
/// Group description.
Object description,

/// List of group values. For each values in the list a group test will be executed.
Iterable<dynamic> values,

/// The test body which is executed for each group value.
/// See [TestParameters] for more info on different bodies.
dynamic Function(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) body, {
dynamic Function()? setUp,

/// Provide a tearDown function to the `group` test.
dynamic Function()? tearDown,
String? testOn,
Timeout? timeout,
dynamic skip,
dynamic tags,
Map<String, dynamic>? onPlatform,
int? retry,
}) =>
parameterizedGroup(
description,
values,
Expand All @@ -377,4 +372,4 @@ void parameterizedGroup10<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>(
tags: tags,
onPlatform: onPlatform,
retry: retry,
);
);
2 changes: 1 addition & 1 deletion lib/src/parameterized_test_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ void parameterizedTest(
retry: retry,
),
).executeTests(body);
}
}
Loading

0 comments on commit 0dc232b

Please sign in to comment.