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 // VMOptions=--optimization-counter-threshold=10 --no-use-osr | 4 // VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-co
mpilation |
5 | 5 |
6 import "package:expect/expect.dart"; | 6 import "package:expect/expect.dart"; |
7 | 7 |
8 // Test that noSuchMethod dispatching and auto-closurization work correctly. | 8 // Test that noSuchMethod dispatching and auto-closurization work correctly. |
9 | 9 |
10 class A { | 10 class A { |
11 noSuchMethod(m) { | 11 noSuchMethod(m) { |
12 return 123; | 12 return 123; |
13 } | 13 } |
14 bar(x) => x + 1; | 14 bar(x) => x + 1; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 } | 53 } |
54 | 54 |
55 // Test named and positional arguments. | 55 // Test named and positional arguments. |
56 var c = new C(1, 2, [100], {"n1":101, "n2":102}); | 56 var c = new C(1, 2, [100], {"n1":101, "n2":102}); |
57 for (var i = 0; i < 20; ++i) { | 57 for (var i = 0; i < 20; ++i) { |
58 Expect.equals(123, c.bar(100, n1:101, n2:102)); | 58 Expect.equals(123, c.bar(100, n1:101, n2:102)); |
59 Expect.equals(123, c.bar(100, n2:102, n1:101)); | 59 Expect.equals(123, c.bar(100, n2:102, n1:101)); |
60 } | 60 } |
61 } | 61 } |
62 | 62 |
OLD | NEW |