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

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

Issue 11361190: a === b -> identical(a, b) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 1 month 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 | « samples/swarm/swarm_ui_lib/view/view.dart ('k') | samples/third_party/dromaeo/common/JSON.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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 return path.replaceFirst('.html', '$lib.html'); 85 return path.replaceFirst('.html', '$lib.html');
86 case 'frog': 86 case 'frog':
87 case 'dart2js': 87 case 'dart2js':
88 return '$platform/${path.replaceFirst(".html", "$lib-js.html")}'; 88 return '$platform/${path.replaceFirst(".html", "$lib-js.html")}';
89 } 89 }
90 } 90 }
91 91
92 static var _SUITE_DESCRIPTIONS; 92 static var _SUITE_DESCRIPTIONS;
93 93
94 static List<SuiteDescription> get SUITE_DESCRIPTIONS { 94 static List<SuiteDescription> get SUITE_DESCRIPTIONS {
95 if (null !== _SUITE_DESCRIPTIONS) { 95 if (_SUITE_DESCRIPTIONS != null) {
96 return _SUITE_DESCRIPTIONS; 96 return _SUITE_DESCRIPTIONS;
97 } 97 }
98 _SUITE_DESCRIPTIONS = <SuiteDescription>[]; 98 _SUITE_DESCRIPTIONS = <SuiteDescription>[];
99 99
100 // Expand the list to include a unique SuiteDescription for each 100 // Expand the list to include a unique SuiteDescription for each
101 // tested variant. 101 // tested variant.
102 for (SuiteDescription suite in _CORE_SUITE_DESCRIPTIONS) { 102 for (SuiteDescription suite in _CORE_SUITE_DESCRIPTIONS) {
103 List variants = suite.testVariants; 103 List variants = suite.testVariants;
104 for (List variant in variants) { 104 for (List variant in variants) {
105 assert(variant.length == 2); 105 assert(variant.length == 2);
106 String platform = variant[0]; 106 String platform = variant[0];
107 List<String> libraries = variant[1]; 107 List<String> libraries = variant[1];
108 for(String lib in libraries) { 108 for(String lib in libraries) {
109 String path = _getHtmlPathForVariant(platform, lib, suite.file); 109 String path = _getHtmlPathForVariant(platform, lib, suite.file);
110 final combined = new List.from(suite.tags); 110 final combined = new List.from(suite.tags);
111 combined.add(platform); 111 combined.add(platform);
112 if (lib != '') { 112 if (lib != '') {
113 combined.add(lib); 113 combined.add(lib);
114 lib = ':$lib'; 114 lib = ':$lib';
115 } 115 }
116 final name = null === variant 116 final name = (variant == null)
117 ? suite.name 117 ? suite.name
118 : '${suite.name} ($platform$lib)'; 118 : '${suite.name} ($platform$lib)';
119 _SUITE_DESCRIPTIONS.add(new SuiteDescription( 119 _SUITE_DESCRIPTIONS.add(new SuiteDescription(
120 path, 120 path,
121 name, 121 name,
122 suite.origin, 122 suite.origin,
123 suite.description, 123 suite.description,
124 combined, 124 combined,
125 [])); 125 []));
126 } 126 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 return CATEGORIES[tags]; 158 return CATEGORIES[tags];
159 } 159 }
160 for (final suite in _CORE_SUITE_DESCRIPTIONS) { 160 for (final suite in _CORE_SUITE_DESCRIPTIONS) {
161 if (suite.tags[0] == tags) { 161 if (suite.tags[0] == tags) {
162 return suite.name; 162 return suite.name;
163 } 163 }
164 } 164 }
165 return null; 165 return null;
166 } 166 }
167 } 167 }
OLDNEW
« no previous file with comments | « samples/swarm/swarm_ui_lib/view/view.dart ('k') | samples/third_party/dromaeo/common/JSON.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698