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

Side by Side Diff: pkg/analyzer/test/generated/element_test.dart

Issue 492463004: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 months 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.element_test; 8 library engine.element_test;
9 9
10 import 'package:analyzer/src/generated/java_core.dart'; 10 import 'package:analyzer/src/generated/java_core.dart';
(...skipping 3478 matching lines...) Expand 10 before | Expand all | Expand 10 after
3489 void test_setTypeArguments() { 3489 void test_setTypeArguments() {
3490 InterfaceTypeImpl type = ElementFactory.classElement2("A", []).type as Inter faceTypeImpl; 3490 InterfaceTypeImpl type = ElementFactory.classElement2("A", []).type as Inter faceTypeImpl;
3491 List<DartType> typeArguments = <DartType> [ 3491 List<DartType> typeArguments = <DartType> [
3492 ElementFactory.classElement2("B", []).type, 3492 ElementFactory.classElement2("B", []).type,
3493 ElementFactory.classElement2("C", []).type]; 3493 ElementFactory.classElement2("C", []).type];
3494 type.typeArguments = typeArguments; 3494 type.typeArguments = typeArguments;
3495 JUnitTestCase.assertEquals(typeArguments, type.typeArguments); 3495 JUnitTestCase.assertEquals(typeArguments, type.typeArguments);
3496 } 3496 }
3497 3497
3498 void test_substitute_equal() { 3498 void test_substitute_equal() {
3499 ClassElementImpl classA = ElementFactory.classElement2("A", []); 3499 ClassElement classAE = ElementFactory.classElement2("A", ["E"]);
3500 TypeParameterElementImpl parameterElement = new TypeParameterElementImpl.for Node(AstFactory.identifier3("E")); 3500 InterfaceType typeAE = classAE.type;
3501 InterfaceTypeImpl type = new InterfaceTypeImpl.con1(classA);
3502 TypeParameterTypeImpl parameter = new TypeParameterTypeImpl(parameterElement );
3503 type.typeArguments = <DartType> [parameter];
3504 InterfaceType argumentType = ElementFactory.classElement2("B", []).type; 3501 InterfaceType argumentType = ElementFactory.classElement2("B", []).type;
3505 InterfaceType result = type.substitute2(<DartType> [argumentType], <DartType > [parameter]); 3502 List<DartType> args = [argumentType];
3506 JUnitTestCase.assertEquals(classA, result.element); 3503 List<DartType> params = [classAE.typeParameters[0].type];
3507 List<DartType> resultArguments = result.typeArguments; 3504 InterfaceType typeAESubbed = typeAE.substitute2(args, params);
3505 JUnitTestCase.assertEquals(classAE, typeAESubbed.element);
3506 List<DartType> resultArguments = typeAESubbed.typeArguments;
3508 EngineTestCase.assertLength(1, resultArguments); 3507 EngineTestCase.assertLength(1, resultArguments);
3509 JUnitTestCase.assertEquals(argumentType, resultArguments[0]); 3508 JUnitTestCase.assertEquals(argumentType, resultArguments[0]);
3510 } 3509 }
3511 3510
3512 void test_substitute_exception() { 3511 void test_substitute_exception() {
3513 try { 3512 try {
3514 ClassElementImpl classA = ElementFactory.classElement2("A", []); 3513 ClassElementImpl classA = ElementFactory.classElement2("A", []);
3515 InterfaceTypeImpl type = new InterfaceTypeImpl.con1(classA); 3514 InterfaceTypeImpl type = new InterfaceTypeImpl.con1(classA);
3516 InterfaceType argumentType = ElementFactory.classElement2("B", []).type; 3515 InterfaceType argumentType = ElementFactory.classElement2("B", []).type;
3517 type.substitute2(<DartType> [argumentType], <DartType> []); 3516 type.substitute2(<DartType> [argumentType], <DartType> []);
3518 JUnitTestCase.fail("Expected to encounter exception, argument and paramete r type array lengths not equal."); 3517 JUnitTestCase.fail("Expected to encounter exception, argument and paramete r type array lengths not equal.");
3519 } catch (e) { 3518 } catch (e) {
3520 } 3519 }
3521 } 3520 }
3522 3521
3523 void test_substitute_notEqual() { 3522 void test_substitute_notEqual() {
3523 // The [test_substitute_equals] above has a slightly higher level implementa tion.
3524 ClassElementImpl classA = ElementFactory.classElement2("A", []); 3524 ClassElementImpl classA = ElementFactory.classElement2("A", []);
3525 TypeParameterElementImpl parameterElement = new TypeParameterElementImpl.for Node(AstFactory.identifier3("E")); 3525 TypeParameterElementImpl parameterElement = new TypeParameterElementImpl.for Node(AstFactory.identifier3("E"));
3526 InterfaceTypeImpl type = new InterfaceTypeImpl.con1(classA); 3526 InterfaceTypeImpl type = new InterfaceTypeImpl.con1(classA);
3527 TypeParameterTypeImpl parameter = new TypeParameterTypeImpl(parameterElement ); 3527 TypeParameterTypeImpl parameter = new TypeParameterTypeImpl(parameterElement );
3528 type.typeArguments = <DartType> [parameter]; 3528 type.typeArguments = <DartType> [parameter];
3529 InterfaceType argumentType = ElementFactory.classElement2("B", []).type; 3529 InterfaceType argumentType = ElementFactory.classElement2("B", []).type;
3530 TypeParameterTypeImpl parameterType = new TypeParameterTypeImpl(new TypePara meterElementImpl.forNode(AstFactory.identifier3("F"))); 3530 TypeParameterTypeImpl parameterType = new TypeParameterTypeImpl(new TypePara meterElementImpl.forNode(AstFactory.identifier3("F")));
3531 InterfaceType result = type.substitute2(<DartType> [argumentType], <DartType > [parameterType]); 3531 InterfaceType result = type.substitute2(<DartType> [argumentType], <DartType > [parameterType]);
3532 JUnitTestCase.assertEquals(classA, result.element); 3532 JUnitTestCase.assertEquals(classA, result.element);
3533 List<DartType> resultArguments = result.typeArguments; 3533 List<DartType> resultArguments = result.typeArguments;
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
4385 DartType _uA; 4385 DartType _uA;
4386 4386
4387 DartType _uB; 4387 DartType _uB;
4388 4388
4389 DartType _uAB; 4389 DartType _uAB;
4390 4390
4391 DartType _uBA; 4391 DartType _uBA;
4392 4392
4393 List<DartType> _us; 4393 List<DartType> _us;
4394 4394
4395 void fail_isSubtypeOf_element() {
4396 // Elements of union are sub types
4397 JUnitTestCase.assertTrue(_typeA.isSubtypeOf(_uAB));
4398 JUnitTestCase.assertTrue(_typeB.isSubtypeOf(_uAB));
4399 }
4400
4401 void fail_isSubtypeOf_reflexivity() {
4402 for (DartType u in _us) {
4403 JUnitTestCase.assertTrue(u.isSubtypeOf(u));
4404 }
4405 }
4406
4407 void fail_toString_pair() {
4408 DartType u = UnionTypeImpl.union([_typeA, _typeB]);
4409 String s = u.toString();
4410 JUnitTestCase.assertTrue(s == "{A,B}" || s == "{B,A}");
4411 }
4412
4413 void test_emptyUnionsNotAllowed() { 4395 void test_emptyUnionsNotAllowed() {
4414 try { 4396 try {
4415 UnionTypeImpl.union([]); 4397 UnionTypeImpl.union([]);
4416 } on IllegalArgumentException catch (e) { 4398 } on IllegalArgumentException catch (e) {
4417 return; 4399 return;
4418 } 4400 }
4419 JUnitTestCase.fail("Expected illegal argument exception."); 4401 JUnitTestCase.fail("Expected illegal argument exception.");
4420 } 4402 }
4421 4403
4422 void test_equality_beingASubtypeOfAnElementIsNotSufficient() { 4404 void test_equality_beingASubtypeOfAnElementIsNotSufficient() {
(...skipping 11 matching lines...) Expand all
4434 for (DartType u in _us) { 4416 for (DartType u in _us) {
4435 JUnitTestCase.assertTrue(u == u); 4417 JUnitTestCase.assertTrue(u == u);
4436 } 4418 }
4437 } 4419 }
4438 4420
4439 void test_equality_singletonsCollapse() { 4421 void test_equality_singletonsCollapse() {
4440 JUnitTestCase.assertTrue(_typeA == _uA); 4422 JUnitTestCase.assertTrue(_typeA == _uA);
4441 JUnitTestCase.assertTrue(_uA == _typeA); 4423 JUnitTestCase.assertTrue(_uA == _typeA);
4442 } 4424 }
4443 4425
4426 void test_isMoreSpecificThan_allElementsOnLHSAreSubtypesOfSomeElementOnRHS() {
4427 // Unions are subtypes when all elements are subtypes
4428 JUnitTestCase.assertTrue(_uAB.isMoreSpecificThan(_uA));
4429 JUnitTestCase.assertTrue(_uAB.isMoreSpecificThan(_typeA));
4430 }
4431
4432 void test_isMoreSpecificThan_element() {
4433 // Elements of union are sub types
4434 JUnitTestCase.assertTrue(_typeA.isMoreSpecificThan(_uAB));
4435 JUnitTestCase.assertTrue(_typeB.isMoreSpecificThan(_uAB));
4436 }
4437
4438 void test_isMoreSpecificThan_notSubtypeOfAnyElement() {
4439 // Types that are not subtypes of elements are not subtypes
4440 JUnitTestCase.assertFalse(_typeA.isMoreSpecificThan(_uB));
4441 }
4442
4443 void test_isMoreSpecificThan_reflexivity() {
4444 for (DartType u in _us) {
4445 JUnitTestCase.assertTrue(u.isMoreSpecificThan(u));
4446 }
4447 }
4448
4449 void test_isMoreSpecificThan_someElementOnLHSIsNotASubtypeOfAnyElementOnRHS() {
4450 // Unions are not subtypes when some element is not a subtype
4451 JUnitTestCase.assertFalse(_uAB.isMoreSpecificThan(_uB));
4452 JUnitTestCase.assertFalse(_uAB.isMoreSpecificThan(_typeB));
4453 }
4454
4455 void test_isMoreSpecificThan_subtypeOfSomeElement() {
4456 // Subtypes of elements are sub types
4457 JUnitTestCase.assertTrue(_typeB.isMoreSpecificThan(_uA));
4458 }
4459
4444 void test_isSubtypeOf_allElementsOnLHSAreSubtypesOfSomeElementOnRHS() { 4460 void test_isSubtypeOf_allElementsOnLHSAreSubtypesOfSomeElementOnRHS() {
4445 // Unions are subtypes when all elements are subtypes 4461 // Unions are subtypes when all elements are subtypes
4446 JUnitTestCase.assertTrue(_uAB.isSubtypeOf(_uA)); 4462 JUnitTestCase.assertTrue(_uAB.isSubtypeOf(_uA));
4447 JUnitTestCase.assertTrue(_uAB.isSubtypeOf(_typeA)); 4463 JUnitTestCase.assertTrue(_uAB.isSubtypeOf(_typeA));
4448 } 4464 }
4449 4465
4466 void test_isSubtypeOf_element() {
4467 // Elements of union are sub types
4468 JUnitTestCase.assertTrue(_typeA.isSubtypeOf(_uAB));
4469 JUnitTestCase.assertTrue(_typeB.isSubtypeOf(_uAB));
4470 }
4471
4450 void test_isSubtypeOf_notSubtypeOfAnyElement() { 4472 void test_isSubtypeOf_notSubtypeOfAnyElement() {
4451 // Types that are not subtypes of elements are not subtypes 4473 // Types that are not subtypes of elements are not subtypes
4452 JUnitTestCase.assertFalse(_typeA.isSubtypeOf(_uB)); 4474 JUnitTestCase.assertFalse(_typeA.isSubtypeOf(_uB));
4453 } 4475 }
4454 4476
4477 void test_isSubtypeOf_reflexivity() {
4478 for (DartType u in _us) {
4479 JUnitTestCase.assertTrue(u.isSubtypeOf(u));
4480 }
4481 }
4482
4455 void test_isSubtypeOf_someElementOnLHSIsNotASubtypeOfAnyElementOnRHS() { 4483 void test_isSubtypeOf_someElementOnLHSIsNotASubtypeOfAnyElementOnRHS() {
4456 // Unions are not subtypes when some element is not a subtype 4484 // Unions are not subtypes when some element is not a subtype
4457 JUnitTestCase.assertFalse(_uAB.isSubtypeOf(_uB)); 4485 JUnitTestCase.assertFalse(_uAB.isSubtypeOf(_uB));
4458 JUnitTestCase.assertFalse(_uAB.isSubtypeOf(_typeB)); 4486 JUnitTestCase.assertFalse(_uAB.isSubtypeOf(_typeB));
4459 } 4487 }
4460 4488
4461 void test_isSubtypeOf_subtypeOfSomeElement() { 4489 void test_isSubtypeOf_subtypeOfSomeElement() {
4462 // Subtypes of elements are sub types 4490 // Subtypes of elements are sub types
4463 JUnitTestCase.assertTrue(_typeB.isSubtypeOf(_uA)); 4491 JUnitTestCase.assertTrue(_typeB.isSubtypeOf(_uA));
4464 } 4492 }
4465 4493
4466 void test_nestedUnionsCollapse() { 4494 void test_nestedUnionsCollapse() {
4467 UnionType u = UnionTypeImpl.union([_uAB, _typeA]) as UnionType; 4495 UnionType u = UnionTypeImpl.union([_uAB, _typeA]) as UnionType;
4468 for (DartType t in u.elements) { 4496 for (DartType t in u.elements) {
4469 if (t is UnionType) { 4497 if (t is UnionType) {
4470 JUnitTestCase.fail("Expected only non-union types but found ${t}!"); 4498 JUnitTestCase.fail("Expected only non-union types but found ${t}!");
4471 } 4499 }
4472 } 4500 }
4473 } 4501 }
4474 4502
4475 void test_noLossage() { 4503 void test_noLossage() {
4476 UnionType u = UnionTypeImpl.union([_typeA, _typeB, _typeB, _typeA, _typeB, _ typeB]) as UnionType; 4504 UnionType u = UnionTypeImpl.union([_typeA, _typeB, _typeB, _typeA, _typeB, _ typeB]) as UnionType;
4477 Set<DartType> elements = u.elements; 4505 Set<DartType> elements = u.elements;
4478 JUnitTestCase.assertTrue(elements.contains(_typeA)); 4506 JUnitTestCase.assertTrue(elements.contains(_typeA));
4479 JUnitTestCase.assertTrue(elements.contains(_typeB)); 4507 JUnitTestCase.assertTrue(elements.contains(_typeB));
4480 JUnitTestCase.assertTrue(elements.length == 2); 4508 JUnitTestCase.assertTrue(elements.length == 2);
4481 } 4509 }
4482 4510
4511 void test_substitute() {
4512 // Based on [InterfaceTypeImplTest.test_substitute_equal].
4513 ClassElement classAE = ElementFactory.classElement2("A", ["E"]);
4514 InterfaceType typeAE = classAE.type;
4515 List<DartType> args = [_typeB];
4516 List<DartType> params = [classAE.typeParameters[0].type];
4517 DartType typeAESubbed = typeAE.substitute2(args, params);
4518 JUnitTestCase.assertFalse(typeAE == typeAESubbed);
4519 JUnitTestCase.assertEquals(UnionTypeImpl.union([_typeA, typeAE]).substitute2 (args, params), UnionTypeImpl.union([_typeA, typeAESubbed]));
4520 }
4521
4522 void test_toString_pair() {
4523 String s = _uAB.toString();
4524 JUnitTestCase.assertTrue(s == "{A,B}" || s == "{B,A}");
4525 JUnitTestCase.assertEquals(s, _uAB.displayName);
4526 }
4527
4483 void test_toString_singleton() { 4528 void test_toString_singleton() {
4484 // Singleton unions collapse to the the single type. 4529 // Singleton unions collapse to the the single type.
4485 JUnitTestCase.assertEquals("A", _uA.toString()); 4530 JUnitTestCase.assertEquals("A", _uA.toString());
4486 } 4531 }
4487 4532
4533 void test_unionTypeIsLessSpecificThan_function() {
4534 // Based on [FunctionTypeImplTest.test_isAssignableTo_normalAndPositionalArg s].
4535 ClassElement a = ElementFactory.classElement2("A", []);
4536 FunctionType t = ElementFactory.functionElement6("t", null, <ClassElement> [ a]).type;
4537 DartType uAT = UnionTypeImpl.union([_uA, t]);
4538 JUnitTestCase.assertTrue(t.isMoreSpecificThan(uAT));
4539 JUnitTestCase.assertFalse(t.isMoreSpecificThan(_uAB));
4540 }
4541
4542 void test_unionTypeIsSuperTypeOf_function() {
4543 // Based on [FunctionTypeImplTest.test_isAssignableTo_normalAndPositionalArg s].
4544 ClassElement a = ElementFactory.classElement2("A", []);
4545 FunctionType t = ElementFactory.functionElement6("t", null, <ClassElement> [ a]).type;
4546 DartType uAT = UnionTypeImpl.union([_uA, t]);
4547 JUnitTestCase.assertTrue(t.isSubtypeOf(uAT));
4548 JUnitTestCase.assertFalse(t.isSubtypeOf(_uAB));
4549 }
4550
4488 @override 4551 @override
4489 void setUp() { 4552 void setUp() {
4490 super.setUp(); 4553 super.setUp();
4491 _classA = ElementFactory.classElement2("A", []); 4554 _classA = ElementFactory.classElement2("A", []);
4492 _typeA = _classA.type; 4555 _typeA = _classA.type;
4493 _classB = ElementFactory.classElement("B", _typeA, []); 4556 _classB = ElementFactory.classElement("B", _typeA, []);
4494 _typeB = _classB.type; 4557 _typeB = _classB.type;
4495 _uA = UnionTypeImpl.union([_typeA]); 4558 _uA = UnionTypeImpl.union([_typeA]);
4496 _uB = UnionTypeImpl.union([_typeB]); 4559 _uB = UnionTypeImpl.union([_typeB]);
4497 _uAB = UnionTypeImpl.union([_typeA, _typeB]); 4560 _uAB = UnionTypeImpl.union([_typeA, _typeB]);
(...skipping 16 matching lines...) Expand all
4514 runJUnitTest(__test, __test.test_equality_insertionOrderDoesntMatter); 4577 runJUnitTest(__test, __test.test_equality_insertionOrderDoesntMatter);
4515 }); 4578 });
4516 _ut.test('test_equality_reflexivity', () { 4579 _ut.test('test_equality_reflexivity', () {
4517 final __test = new UnionTypeImplTest(); 4580 final __test = new UnionTypeImplTest();
4518 runJUnitTest(__test, __test.test_equality_reflexivity); 4581 runJUnitTest(__test, __test.test_equality_reflexivity);
4519 }); 4582 });
4520 _ut.test('test_equality_singletonsCollapse', () { 4583 _ut.test('test_equality_singletonsCollapse', () {
4521 final __test = new UnionTypeImplTest(); 4584 final __test = new UnionTypeImplTest();
4522 runJUnitTest(__test, __test.test_equality_singletonsCollapse); 4585 runJUnitTest(__test, __test.test_equality_singletonsCollapse);
4523 }); 4586 });
4587 _ut.test('test_isMoreSpecificThan_allElementsOnLHSAreSubtypesOfSomeElement OnRHS', () {
4588 final __test = new UnionTypeImplTest();
4589 runJUnitTest(__test, __test.test_isMoreSpecificThan_allElementsOnLHSAreS ubtypesOfSomeElementOnRHS);
4590 });
4591 _ut.test('test_isMoreSpecificThan_element', () {
4592 final __test = new UnionTypeImplTest();
4593 runJUnitTest(__test, __test.test_isMoreSpecificThan_element);
4594 });
4595 _ut.test('test_isMoreSpecificThan_notSubtypeOfAnyElement', () {
4596 final __test = new UnionTypeImplTest();
4597 runJUnitTest(__test, __test.test_isMoreSpecificThan_notSubtypeOfAnyEleme nt);
4598 });
4599 _ut.test('test_isMoreSpecificThan_reflexivity', () {
4600 final __test = new UnionTypeImplTest();
4601 runJUnitTest(__test, __test.test_isMoreSpecificThan_reflexivity);
4602 });
4603 _ut.test('test_isMoreSpecificThan_someElementOnLHSIsNotASubtypeOfAnyElemen tOnRHS', () {
4604 final __test = new UnionTypeImplTest();
4605 runJUnitTest(__test, __test.test_isMoreSpecificThan_someElementOnLHSIsNo tASubtypeOfAnyElementOnRHS);
4606 });
4607 _ut.test('test_isMoreSpecificThan_subtypeOfSomeElement', () {
4608 final __test = new UnionTypeImplTest();
4609 runJUnitTest(__test, __test.test_isMoreSpecificThan_subtypeOfSomeElement );
4610 });
4524 _ut.test('test_isSubtypeOf_allElementsOnLHSAreSubtypesOfSomeElementOnRHS', () { 4611 _ut.test('test_isSubtypeOf_allElementsOnLHSAreSubtypesOfSomeElementOnRHS', () {
4525 final __test = new UnionTypeImplTest(); 4612 final __test = new UnionTypeImplTest();
4526 runJUnitTest(__test, __test.test_isSubtypeOf_allElementsOnLHSAreSubtypes OfSomeElementOnRHS); 4613 runJUnitTest(__test, __test.test_isSubtypeOf_allElementsOnLHSAreSubtypes OfSomeElementOnRHS);
4527 }); 4614 });
4615 _ut.test('test_isSubtypeOf_element', () {
4616 final __test = new UnionTypeImplTest();
4617 runJUnitTest(__test, __test.test_isSubtypeOf_element);
4618 });
4528 _ut.test('test_isSubtypeOf_notSubtypeOfAnyElement', () { 4619 _ut.test('test_isSubtypeOf_notSubtypeOfAnyElement', () {
4529 final __test = new UnionTypeImplTest(); 4620 final __test = new UnionTypeImplTest();
4530 runJUnitTest(__test, __test.test_isSubtypeOf_notSubtypeOfAnyElement); 4621 runJUnitTest(__test, __test.test_isSubtypeOf_notSubtypeOfAnyElement);
4531 }); 4622 });
4623 _ut.test('test_isSubtypeOf_reflexivity', () {
4624 final __test = new UnionTypeImplTest();
4625 runJUnitTest(__test, __test.test_isSubtypeOf_reflexivity);
4626 });
4532 _ut.test('test_isSubtypeOf_someElementOnLHSIsNotASubtypeOfAnyElementOnRHS' , () { 4627 _ut.test('test_isSubtypeOf_someElementOnLHSIsNotASubtypeOfAnyElementOnRHS' , () {
4533 final __test = new UnionTypeImplTest(); 4628 final __test = new UnionTypeImplTest();
4534 runJUnitTest(__test, __test.test_isSubtypeOf_someElementOnLHSIsNotASubty peOfAnyElementOnRHS); 4629 runJUnitTest(__test, __test.test_isSubtypeOf_someElementOnLHSIsNotASubty peOfAnyElementOnRHS);
4535 }); 4630 });
4536 _ut.test('test_isSubtypeOf_subtypeOfSomeElement', () { 4631 _ut.test('test_isSubtypeOf_subtypeOfSomeElement', () {
4537 final __test = new UnionTypeImplTest(); 4632 final __test = new UnionTypeImplTest();
4538 runJUnitTest(__test, __test.test_isSubtypeOf_subtypeOfSomeElement); 4633 runJUnitTest(__test, __test.test_isSubtypeOf_subtypeOfSomeElement);
4539 }); 4634 });
4540 _ut.test('test_nestedUnionsCollapse', () { 4635 _ut.test('test_nestedUnionsCollapse', () {
4541 final __test = new UnionTypeImplTest(); 4636 final __test = new UnionTypeImplTest();
4542 runJUnitTest(__test, __test.test_nestedUnionsCollapse); 4637 runJUnitTest(__test, __test.test_nestedUnionsCollapse);
4543 }); 4638 });
4544 _ut.test('test_noLossage', () { 4639 _ut.test('test_noLossage', () {
4545 final __test = new UnionTypeImplTest(); 4640 final __test = new UnionTypeImplTest();
4546 runJUnitTest(__test, __test.test_noLossage); 4641 runJUnitTest(__test, __test.test_noLossage);
4547 }); 4642 });
4643 _ut.test('test_substitute', () {
4644 final __test = new UnionTypeImplTest();
4645 runJUnitTest(__test, __test.test_substitute);
4646 });
4647 _ut.test('test_toString_pair', () {
4648 final __test = new UnionTypeImplTest();
4649 runJUnitTest(__test, __test.test_toString_pair);
4650 });
4548 _ut.test('test_toString_singleton', () { 4651 _ut.test('test_toString_singleton', () {
4549 final __test = new UnionTypeImplTest(); 4652 final __test = new UnionTypeImplTest();
4550 runJUnitTest(__test, __test.test_toString_singleton); 4653 runJUnitTest(__test, __test.test_toString_singleton);
4551 }); 4654 });
4655 _ut.test('test_unionTypeIsLessSpecificThan_function', () {
4656 final __test = new UnionTypeImplTest();
4657 runJUnitTest(__test, __test.test_unionTypeIsLessSpecificThan_function);
4658 });
4659 _ut.test('test_unionTypeIsSuperTypeOf_function', () {
4660 final __test = new UnionTypeImplTest();
4661 runJUnitTest(__test, __test.test_unionTypeIsSuperTypeOf_function);
4662 });
4552 }); 4663 });
4553 } 4664 }
4554 } 4665 }
4555 4666
4556 class VoidTypeImplTest extends EngineTestCase { 4667 class VoidTypeImplTest extends EngineTestCase {
4557 /** 4668 /**
4558 * Reference {code VoidTypeImpl.getInstance()}. 4669 * Reference {code VoidTypeImpl.getInstance()}.
4559 */ 4670 */
4560 DartType _voidType = VoidTypeImpl.instance; 4671 DartType _voidType = VoidTypeImpl.instance;
4561 4672
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
4632 UnionTypeImplTest.dartSuite(); 4743 UnionTypeImplTest.dartSuite();
4633 VoidTypeImplTest.dartSuite(); 4744 VoidTypeImplTest.dartSuite();
4634 ClassElementImplTest.dartSuite(); 4745 ClassElementImplTest.dartSuite();
4635 CompilationUnitElementImplTest.dartSuite(); 4746 CompilationUnitElementImplTest.dartSuite();
4636 ElementLocationImplTest.dartSuite(); 4747 ElementLocationImplTest.dartSuite();
4637 ElementImplTest.dartSuite(); 4748 ElementImplTest.dartSuite();
4638 HtmlElementImplTest.dartSuite(); 4749 HtmlElementImplTest.dartSuite();
4639 LibraryElementImplTest.dartSuite(); 4750 LibraryElementImplTest.dartSuite();
4640 MultiplyDefinedElementImplTest.dartSuite(); 4751 MultiplyDefinedElementImplTest.dartSuite();
4641 } 4752 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/ast_test.dart ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698