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 import 'package:expect/expect.dart'; | 5 import 'package:expect/expect.dart'; |
6 | 6 |
7 import 'private_access_lib.dart'; | 7 import 'private_access_lib.dart'; |
8 import 'private_access_lib.dart' as private; | 8 import 'private_access_lib.dart' as private; |
9 | 9 |
10 main() { | 10 main() { |
11 Expect.throws(() => _function(), /// 01: static type warn
ing | 11 Expect.throws(() => _function(), // /// 01: static type wa
rning |
12 (e) => e is NoSuchMethodError); /// 01: continued | 12 (e) => e is NoSuchMethodError); // /// 01: continued |
13 Expect.throws(() => private._function(), /// 02: static type warn
ing | 13 Expect.throws(() => private._function(), // /// 02: static type wa
rning |
14 (e) => e is NoSuchMethodError); /// 02: continued | 14 (e) => e is NoSuchMethodError); // /// 02: continued |
15 Expect.throws(() => new _Class()); /// 03: static type warn
ing | 15 Expect.throws(() => new _Class()); // /// 03: static type wa
rning |
16 Expect.throws(() => new private._Class()); /// 04: static type warn
ing | 16 Expect.throws(() => new private._Class()); // /// 04: static type wa
rning |
17 Expect.throws(() => new Class._constructor(), /// 05: static type warn
ing | 17 Expect.throws(() => new Class._constructor(), // /// 05: static type wa
rning |
18 (e) => e is NoSuchMethodError); /// 05: continued | 18 (e) => e is NoSuchMethodError); // /// 05: continued |
19 Expect.throws(() => new private.Class._constructor(), /// 06: static type warn
ing | 19 Expect.throws(() => new private.Class._constructor(), /// 06: static type warn
ing |
20 (e) => e is NoSuchMethodError); /// 06: continued | 20 (e) => e is NoSuchMethodError); // /// 06: continued |
21 } | 21 } |
OLD | NEW |