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

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

Issue 362043006: Add support in smoke for generating static configurations in pieces. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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/all_phases_test.dart ('k') | pkg/smoke/CHANGELOG.md » ('j') | 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 'package:code_transformers/tests.dart' show testingDartSdkDirectory; 7 import 'package:code_transformers/tests.dart' show testingDartSdkDirectory;
8 import 'package:polymer/src/build/common.dart'; 8 import 'package:polymer/src/build/common.dart';
9 import 'package:polymer/src/build/script_compactor.dart'; 9 import 'package:polymer/src/build/script_compactor.dart';
10 import 'package:smoke/codegen/generator.dart' show DEFAULT_IMPORTS; 10 import 'package:smoke/codegen/generator.dart' show DEFAULT_IMPORTS;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 import 'a.dart' as smoke_0; 92 import 'a.dart' as smoke_0;
93 import 'package:polymer/polymer.dart' as smoke_1; 93 import 'package:polymer/polymer.dart' as smoke_1;
94 94
95 void main() { 95 void main() {
96 useGeneratedCode(new StaticConfiguration( 96 useGeneratedCode(new StaticConfiguration(
97 checkedMode: false, 97 checkedMode: false,
98 parents: { 98 parents: {
99 smoke_0.XFoo: smoke_1.PolymerElement, 99 smoke_0.XFoo: smoke_1.PolymerElement,
100 }, 100 },
101 declarations: { 101 declarations: {
102 smoke_0.XFoo: const {}, 102 smoke_0.XFoo: {},
103 })); 103 }));
104 configureForDeployment([ 104 configureForDeployment([
105 () => Polymer.register(\'x-foo\', i0.XFoo), 105 () => Polymer.register(\'x-foo\', i0.XFoo),
106 ]); 106 ]);
107 i0.main(); 107 i0.main();
108 } 108 }
109 '''.replaceAll('\n ', '\n'), 109 '''.replaceAll('\n ', '\n'),
110 }); 110 });
111 111
112 testPhases('use const expressions', phases, { 112 testPhases('use const expressions', phases, {
(...skipping 23 matching lines...) Expand all
136 import 'a.dart' as smoke_0; 136 import 'a.dart' as smoke_0;
137 import 'package:polymer/polymer.dart' as smoke_1; 137 import 'package:polymer/polymer.dart' as smoke_1;
138 138
139 void main() { 139 void main() {
140 useGeneratedCode(new StaticConfiguration( 140 useGeneratedCode(new StaticConfiguration(
141 checkedMode: false, 141 checkedMode: false,
142 parents: { 142 parents: {
143 smoke_0.XFoo: smoke_1.PolymerElement, 143 smoke_0.XFoo: smoke_1.PolymerElement,
144 }, 144 },
145 declarations: { 145 declarations: {
146 smoke_0.XFoo: const {}, 146 smoke_0.XFoo: {},
147 })); 147 }));
148 configureForDeployment([ 148 configureForDeployment([
149 () => Polymer.register(\'x-foo2\', i0.XFoo), 149 () => Polymer.register(\'x-foo2\', i0.XFoo),
150 ]); 150 ]);
151 i0.main(); 151 i0.main();
152 } 152 }
153 '''.replaceAll('\n ', '\n'), 153 '''.replaceAll('\n ', '\n'),
154 }); 154 });
155 155
156 testPhases('invalid const expression', phases, { 156 testPhases('invalid const expression', phases, {
(...skipping 15 matching lines...) Expand all
172 import 'a.dart' as smoke_0; 172 import 'a.dart' as smoke_0;
173 import 'package:polymer/polymer.dart' as smoke_1; 173 import 'package:polymer/polymer.dart' as smoke_1;
174 174
175 void main() { 175 void main() {
176 useGeneratedCode(new StaticConfiguration( 176 useGeneratedCode(new StaticConfiguration(
177 checkedMode: false, 177 checkedMode: false,
178 parents: { 178 parents: {
179 smoke_0.XFoo: smoke_1.PolymerElement, 179 smoke_0.XFoo: smoke_1.PolymerElement,
180 }, 180 },
181 declarations: { 181 declarations: {
182 smoke_0.XFoo: const {}, 182 smoke_0.XFoo: {},
183 })); 183 }));
184 configureForDeployment([]); 184 configureForDeployment([]);
185 i0.main(); 185 i0.main();
186 } 186 }
187 '''.replaceAll('\n ', '\n'), 187 '''.replaceAll('\n ', '\n'),
188 188
189 }, [ 189 }, [
190 'warning: The parameter to @CustomTag seems to be invalid. ' 190 'warning: The parameter to @CustomTag seems to be invalid. '
191 '(web/a.dart 2 11)', 191 '(web/a.dart 2 11)',
192 ]); 192 ]);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 checkedMode: false, 300 checkedMode: false,
301 parents: { 301 parents: {
302 smoke_5.XC1: smoke_1.PolymerElement, 302 smoke_5.XC1: smoke_1.PolymerElement,
303 smoke_5.XC2: smoke_1.PolymerElement, 303 smoke_5.XC2: smoke_1.PolymerElement,
304 smoke_0.XE: smoke_1.PolymerElement, 304 smoke_0.XE: smoke_1.PolymerElement,
305 smoke_2.XF1: smoke_1.PolymerElement, 305 smoke_2.XF1: smoke_1.PolymerElement,
306 smoke_3.XG2: smoke_1.PolymerElement, 306 smoke_3.XG2: smoke_1.PolymerElement,
307 smoke_4.XH1: smoke_1.PolymerElement, 307 smoke_4.XH1: smoke_1.PolymerElement,
308 }, 308 },
309 declarations: { 309 declarations: {
310 smoke_5.XC1: const {}, 310 smoke_5.XC1: {},
311 smoke_5.XC2: const {}, 311 smoke_5.XC2: {},
312 smoke_0.XE: const {}, 312 smoke_0.XE: {},
313 smoke_2.XF1: const {}, 313 smoke_2.XF1: {},
314 smoke_3.XG2: const {}, 314 smoke_3.XG2: {},
315 smoke_4.XH1: const {}, 315 smoke_4.XH1: {},
316 })); 316 }));
317 configureForDeployment([ 317 configureForDeployment([
318 i0.mA, 318 i0.mA,
319 i1.mB, 319 i1.mB,
320 i1.mE, 320 i1.mE,
321 i1.mF1, 321 i1.mF1,
322 i1.mG2, 322 i1.mG2,
323 () => Polymer.register('x-e', i1.XE), 323 () => Polymer.register('x-e', i1.XE),
324 () => Polymer.register('x-f1', i1.XF1), 324 () => Polymer.register('x-f1', i1.XF1),
325 () => Polymer.register('x-g2', i1.XG2), 325 () => Polymer.register('x-g2', i1.XG2),
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 import 'a.dart' as smoke_0; 405 import 'a.dart' as smoke_0;
406 import 'package:polymer/polymer.dart' as smoke_1; 406 import 'package:polymer/polymer.dart' as smoke_1;
407 407
408 void main() { 408 void main() {
409 useGeneratedCode(new StaticConfiguration( 409 useGeneratedCode(new StaticConfiguration(
410 checkedMode: false, 410 checkedMode: false,
411 parents: { 411 parents: {
412 smoke_0.XFoo: smoke_1.PolymerElement, 412 smoke_0.XFoo: smoke_1.PolymerElement,
413 }, 413 },
414 declarations: { 414 declarations: {
415 smoke_0.XFoo: const {}, 415 smoke_0.XFoo: {},
416 })); 416 }));
417 startPolymer([ 417 startPolymer([
418 i0.main, 418 i0.main,
419 () => Polymer.register(\'x-foo\', i0.XFoo), 419 () => Polymer.register(\'x-foo\', i0.XFoo),
420 ]); 420 ]);
421 } 421 }
422 '''.replaceAll('\n ', '\n'), 422 '''.replaceAll('\n ', '\n'),
423 }); 423 });
424 424
425 testPhases('use const expressions', phases, { 425 testPhases('use const expressions', phases, {
(...skipping 23 matching lines...) Expand all
449 import 'a.dart' as smoke_0; 449 import 'a.dart' as smoke_0;
450 import 'package:polymer/polymer.dart' as smoke_1; 450 import 'package:polymer/polymer.dart' as smoke_1;
451 451
452 void main() { 452 void main() {
453 useGeneratedCode(new StaticConfiguration( 453 useGeneratedCode(new StaticConfiguration(
454 checkedMode: false, 454 checkedMode: false,
455 parents: { 455 parents: {
456 smoke_0.XFoo: smoke_1.PolymerElement, 456 smoke_0.XFoo: smoke_1.PolymerElement,
457 }, 457 },
458 declarations: { 458 declarations: {
459 smoke_0.XFoo: const {}, 459 smoke_0.XFoo: {},
460 })); 460 }));
461 startPolymer([ 461 startPolymer([
462 () => Polymer.register(\'x-foo2\', i0.XFoo), 462 () => Polymer.register(\'x-foo2\', i0.XFoo),
463 ]); 463 ]);
464 } 464 }
465 '''.replaceAll('\n ', '\n'), 465 '''.replaceAll('\n ', '\n'),
466 }); 466 });
467 467
468 testPhases('invalid const expression', phases, { 468 testPhases('invalid const expression', phases, {
469 'a|web/test.html': 469 'a|web/test.html':
(...skipping 14 matching lines...) Expand all
484 import 'a.dart' as smoke_0; 484 import 'a.dart' as smoke_0;
485 import 'package:polymer/polymer.dart' as smoke_1; 485 import 'package:polymer/polymer.dart' as smoke_1;
486 486
487 void main() { 487 void main() {
488 useGeneratedCode(new StaticConfiguration( 488 useGeneratedCode(new StaticConfiguration(
489 checkedMode: false, 489 checkedMode: false,
490 parents: { 490 parents: {
491 smoke_0.XFoo: smoke_1.PolymerElement, 491 smoke_0.XFoo: smoke_1.PolymerElement,
492 }, 492 },
493 declarations: { 493 declarations: {
494 smoke_0.XFoo: const {}, 494 smoke_0.XFoo: {},
495 })); 495 }));
496 startPolymer([]); 496 startPolymer([]);
497 } 497 }
498 '''.replaceAll('\n ', '\n'), 498 '''.replaceAll('\n ', '\n'),
499 499
500 }, [ 500 }, [
501 'warning: The parameter to @CustomTag seems to be invalid. ' 501 'warning: The parameter to @CustomTag seems to be invalid. '
502 '(web/a.dart 2 11)', 502 '(web/a.dart 2 11)',
503 'warning: $NO_INITIALIZERS_ERROR', 503 'warning: $NO_INITIALIZERS_ERROR',
504 ]); 504 ]);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 checkedMode: false, 613 checkedMode: false,
614 parents: { 614 parents: {
615 smoke_5.XC1: smoke_1.PolymerElement, 615 smoke_5.XC1: smoke_1.PolymerElement,
616 smoke_5.XC2: smoke_1.PolymerElement, 616 smoke_5.XC2: smoke_1.PolymerElement,
617 smoke_0.XE: smoke_1.PolymerElement, 617 smoke_0.XE: smoke_1.PolymerElement,
618 smoke_2.XF1: smoke_1.PolymerElement, 618 smoke_2.XF1: smoke_1.PolymerElement,
619 smoke_3.XG2: smoke_1.PolymerElement, 619 smoke_3.XG2: smoke_1.PolymerElement,
620 smoke_4.XH1: smoke_1.PolymerElement, 620 smoke_4.XH1: smoke_1.PolymerElement,
621 }, 621 },
622 declarations: { 622 declarations: {
623 smoke_5.XC1: const {}, 623 smoke_5.XC1: {},
624 smoke_5.XC2: const {}, 624 smoke_5.XC2: {},
625 smoke_0.XE: const {}, 625 smoke_0.XE: {},
626 smoke_2.XF1: const {}, 626 smoke_2.XF1: {},
627 smoke_3.XG2: const {}, 627 smoke_3.XG2: {},
628 smoke_4.XH1: const {}, 628 smoke_4.XH1: {},
629 })); 629 }));
630 startPolymer([ 630 startPolymer([
631 i0.mA, 631 i0.mA,
632 i1.mB, 632 i1.mB,
633 i1.mE, 633 i1.mE,
634 i1.mF1, 634 i1.mF1,
635 i1.mG2, 635 i1.mG2,
636 () => Polymer.register('x-e', i1.XE), 636 () => Polymer.register('x-e', i1.XE),
637 () => Polymer.register('x-f1', i1.XF1), 637 () => Polymer.register('x-f1', i1.XF1),
638 () => Polymer.register('x-g2', i1.XG2), 638 () => Polymer.register('x-g2', i1.XG2),
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 })); 967 }));
968 configureForDeployment([ 968 configureForDeployment([
969 () => Polymer.register(\'x-foo\', i0.XFoo), 969 () => Polymer.register(\'x-foo\', i0.XFoo),
970 ]); 970 ]);
971 i0.main(); 971 i0.main();
972 } 972 }
973 '''.replaceAll('\n ', '\n'), 973 '''.replaceAll('\n ', '\n'),
974 }); 974 });
975 } 975 }
976 976
OLDNEW
« no previous file with comments | « pkg/polymer/test/build/all_phases_test.dart ('k') | pkg/smoke/CHANGELOG.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698