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 |
| 5 // TODO(jakemac): swap this to @TestOn('pub-serve') once |
| 6 // https://github.com/dart-lang/test/issues/388 is completed. |
| 7 @TestOn('!js') |
4 @initializeTracker | 8 @initializeTracker |
5 library initialize.initializer_test; | 9 library initialize.initializer_test; |
6 | 10 |
7 import 'foo/bar.dart'; | 11 import 'foo/bar.dart'; |
8 import 'package:initialize/src/initialize_tracker.dart'; | 12 import 'package:initialize/src/initialize_tracker.dart'; |
9 import 'package:initialize/initialize.dart'; | 13 import 'package:initialize/initialize.dart'; |
10 import 'package:test_package/foo.dart'; | 14 import 'package:test_package/foo.dart' as test_foo; |
11 import 'package:unittest/unittest.dart'; | 15 import 'package:test/test.dart'; |
12 import 'package:unittest/compact_vm_config.dart'; | |
13 | 16 |
| 17 /// Uses [test_foo]. |
14 main() { | 18 main() { |
15 useCompactVMConfiguration(); | |
16 | |
17 // Run all initializers. | 19 // Run all initializers. |
18 run().then((_) { | 20 return run().then((_) { |
19 test('annotations are seen in post-order with superclasses first', () { | 21 test('annotations are seen in post-order with superclasses first', () { |
20 var expectedNames = [ | 22 var expectedNames = [ |
21 const LibraryIdentifier(#initialize.test.foo, null, 'foo.dart'), | 23 const LibraryIdentifier(#initialize.test.foo, null, 'foo.dart'), |
22 fooBar, | 24 fooBar, |
23 foo, | 25 foo, |
24 Foo, | 26 Foo, |
25 const LibraryIdentifier(#initialize.test.foo.bar, null, 'foo/bar.dart'), | 27 const LibraryIdentifier(#initialize.test.foo.bar, null, 'foo/bar.dart'), |
26 bar, | 28 bar, |
27 Bar, | 29 Bar, |
28 const LibraryIdentifier(#test_package.bar, 'test_package', 'bar.dart'), | 30 const LibraryIdentifier(#test_package.bar, 'test_package', 'bar.dart'), |
(...skipping 18 matching lines...) Expand all Loading... |
47 } | 49 } |
48 | 50 |
49 @initializeTracker | 51 @initializeTracker |
50 class Zoop {} | 52 class Zoop {} |
51 | 53 |
52 @initializeTracker | 54 @initializeTracker |
53 class Zap extends Zoop {} | 55 class Zap extends Zoop {} |
54 | 56 |
55 @initializeTracker | 57 @initializeTracker |
56 zap() {} | 58 zap() {} |
OLD | NEW |