| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library docgen.test.typedef; | 5 library docgen.test.typedef; |
| 6 | 6 |
| 7 import 'dart:convert'; | 7 import 'dart:convert'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 | 9 |
| 10 import 'package:path/path.dart' as p; | 10 import 'package:path/path.dart' as p; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 expect(paramHash['value'], _PARAM_VALUES[paramName], | 51 expect(paramHash['value'], _PARAM_VALUES[paramName], |
| 52 reason: 'Value for $paramName should match expected'); | 52 reason: 'Value for $paramName should match expected'); |
| 53 }); | 53 }); |
| 54 }); | 54 }); |
| 55 }); | 55 }); |
| 56 } | 56 } |
| 57 | 57 |
| 58 final _PARAM_VALUES = { | 58 final _PARAM_VALUES = { |
| 59 "intConst": "42", | 59 "intConst": "42", |
| 60 "boolConst": "true", | 60 "boolConst": "true", |
| 61 "listConst": '[true, 42, "Shanna", null, 3.14, []]', | 61 "listConst": 'const [true, 42, "Shanna", null, 3.14, const []]', |
| 62 "stringConst": "\"Shanna\"", | 62 "stringConst": "\"Shanna\"", |
| 63 "mapConst": startsWith("Map"), | 63 "mapConst": 'const {"a": 1, 2: true, "c": const [1, null, true]}', |
| 64 "emptyMap": '{}' | 64 "emptyMap": 'const {}', |
| 65 "referencedConst": "INT_CONST", |
| 66 "constructedConstant1": "const ConstClass<int>(0, true)", |
| 67 "constructedConstant2": 'const ConstClass(1, false, str: "str")' |
| 65 }; | 68 }; |
| 66 | 69 |
| 67 const _PARAM_NAME_ORDER = const [ | 70 const _PARAM_NAME_ORDER = const [ |
| 68 "intConst", | 71 "intConst", |
| 69 "boolConst", | 72 "boolConst", |
| 70 "listConst", | 73 "listConst", |
| 71 "stringConst", | 74 "stringConst", |
| 72 "mapConst", | 75 "mapConst", |
| 73 "emptyMap" | 76 "emptyMap", |
| 77 "referencedConst", |
| 78 "constructedConstant1", |
| 79 "constructedConstant2" |
| 74 ]; | 80 ]; |
| OLD | NEW |