Index: tests/language/function_type/test_generator.dart |
diff --git a/tests/language/function_type/test_generator.dart b/tests/language/function_type/test_generator.dart |
index c9f14ec05eb50e345eb9ab7f0c85d8513478ca28..dfdb8b39cca6765e5fb69c04e85a5b37fc562404 100644 |
--- a/tests/language/function_type/test_generator.dart |
+++ b/tests/language/function_type/test_generator.dart |
@@ -547,6 +547,7 @@ final bool inCheckedMode = |
"""; |
class Unit { |
+ int typeCounter = 0; |
final String name; |
final StringBuffer typedefs = new StringBuffer(); |
final StringBuffer globals = new StringBuffer(); |
@@ -593,8 +594,8 @@ void main() { |
} |
final TEST_METHOD_HEADER = """ |
- void #testName() { |
- // #typeCode"""; |
+ /// #typeCode |
+ void #testName() {"""; |
// Tests that apply for every type. |
final COMMON_TESTS_TEMPLATE = """ |
@@ -718,9 +719,11 @@ void generateTests() { |
var types = buildFunctionTypes(); |
- int typeCounter = 0; |
+ int unitCounter = 0; |
types.forEach((FunctionType type) { |
- Unit unit = units[typeCounter % units.length]; |
+ Unit unit = units[unitCounter % units.length]; |
+ unitCounter++; |
+ int typeCounter = unit.typeCounter++; |
String typeName = createTypeName(typeCounter); |
String fieldName = createFieldName(typeCounter); |
@@ -738,8 +741,6 @@ void generateTests() { |
unit.methods.writeln(" $methodFunCode"); |
unit.testMethods.writeln("$testMethodCode"); |
unit.tests.writeln(" $testName();"); |
- |
- typeCounter++; |
}); |
for (int i = 0; i < units.length; i++) { |