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

Unified Diff: pkg/analyzer/test/generated/resolver_test.dart

Issue 509073008: 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:
Download patch
« no previous file with comments | « pkg/analyzer/test/generated/parser_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/resolver_test.dart
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index abb8ce5dbee8bfac2885d9974cd6707efec48957..5a0776d8c556d10ae7513020a1221cf3cd76e454 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -13759,8 +13759,11 @@ class NonErrorResolverTest extends ResolverTestCase {
}
void test_returnOfInvalidType_typeParameter_18468() {
- // This test verifies that T << Type where T is a type parameter and Type is the type Type from
- // core, this particular test case comes from issue 18468 which depends on this fact.
+ // https://code.google.com/p/dart/issues/detail?id=18468
+ //
+ // This test verifies that the type of T is more specific than Type,
+ // where T is a type parameter and Type is the type Type from
+ // core, this particular test case comes from issue 18468.
//
// A test cannot be added to TypeParameterTypeImplTest since the types returned out of the
// TestTypeProvider don't have a mock 'dart.core' enclosing library element.
@@ -20626,6 +20629,14 @@ class StaticTypeWarningCodeTest extends ResolverTestCase {
verify([source]);
}
+ void test_invalidAssignment_regressionInIssue18468Fix() {
+ // https://code.google.com/p/dart/issues/detail?id=18628
+ Source source = addSource(EngineTestCase.createSource(["class C<T> {", " T t = int;", "}"]));
+ resolve(source);
+ assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+ verify([source]);
+ }
+
void test_invalidAssignment_staticVariable() {
Source source = addSource(EngineTestCase.createSource([
"class A {",
@@ -20940,6 +20951,16 @@ class StaticTypeWarningCodeTest extends ResolverTestCase {
verify([source]);
}
+ void test_typeArgumentNotMatchingBounds_extends_regressionInIssue18468Fix() {
+ // https://code.google.com/p/dart/issues/detail?id=18628
+ Source source = addSource(EngineTestCase.createSource([
+ "class X<T extends Type> {}",
+ "class Y<U> extends X<U> {}"]));
+ resolve(source);
+ assertErrors(source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+ verify([source]);
+ }
+
void test_typeArgumentNotMatchingBounds_fieldFormalParameter() {
Source source = addSource(EngineTestCase.createSource([
"class A {}",
@@ -21752,6 +21773,10 @@ class StaticTypeWarningCodeTest extends ResolverTestCase {
final __test = new StaticTypeWarningCodeTest();
runJUnitTest(__test, __test.test_invalidAssignment_localVariable);
});
+ _ut.test('test_invalidAssignment_regressionInIssue18468Fix', () {
+ final __test = new StaticTypeWarningCodeTest();
+ runJUnitTest(__test, __test.test_invalidAssignment_regressionInIssue18468Fix);
+ });
_ut.test('test_invalidAssignment_staticVariable', () {
final __test = new StaticTypeWarningCodeTest();
runJUnitTest(__test, __test.test_invalidAssignment_staticVariable);
@@ -21892,6 +21917,10 @@ class StaticTypeWarningCodeTest extends ResolverTestCase {
final __test = new StaticTypeWarningCodeTest();
runJUnitTest(__test, __test.test_typeArgumentNotMatchingBounds_extends);
});
+ _ut.test('test_typeArgumentNotMatchingBounds_extends_regressionInIssue18468Fix', () {
+ final __test = new StaticTypeWarningCodeTest();
+ runJUnitTest(__test, __test.test_typeArgumentNotMatchingBounds_extends_regressionInIssue18468Fix);
+ });
_ut.test('test_typeArgumentNotMatchingBounds_fieldFormalParameter', () {
final __test = new StaticTypeWarningCodeTest();
runJUnitTest(__test, __test.test_typeArgumentNotMatchingBounds_fieldFormalParameter);
« no previous file with comments | « pkg/analyzer/test/generated/parser_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698