Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2480)

Side by Side Diff: pkg/docgen/test/constant_argument_test.dart

Issue 574683002: Use ConstExp for storing constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 ];
OLDNEW
« no previous file with comments | « pkg/docgen/lib/src/models/model_helpers.dart ('k') | pkg/docgen/test/multi_library_code/lib/test_lib.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698