| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 import 'compiler_helper.dart'; | 6 import 'compiler_helper.dart'; |
| 7 | 7 |
| 8 const int REMOVED = 0; | 8 const int REMOVED = 0; |
| 9 const int ABOVE_ZERO = 1; | 9 const int ABOVE_ZERO = 1; |
| 10 const int BELOW_LENGTH = 2; | 10 const int BELOW_LENGTH = 2; |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 class JSDouble extends JSNumber { | 327 class JSDouble extends JSNumber { |
| 328 } | 328 } |
| 329 class JSNull { | 329 class JSNull { |
| 330 } | 330 } |
| 331 class JSBool { | 331 class JSBool { |
| 332 } | 332 } |
| 333 class JSFunction { | 333 class JSFunction { |
| 334 } | 334 } |
| 335 class ObjectInterceptor { | 335 class ObjectInterceptor { |
| 336 } | 336 } |
| 337 class JSUInt32 extends JSInt {} |
| 338 class JSUInt31 extends JSUInt32 {} |
| 337 getInterceptor(x) {}'''; | 339 getInterceptor(x) {}'''; |
| 338 | 340 |
| 339 expect(String code, int kind) { | 341 expect(String code, int kind) { |
| 340 String generated = compile( | 342 String generated = compile( |
| 341 code, | 343 code, |
| 342 coreSource: DEFAULT_CORELIB_WITH_LIST_INTERFACE, | 344 coreSource: DEFAULT_CORELIB_WITH_LIST_INTERFACE, |
| 343 interceptorsSource: INTERCEPTORSLIB_WITH_MEMBERS); | 345 interceptorsSource: INTERCEPTORSLIB_WITH_MEMBERS); |
| 344 switch (kind) { | 346 switch (kind) { |
| 345 case REMOVED: | 347 case REMOVED: |
| 346 Expect.isTrue(!generated.contains('ioore')); | 348 Expect.isTrue(!generated.contains('ioore')); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 break; | 381 break; |
| 380 } | 382 } |
| 381 } | 383 } |
| 382 | 384 |
| 383 | 385 |
| 384 main() { | 386 main() { |
| 385 for (int i = 0; i < TESTS.length; i += 2) { | 387 for (int i = 0; i < TESTS.length; i += 2) { |
| 386 expect(TESTS[i], TESTS[i + 1]); | 388 expect(TESTS[i], TESTS[i + 1]); |
| 387 } | 389 } |
| 388 } | 390 } |
| OLD | NEW |