1- <!--
1+ <!--
22This README describes the package. If you publish this package to pub.dev,
33this README's contents appear on the landing page for your package.
44
55For information about how to write a good package README, see the guide for
6- [writing package pages](https://dart.dev/guides/libraries/writing-package-pages).
6+ [writing package pages](https://dart.dev/guides/libraries/writing-package-pages).
77
88For general information about developing packages, see the Dart guide for
99[creating packages](https://dart.dev/guides/libraries/create-library-packages)
1010and the Flutter guide for
11- [developing packages and plugins](https://flutter.dev/developing-packages).
11+ [developing packages and plugins](https://flutter.dev/developing-packages).
1212-->
1313
1414# 🧪 Parameterized test
@@ -36,8 +36,8 @@ Supercharge your Dart testing with **parameterized_test**! Built on top of the [
3636## Installation
3737
3838``` yaml
39- dev_dependencies :
40- parameterized_test : [latest-version]
39+ dev_dependencies :
40+ parameterized_test : [latest-version]
4141` ` `
4242
4343## Usage
@@ -153,13 +153,13 @@ group('Amount of letter', () {
153153 ['kiwi', 4],
154154 ['apple', 5],
155155 ['banana', 6],
156- ],
156+ ];
157157
158- for(final testValue in testValues){
158+ for (final testValue in testValues) {
159159 test(testValue.toString(), () {
160160 final String word = testValue[0] as String;
161161 final int length = testValue[1] as int;
162-
162+
163163 expect(word.length, length);
164164 });
165165 }
@@ -172,7 +172,7 @@ Currently the package supports `TestParameters` classes up to 10 arguments. If n
172172
173173For example :
174174` ` ` dart
175- class MyParameters implements TestParameters{
175+ class MyParameters<A1, A2> implements TestParameters {
176176 const MyParameters(this.body);
177177
178178 @override
@@ -182,17 +182,15 @@ class MyParameters implements TestParameters{
182182 final int count = 2;
183183
184184 @override
185- void mapBody<R>(Iterable<R> values) {
186- final A1 a1 = values.elementAt(0) as A1;
187- final A2 a2 = values.elementAt(1) as A2;
188- body(a1, a2);
189- }
185+ dynamic mapBody<R>(Iterable<R> values) {
186+ final A1 a1 = values.elementAt(0) as A1;
187+ final A2 a2 = values.elementAt(1) as A2;
188+ return body(a1, a2);
190189 }
191-
192190}
193191` ` `
194192
195193# # Additional information
196194
197195Its just a simple wrapper to easily execute tests multiple times with different values. Feel free to
198- leave some feedback or open an pull request :)
196+ leave some feedback or open an pull request :)
0 commit comments