Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(779)

Side by Side Diff: tests/compiler/dart2js/value_range_test.dart

Issue 87783003: Add UInt32 and UInt31 types to better infer bit operations. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/simple_inferrer_unregister_call_test.dart ('k') | tests/utils/dummy_compiler_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698