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 library initialize.transformer_test; | 4 library initialize.transformer_test; |
5 | 5 |
6 import 'common.dart'; | 6 import 'common.dart'; |
7 import 'package:barback/barback.dart'; | |
8 import 'package:initialize/transformer.dart'; | 7 import 'package:initialize/transformer.dart'; |
9 import 'package:unittest/compact_vm_config.dart'; | 8 import 'package:unittest/compact_vm_config.dart'; |
10 | 9 |
11 main() { | 10 main() { |
12 useCompactVMConfiguration(); | 11 useCompactVMConfiguration(); |
13 | 12 |
14 var transformer = new InitializeTransformer.asPlugin( | 13 var transformer = |
15 new BarbackSettings({'entryPoint': 'web/index.dart'}, BarbackMode.DEBUG)); | 14 new InitializeTransformer('web/index.dart', 'web/index.bootstrap.dart'); |
16 | 15 |
17 testPhases('transformer', [[transformer]], { | 16 testPhases('transformer', [[transformer]], { |
18 'a|web/index.dart': ''' | 17 'a|web/index.dart': ''' |
19 library web_foo; | 18 library web_foo; |
20 | 19 |
21 import 'foo.dart'; | 20 import 'foo.dart'; |
22 ''', | 21 ''', |
23 'a|web/foo.dart': ''' | 22 'a|web/foo.dart': ''' |
24 @constInit | 23 @constInit |
25 library foo; | 24 library foo; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 new InitEntry(i2.constInit, #foo), | 87 new InitEntry(i2.constInit, #foo), |
89 new InitEntry(i2.initMethod, i3.foo), | 88 new InitEntry(i2.initMethod, i3.foo), |
90 new InitEntry(i2.constInit, i3.Foo), | 89 new InitEntry(i2.constInit, i3.Foo), |
91 ]); | 90 ]); |
92 | 91 |
93 i0.main(); | 92 i0.main(); |
94 } | 93 } |
95 '''.replaceAll(' ', '') | 94 '''.replaceAll(' ', '') |
96 }); | 95 }); |
97 } | 96 } |
OLD | NEW |