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

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

Issue 513023002: Step one towards stable error messages with details: (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
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';
11 import 'package:polymer/src/build/messages.dart';
11 import 'package:polymer/src/build/script_compactor.dart'; 12 import 'package:polymer/src/build/script_compactor.dart';
12 import 'package:smoke/codegen/generator.dart' show DEFAULT_IMPORTS; 13 import 'package:smoke/codegen/generator.dart' show DEFAULT_IMPORTS;
13 import 'package:unittest/compact_vm_config.dart'; 14 import 'package:unittest/compact_vm_config.dart';
14 import 'package:unittest/unittest.dart'; 15 import 'package:unittest/unittest.dart';
15 16
16 import 'common.dart'; 17 import 'common.dart';
17 18
18 void main() { 19 void main() {
19 useCompactVMConfiguration(); 20 useCompactVMConfiguration();
20 var phases = [[new ScriptCompactor(new TransformOptions(), 21 var phases = [[new ScriptCompactor(new TransformOptions(),
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 'a|web/a.dart': 498 'a|web/a.dart':
498 'library a;\n' 499 'library a;\n'
499 'import "package:polymer/polymer.dart";\n' 500 'import "package:polymer/polymer.dart";\n'
500 '@CustomTag("\${x}-foo")\n' // invalid, x is not defined 501 '@CustomTag("\${x}-foo")\n' // invalid, x is not defined
501 'class XFoo extends PolymerElement {\n' 502 'class XFoo extends PolymerElement {\n'
502 '}\n' 503 '}\n'
503 'main(){}', 504 'main(){}',
504 }, {}, [ 505 }, {}, [
505 'warning: The parameter to @CustomTag seems to be invalid. ' 506 'warning: The parameter to @CustomTag seems to be invalid. '
506 '(web/a.dart 2 11)', 507 '(web/a.dart 2 11)',
507 'warning: $NO_INITIALIZERS_ERROR', 508 'warning: ${NO_INITIALIZATION.snippet}',
508 ]); 509 ]);
509 510
510 testPhases( 511 testPhases(
511 'invalid const expression', phases, { 512 'invalid const expression', phases, {
512 'a|web/test.html': 513 'a|web/test.html':
513 '<!DOCTYPE html><html><head>', 514 '<!DOCTYPE html><html><head>',
514 'a|web/test.html._data': 515 'a|web/test.html._data':
515 expectedData(['web/a.dart'], experimental: true), 516 expectedData(['web/a.dart'], experimental: true),
516 'a|web/a.dart': 517 'a|web/a.dart':
517 'library a;\n' 518 'library a;\n'
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 '<!DOCTYPE html><html><head>', 551 '<!DOCTYPE html><html><head>',
551 'a|web/test.html._data': expectedData(['web/a.dart'], experimental: true ), 552 'a|web/test.html._data': expectedData(['web/a.dart'], experimental: true ),
552 'a|web/a.dart': 553 'a|web/a.dart':
553 'library a;\n' 554 'library a;\n'
554 'import "package:polymer/polymer.broken.import.dart";\n' 555 'import "package:polymer/polymer.broken.import.dart";\n'
555 '@CustomTag("x-foo")\n' 556 '@CustomTag("x-foo")\n'
556 'class XFoo extends PolymerElement {\n' 557 'class XFoo extends PolymerElement {\n'
557 '}\n' 558 '}\n'
558 'main(){}', 559 'main(){}',
559 }, {}, [ 560 }, {}, [
560 'warning: $NO_INITIALIZERS_ERROR', 561 'warning: ${NO_INITIALIZATION.snippet}',
561 ]); 562 ]);
562 563
563 testPhases( 564 testPhases(
564 'no polymer import', phases, { 565 'no polymer import', phases, {
565 'a|web/test.html': 566 'a|web/test.html':
566 '<!DOCTYPE html><html><head>', 567 '<!DOCTYPE html><html><head>',
567 'a|web/test.html._data': 568 'a|web/test.html._data':
568 expectedData(['web/a.dart'], experimental: true), 569 expectedData(['web/a.dart'], experimental: true),
569 'a|web/a.dart': 570 'a|web/a.dart':
570 'library a;\n' 571 'library a;\n'
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 configureForDeployment([]); 1185 configureForDeployment([]);
1185 i0.main(); 1186 i0.main();
1186 } 1187 }
1187 '''.replaceAll('\n ', '\n'), 1188 '''.replaceAll('\n ', '\n'),
1188 'a|web/a.dart': 1189 'a|web/a.dart':
1189 'library a;\n' 1190 'library a;\n'
1190 'import "package:polymer/polymer.dart";\n' 1191 'import "package:polymer/polymer.dart";\n'
1191 'main(){}', 1192 'main(){}',
1192 }); 1193 });
1193 } 1194 }
OLDNEW
« no previous file with comments | « pkg/polymer/test/build/log_injector_test.dart ('k') | pkg/polymer/test/build/unique_message_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698