OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 // Dart test program testing that NoSuchMethod is properly called. | 4 // Dart test program testing that NoSuchMethod is properly called. |
5 | 5 |
6 import "package:expect/expect.dart"; | 6 import "package:expect/expect.dart"; |
7 | 7 |
8 Invocation invocation; | 8 Invocation invocation; |
9 | 9 |
10 class C { | 10 class C { |
(...skipping 12 matching lines...) Expand all Loading... |
23 } | 23 } |
24 | 24 |
25 main() { | 25 main() { |
26 dynamic c = new C(); | 26 dynamic c = new C(); |
27 Expect.equals(42, c.foobar(123)); | 27 Expect.equals(42, c.foobar(123)); |
28 Expect.equals(invocation.memberName, #foobar); | 28 Expect.equals(invocation.memberName, #foobar); |
29 Expect.listEquals(invocation.positionalArguments, [123]); | 29 Expect.listEquals(invocation.positionalArguments, [123]); |
30 expectNSME(null); | 30 expectNSME(null); |
31 expectNSME(777); | 31 expectNSME(777); |
32 expectNSME('hello'); | 32 expectNSME('hello'); |
33 // These fail because of https://github.com/dart-lang/dev_compiler/issues/592. | 33 expectNSME([]); |
34 // expectNSME([]); | 34 expectNSME(<String>['a', 'b', 'c']); |
35 // expectNSME(['a', 'b', 'c']); | |
36 } | 35 } |
OLD | NEW |