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

Side by Side Diff: pkg/polymer/test/build/script_compactor_test.dart

Issue 569403003: update tests to use error message templates everywhere instead of hardcoded values (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 | « pkg/polymer/test/build/linter_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 polymer.test.build.script_compactor_test; 5 library polymer.test.build.script_compactor_test;
6 6
7 import 'dart:convert'; 7 import 'dart:convert';
8 8
9 import 'package:code_transformers/tests.dart' show testingDartSdkDirectory; 9 import 'package:code_transformers/tests.dart' show testingDartSdkDirectory;
10 import 'package:polymer/src/build/common.dart'; 10 import 'package:polymer/src/build/common.dart';
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 '<!DOCTYPE html><html><head>', 166 '<!DOCTYPE html><html><head>',
167 'a|web/test.html._data': expectedData(['web/a.dart']), 167 'a|web/test.html._data': expectedData(['web/a.dart']),
168 'a|web/a.dart': 168 'a|web/a.dart':
169 'library a;\n' 169 'library a;\n'
170 'import "package:polymer/polymer.dart";\n' 170 'import "package:polymer/polymer.dart";\n'
171 '@CustomTag("\${x}-foo")\n' // invalid, x is not defined 171 '@CustomTag("\${x}-foo")\n' // invalid, x is not defined
172 'class XFoo extends PolymerElement {\n' 172 'class XFoo extends PolymerElement {\n'
173 '}\n' 173 '}\n'
174 'main(){}', 174 'main(){}',
175 }, {}, [ 175 }, {}, [
176 'warning: The parameter to @CustomTag seems to be invalid. ' 176 'warning: ${INVALID_ANNOTATION_ARGUMENT.create(
177 '(web/a.dart 2 11)', 177 {'name': 'CustomTag'}).snippet} (web/a.dart 2 11)',
178 ]); 178 ]);
179 179
180 testPhases( 180 testPhases(
181 'invalid const expression', phases, { 181 'invalid const expression', phases, {
182 'a|web/test.html': 182 'a|web/test.html':
183 '<!DOCTYPE html><html><head>', 183 '<!DOCTYPE html><html><head>',
184 'a|web/test.html._data': expectedData(['web/a.dart']), 184 'a|web/test.html._data': expectedData(['web/a.dart']),
185 'a|web/a.dart': 185 'a|web/a.dart':
186 'library a;\n' 186 'library a;\n'
187 'import "package:polymer/polymer.dart";\n' 187 'import "package:polymer/polymer.dart";\n'
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 'a|web/test.html._data': 496 'a|web/test.html._data':
497 expectedData(['web/a.dart'], experimental: true), 497 expectedData(['web/a.dart'], experimental: true),
498 'a|web/a.dart': 498 'a|web/a.dart':
499 'library a;\n' 499 'library a;\n'
500 'import "package:polymer/polymer.dart";\n' 500 'import "package:polymer/polymer.dart";\n'
501 '@CustomTag("\${x}-foo")\n' // invalid, x is not defined 501 '@CustomTag("\${x}-foo")\n' // invalid, x is not defined
502 'class XFoo extends PolymerElement {\n' 502 'class XFoo extends PolymerElement {\n'
503 '}\n' 503 '}\n'
504 'main(){}', 504 'main(){}',
505 }, {}, [ 505 }, {}, [
506 'warning: The parameter to @CustomTag seems to be invalid. ' 506 'warning: ${INVALID_ANNOTATION_ARGUMENT.create(
507 '(web/a.dart 2 11)', 507 {'name': 'CustomTag'}).snippet} (web/a.dart 2 11)',
508 'warning: ${NO_INITIALIZATION.snippet}', 508 'warning: ${NO_INITIALIZATION.snippet}',
509 ]); 509 ]);
510 510
511 testPhases( 511 testPhases(
512 'invalid const expression', phases, { 512 'invalid const expression', phases, {
513 'a|web/test.html': 513 'a|web/test.html':
514 '<!DOCTYPE html><html><head>', 514 '<!DOCTYPE html><html><head>',
515 'a|web/test.html._data': 515 'a|web/test.html._data':
516 expectedData(['web/a.dart'], experimental: true), 516 expectedData(['web/a.dart'], experimental: true),
517 'a|web/a.dart': 517 'a|web/a.dart':
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 configureForDeployment([]); 1185 configureForDeployment([]);
1186 i0.main(); 1186 i0.main();
1187 } 1187 }
1188 '''.replaceAll('\n ', '\n'), 1188 '''.replaceAll('\n ', '\n'),
1189 'a|web/a.dart': 1189 'a|web/a.dart':
1190 'library a;\n' 1190 'library a;\n'
1191 'import "package:polymer/polymer.dart";\n' 1191 'import "package:polymer/polymer.dart";\n'
1192 'main(){}', 1192 'main(){}',
1193 }); 1193 });
1194 } 1194 }
OLDNEW
« no previous file with comments | « pkg/polymer/test/build/linter_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698