OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 @TestOn('vm') |
4 library initialize.transformer_test; | 5 library initialize.transformer_test; |
5 | 6 |
6 import 'common.dart'; | 7 import 'common.dart'; |
7 import 'package:analyzer/src/generated/element.dart'; | 8 import 'package:analyzer/dart/element/element.dart'; |
8 import 'package:dart_style/dart_style.dart'; | 9 import 'package:dart_style/dart_style.dart'; |
9 import 'package:initialize/transformer.dart'; | 10 import 'package:initialize/transformer.dart'; |
10 import 'package:unittest/compact_vm_config.dart'; | 11 import 'package:test/test.dart'; |
11 import 'package:unittest/unittest.dart'; | |
12 | 12 |
13 var formatter = new DartFormatter(); | 13 var formatter = new DartFormatter(); |
14 | 14 |
15 main() { | 15 main() { |
16 useCompactVMConfiguration(); | |
17 | |
18 group('Html entry points', htmlEntryPointTests); | 16 group('Html entry points', htmlEntryPointTests); |
19 group('Dart entry points', dartEntryPointTests); | 17 group('Dart entry points', dartEntryPointTests); |
20 group('InitializerPlugins', pluginTests); | 18 group('InitializerPlugins', pluginTests); |
21 } | 19 } |
22 | 20 |
23 void htmlEntryPointTests() { | 21 void htmlEntryPointTests() { |
24 var phases = [[new InitializeTransformer(['web/*.html'])]]; | 22 var phases = [[new InitializeTransformer(['web/*.html'])]]; |
25 | 23 |
26 testPhases('basic', phases, { | 24 testPhases('basic', phases, { |
27 'a|web/index.html': ''' | 25 'a|web/index.html': ''' |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 initializers.addAll([ | 410 initializers.addAll([ |
413 new InitEntry(i2.initMethod, i1.foo), | 411 new InitEntry(i2.initMethod, i1.foo), |
414 new InitEntry(i2.initMethod, i0.index), | 412 new InitEntry(i2.initMethod, i0.index), |
415 ]); | 413 ]); |
416 | 414 |
417 return i0.main(); | 415 return i0.main(); |
418 } | 416 } |
419 ''') | 417 ''') |
420 }, []); | 418 }, []); |
421 } | 419 } |
OLD | NEW |