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

Side by Side Diff: samples/third_party/dromaeo/Suites.dart

Issue 12401002: Make List.from and Iterable.toList default to not growable. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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
« no previous file with comments | « runtime/lib/growable_array.dart ('k') | sdk/lib/_collection_dev/iterable.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library Suites; 1 library Suites;
2 2
3 class Origin { 3 class Origin {
4 final String author; 4 final String author;
5 final String url; 5 final String url;
6 6
7 const Origin(this.author, this.url); 7 const Origin(this.author, this.url);
8 } 8 }
9 9
10 class SuiteDescription { 10 class SuiteDescription {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // Expand the list to include a unique SuiteDescription for each 106 // Expand the list to include a unique SuiteDescription for each
107 // tested variant. 107 // tested variant.
108 for (SuiteDescription suite in _CORE_SUITE_DESCRIPTIONS) { 108 for (SuiteDescription suite in _CORE_SUITE_DESCRIPTIONS) {
109 List variants = suite.testVariants; 109 List variants = suite.testVariants;
110 for (List variant in variants) { 110 for (List variant in variants) {
111 assert(variant.length == 2); 111 assert(variant.length == 2);
112 String platform = variant[0]; 112 String platform = variant[0];
113 List<String> libraries = variant[1]; 113 List<String> libraries = variant[1];
114 for(String lib in libraries) { 114 for(String lib in libraries) {
115 String path = _getHtmlPathForVariant(platform, lib, suite.file); 115 String path = _getHtmlPathForVariant(platform, lib, suite.file);
116 final combined = new List.from(suite.tags, growable: true); 116 final combined = new List.from(suite.tags);
117 combined.add(platform); 117 combined.add(platform);
118 if (lib != '') { 118 if (lib != '') {
119 combined.add(lib); 119 combined.add(lib);
120 lib = ':$lib'; 120 lib = ':$lib';
121 } 121 }
122 final name = (variant == null) 122 final name = (variant == null)
123 ? suite.name 123 ? suite.name
124 : '${suite.name} ($platform$lib)'; 124 : '${suite.name} ($platform$lib)';
125 _SUITE_DESCRIPTIONS.add(new SuiteDescription( 125 _SUITE_DESCRIPTIONS.add(new SuiteDescription(
126 path, 126 path,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 return CATEGORIES[tags]; 164 return CATEGORIES[tags];
165 } 165 }
166 for (final suite in _CORE_SUITE_DESCRIPTIONS) { 166 for (final suite in _CORE_SUITE_DESCRIPTIONS) {
167 if (suite.tags[0] == tags) { 167 if (suite.tags[0] == tags) {
168 return suite.name; 168 return suite.name;
169 } 169 }
170 } 170 }
171 return null; 171 return null;
172 } 172 }
173 } 173 }
OLDNEW
« no previous file with comments | « runtime/lib/growable_array.dart ('k') | sdk/lib/_collection_dev/iterable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698