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 | 4 |
5 // TODO(jakemac): swap this to @TestOn('pub-serve') once | 5 // TODO(jakemac): swap this to @TestOn('pub-serve') once |
6 // https://github.com/dart-lang/test/issues/388 is completed. | 6 // https://github.com/dart-lang/test/issues/388 is completed. |
7 @TestOn('!js') | 7 @TestOn('!js') |
8 @initializeTracker | 8 @initializeTracker |
9 library initialize.test.initializer_from_test; | 9 library initialize.test.initializer_from_test; |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 await run(from: Uri.parse('package:test_package/bar.dart')); | 22 await run(from: Uri.parse('package:test_package/bar.dart')); |
23 expectedNames.add( | 23 expectedNames.add( |
24 const LibraryIdentifier(#test_package.bar, 'test_package', 'bar.dart')); | 24 const LibraryIdentifier(#test_package.bar, 'test_package', 'bar.dart')); |
25 expect(InitializeTracker.seen, expectedNames); | 25 expect(InitializeTracker.seen, expectedNames); |
26 | 26 |
27 // Now we run on the rest (just this file). | 27 // Now we run on the rest (just this file). |
28 await run(); | 28 await run(); |
29 expect(InitializeTracker.seen.length, 2); | 29 expect(InitializeTracker.seen.length, 2); |
30 // Don't know what the path will be, so have to explicitly check fields | 30 // Don't know what the path will be, so have to explicitly check fields |
31 // and use an [endsWith] matcher for the path. | 31 // and use an [endsWith] matcher for the path. |
32 expect(InitializeTracker.seen[1].name, | 32 expect( |
33 #initialize.test.initializer_from_test); | 33 InitializeTracker.seen[1].name, #initialize.test.initializer_from_test); |
34 expect(InitializeTracker.seen[1].package, isNull); | 34 expect(InitializeTracker.seen[1].package, isNull); |
35 expect( | 35 expect( |
36 InitializeTracker.seen[1].path, endsWith('initializer_from_test.dart')); | 36 InitializeTracker.seen[1].path, endsWith('initializer_from_test.dart')); |
37 }, skip: 'Should be skipped only in pub-serve mode, blocked on ' | 37 }, |
38 'https://github.com/dart-lang/test/issues/388.'); | 38 skip: 'Should be skipped only in pub-serve mode, blocked on ' |
| 39 'https://github.com/dart-lang/test/issues/388.'); |
39 } | 40 } |
OLD | NEW |