OLD | NEW |
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 import 'dart:async'; | 5 import 'dart:async'; |
6 | 6 |
7 import 'dart:mirrors'; | 7 import 'dart:mirrors'; |
8 | 8 |
9 import 'package:unittest/unittest.dart'; | 9 import 'package:unittest/unittest.dart'; |
10 import 'package:unittest/html_config.dart'; | 10 import 'package:unittest/html_config.dart'; |
11 | 11 |
12 import 'package:polymer/src/mirror_loader.dart'; | 12 import 'package:polymer/src/mirror_loader.dart'; |
| 13 /// prevent unused import warnings: [m1.XA] [m2.XA] [m3.XB] [m4.XA]. |
13 import 'mirror_loader_1.dart' as m1; | 14 import 'mirror_loader_1.dart' as m1; |
14 import 'mirror_loader_2.dart' as m2; | 15 import 'mirror_loader_2.dart' as m2; |
15 import 'mirror_loader_3.dart' as m3; | 16 import 'mirror_loader_3.dart' as m3; |
16 import 'mirror_loader_4.dart' as m4; | 17 import 'mirror_loader_4.dart' as m4; |
17 | 18 |
18 main() { | 19 main() { |
19 useHtmlConfiguration(); | 20 useHtmlConfiguration(); |
20 | 21 |
21 test('registered correctly', () { | 22 test('registered correctly', () { |
22 expect(_discover(#mirror_loader_test1).length, 1); | 23 expect(_discover(#mirror_loader_test1).length, 1); |
(...skipping 17 matching lines...) Expand all Loading... |
40 expect(e is UnsupportedError, isTrue); | 41 expect(e is UnsupportedError, isTrue); |
41 expect('$e', contains( | 42 expect('$e', contains( |
42 'Custom element classes cannot have type-parameters: XB')); | 43 'Custom element classes cannot have type-parameters: XB')); |
43 }); | 44 }); |
44 }); | 45 }); |
45 } | 46 } |
46 | 47 |
47 final mirrors = currentMirrorSystem(); | 48 final mirrors = currentMirrorSystem(); |
48 _discover(Symbol name) => | 49 _discover(Symbol name) => |
49 discoverInitializers([mirrors.findLibrary(name).uri.toString()]); | 50 discoverInitializers([mirrors.findLibrary(name).uri.toString()]); |
OLD | NEW |