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 // Test that optimized JSArray indexers enerate the same error as dyncamically | 5 // Test that optimized JSArray indexers enerate the same error as dynamically |
6 // dispatched calls. | 6 // dispatched calls. |
7 | 7 |
8 import 'package:expect/expect.dart'; | 8 import 'package:expect/expect.dart'; |
9 | 9 |
10 @NoInline() | 10 @NoInline() |
11 @AssumeDynamic() | 11 @AssumeDynamic() |
12 confuse(x) => x; | 12 confuse(x) => x; |
13 | 13 |
14 Error getError(action(), name, part) { | 14 Error getError(action(), name, part) { |
15 try { | 15 try { |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 | 317 |
318 variableIndexSetEmpty(0, 'zero index'); | 318 variableIndexSetEmpty(0, 'zero index'); |
319 variableIndexSetEmpty(10, 'small index'); | 319 variableIndexSetEmpty(10, 'small index'); |
320 variableIndexSetEmpty(-1, 'negative index'); | 320 variableIndexSetEmpty(-1, 'negative index'); |
321 variableIndexSetEmpty(HUGE, 'huge index'); | 321 variableIndexSetEmpty(HUGE, 'huge index'); |
322 | 322 |
323 variableIndexSetNonempty(10, 'small index'); | 323 variableIndexSetNonempty(10, 'small index'); |
324 variableIndexSetNonempty(-1, 'negative index'); | 324 variableIndexSetNonempty(-1, 'negative index'); |
325 variableIndexSetNonempty(HUGE, 'huge index'); | 325 variableIndexSetNonempty(HUGE, 'huge index'); |
326 } | 326 } |
OLD | NEW |