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

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

Issue 59073003: Version 0.8.10.4 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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 import "parser_helper.dart"; 7 import "parser_helper.dart";
8 import "../../../sdk/lib/_internal/compiler/implementation/ssa/ssa.dart"; 8 import "../../../sdk/lib/_internal/compiler/implementation/ssa/ssa.dart";
9 import "../../../sdk/lib/_internal/compiler/implementation/types/types.dart"; 9 import "../../../sdk/lib/_internal/compiler/implementation/types/types.dart";
10 10
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 367
368 rule(jsStringOrNull, jsStringOrNull, jsStringOrNull); 368 rule(jsStringOrNull, jsStringOrNull, jsStringOrNull);
369 rule(jsStringOrNull, nullType, jsStringOrNull); 369 rule(jsStringOrNull, nullType, jsStringOrNull);
370 rule(jsStringOrNull, jsFixedArray, jsIndexableOrNull); 370 rule(jsStringOrNull, jsFixedArray, jsIndexableOrNull);
371 371
372 rule(nullType, nullType, nullType); 372 rule(nullType, nullType, nullType);
373 rule(nullType, jsFixedArray, jsFixedArrayOrNull); 373 rule(nullType, jsFixedArray, jsFixedArrayOrNull);
374 374
375 rule(jsFixedArray, jsFixedArray, jsFixedArray); 375 rule(jsFixedArray, jsFixedArray, jsFixedArray);
376 376
377 check(nonPrimitive1, nullType, (type) => type is HBoundedType); 377 check(nonPrimitive1, nullType, (type) => type == nonPrimitive1.nullable());
378 check(nonPrimitive2, nullType, (type) => type is HBoundedType); 378 check(nonPrimitive2, nullType, (type) => type == nonPrimitive2.nullable());
379 check(nullType, nonPrimitive1, (type) => type.isNullable); 379 check(nullType, nonPrimitive1, (type) => type == nonPrimitive1.nullable());
380 check(nullType, nonPrimitive2, (type) => type.isNullable); 380 check(nullType, nonPrimitive2, (type) => type == nonPrimitive2.nullable());
381 381
382 ruleSet.validateCoverage(); 382 ruleSet.validateCoverage();
383 } 383 }
384 384
385 void testIntersection(MockCompiler compiler) { 385 void testIntersection(MockCompiler compiler) {
386 RuleSet ruleSet = new RuleSet('intersection', 386 RuleSet ruleSet = new RuleSet('intersection',
387 (t1, t2) => t1.intersection(t2, compiler)); 387 (t1, t2) => t1.intersection(t2, compiler));
388 rule(type1, type2, result) => ruleSet.rule(type1, type2, result); 388 rule(type1, type2, result) => ruleSet.rule(type1, type2, result);
389 389
390 rule(emptyType, emptyType, emptyType); 390 rule(emptyType, emptyType, emptyType);
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 objectType = new TypeMask.nonNullSubclass( 746 objectType = new TypeMask.nonNullSubclass(
747 compiler.objectClass); 747 compiler.objectClass);
748 emptyType = const TypeMask.nonNullEmpty(); 748 emptyType = const TypeMask.nonNullEmpty();
749 dynamicType = new TypeMask.subclass( 749 dynamicType = new TypeMask.subclass(
750 compiler.objectClass); 750 compiler.objectClass);
751 751
752 testUnion(compiler); 752 testUnion(compiler);
753 testIntersection(compiler); 753 testIntersection(compiler);
754 testRegressions(compiler); 754 testRegressions(compiler);
755 } 755 }
OLDNEW
« no previous file with comments | « dart/tests/compiler/dart2js/mock_compiler.dart ('k') | dart/tests/compiler/dart2js_extra/runtime_type_isolate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698