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

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

Issue 197213036: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove marker Created 6 years, 9 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
« pkg/analyzer/pubspec.yaml ('K') | « pkg/analyzer/pubspec.yaml ('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 7315085936cb31a3a651ff64223706bd48b115fd..d34648042cd7a5a56d1252442d9795a8ec8ea5b3 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -11670,7 +11670,7 @@ class CompileTimeErrorCodeTest extends ResolverTestCase {
verify([source]);
}
- void test_extendsDisallowedClass_bool() {
+ void test_extendsDisallowedClass_class_bool() {
Source source = addSource(EngineTestCase.createSource(["class A extends bool {}"]));
resolve(source);
assertErrors(source, [
@@ -11679,7 +11679,7 @@ class CompileTimeErrorCodeTest extends ResolverTestCase {
verify([source]);
}
- void test_extendsDisallowedClass_double() {
+ void test_extendsDisallowedClass_class_double() {
Source source = addSource(EngineTestCase.createSource(["class A extends double {}"]));
resolve(source);
assertErrors(source, [
@@ -11688,7 +11688,7 @@ class CompileTimeErrorCodeTest extends ResolverTestCase {
verify([source]);
}
- void test_extendsDisallowedClass_int() {
+ void test_extendsDisallowedClass_class_int() {
Source source = addSource(EngineTestCase.createSource(["class A extends int {}"]));
resolve(source);
assertErrors(source, [
@@ -11697,7 +11697,7 @@ class CompileTimeErrorCodeTest extends ResolverTestCase {
verify([source]);
}
- void test_extendsDisallowedClass_Null() {
+ void test_extendsDisallowedClass_class_Null() {
Source source = addSource(EngineTestCase.createSource(["class A extends Null {}"]));
resolve(source);
assertErrors(source, [
@@ -11706,7 +11706,7 @@ class CompileTimeErrorCodeTest extends ResolverTestCase {
verify([source]);
}
- void test_extendsDisallowedClass_num() {
+ void test_extendsDisallowedClass_class_num() {
Source source = addSource(EngineTestCase.createSource(["class A extends num {}"]));
resolve(source);
assertErrors(source, [
@@ -11715,7 +11715,7 @@ class CompileTimeErrorCodeTest extends ResolverTestCase {
verify([source]);
}
- void test_extendsDisallowedClass_String() {
+ void test_extendsDisallowedClass_class_String() {
Source source = addSource(EngineTestCase.createSource(["class A extends String {}"]));
resolve(source);
assertErrors(source, [
@@ -11724,6 +11724,48 @@ class CompileTimeErrorCodeTest extends ResolverTestCase {
verify([source]);
}
+ void test_extendsDisallowedClass_classTypeAlias_bool() {
+ Source source = addSource(EngineTestCase.createSource(["class C = bool;"]));
+ resolve(source);
+ assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
+ verify([source]);
+ }
+
+ void test_extendsDisallowedClass_classTypeAlias_double() {
+ Source source = addSource(EngineTestCase.createSource(["class C = double;"]));
+ resolve(source);
+ assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
+ verify([source]);
+ }
+
+ void test_extendsDisallowedClass_classTypeAlias_int() {
+ Source source = addSource(EngineTestCase.createSource(["class C = int;"]));
+ resolve(source);
+ assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
+ verify([source]);
+ }
+
+ void test_extendsDisallowedClass_classTypeAlias_Null() {
+ Source source = addSource(EngineTestCase.createSource(["class C = Null;"]));
+ resolve(source);
+ assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
+ verify([source]);
+ }
+
+ void test_extendsDisallowedClass_classTypeAlias_num() {
+ Source source = addSource(EngineTestCase.createSource(["class C = num;"]));
+ resolve(source);
+ assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
+ verify([source]);
+ }
+
+ void test_extendsDisallowedClass_classTypeAlias_String() {
+ Source source = addSource(EngineTestCase.createSource(["class C = String;"]));
+ resolve(source);
+ assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
+ verify([source]);
+ }
+
void test_extendsNonClass_class() {
Source source = addSource(EngineTestCase.createSource(["int A;", "class B extends A {}"]));
resolve(source);
@@ -11933,48 +11975,108 @@ class CompileTimeErrorCodeTest extends ResolverTestCase {
verify([source]);
}
- void test_implementsDisallowedClass_bool() {
+ void test_implementsDisallowedClass_class_bool() {
Source source = addSource(EngineTestCase.createSource(["class A implements bool {}"]));
resolve(source);
assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
verify([source]);
}
- void test_implementsDisallowedClass_double() {
+ void test_implementsDisallowedClass_class_double() {
Source source = addSource(EngineTestCase.createSource(["class A implements double {}"]));
resolve(source);
assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
verify([source]);
}
- void test_implementsDisallowedClass_int() {
+ void test_implementsDisallowedClass_class_int() {
Source source = addSource(EngineTestCase.createSource(["class A implements int {}"]));
resolve(source);
assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
verify([source]);
}
- void test_implementsDisallowedClass_Null() {
+ void test_implementsDisallowedClass_class_Null() {
Source source = addSource(EngineTestCase.createSource(["class A implements Null {}"]));
resolve(source);
assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
verify([source]);
}
- void test_implementsDisallowedClass_num() {
+ void test_implementsDisallowedClass_class_num() {
Source source = addSource(EngineTestCase.createSource(["class A implements num {}"]));
resolve(source);
assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
verify([source]);
}
- void test_implementsDisallowedClass_String() {
+ void test_implementsDisallowedClass_class_String() {
Source source = addSource(EngineTestCase.createSource(["class A implements String {}"]));
resolve(source);
assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
verify([source]);
}
+ void test_implementsDisallowedClass_class_String_num() {
+ Source source = addSource(EngineTestCase.createSource(["class A implements String, num {}"]));
+ resolve(source);
+ assertErrors(source, [
+ CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
+ CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
+ verify([source]);
+ }
+
+ void test_implementsDisallowedClass_classTypeAlias_bool() {
+ Source source = addSource(EngineTestCase.createSource(["class A {}", "class C = A implements bool;"]));
+ resolve(source);
+ assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
+ verify([source]);
+ }
+
+ void test_implementsDisallowedClass_classTypeAlias_double() {
+ Source source = addSource(EngineTestCase.createSource(["class A {}", "class C = A implements double;"]));
+ resolve(source);
+ assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
+ verify([source]);
+ }
+
+ void test_implementsDisallowedClass_classTypeAlias_int() {
+ Source source = addSource(EngineTestCase.createSource(["class A {}", "class C = A implements int;"]));
+ resolve(source);
+ assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
+ verify([source]);
+ }
+
+ void test_implementsDisallowedClass_classTypeAlias_Null() {
+ Source source = addSource(EngineTestCase.createSource(["class A {}", "class C = A implements Null;"]));
+ resolve(source);
+ assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
+ verify([source]);
+ }
+
+ void test_implementsDisallowedClass_classTypeAlias_num() {
+ Source source = addSource(EngineTestCase.createSource(["class A {}", "class C = A implements num;"]));
+ resolve(source);
+ assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
+ verify([source]);
+ }
+
+ void test_implementsDisallowedClass_classTypeAlias_String() {
+ Source source = addSource(EngineTestCase.createSource(["class A {}", "class C = A implements String;"]));
+ resolve(source);
+ assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
+ verify([source]);
+ }
+
+ void test_implementsDisallowedClass_classTypeAlias_String_num() {
+ Source source = addSource(EngineTestCase.createSource(["class A {}", "class C = A implements String, num;"]));
+ resolve(source);
+ assertErrors(source, [
+ CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
+ CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
+ verify([source]);
+ }
+
void test_implementsDynamic() {
Source source = addSource(EngineTestCase.createSource(["class A implements dynamic {}"]));
resolve(source);
@@ -12610,48 +12712,99 @@ class CompileTimeErrorCodeTest extends ResolverTestCase {
verify([source]);
}
- void test_mixinOfDisallowedClass_bool() {
+ void test_mixinOfDisallowedClass_class_bool() {
Source source = addSource(EngineTestCase.createSource(["class A extends Object with bool {}"]));
resolve(source);
assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
verify([source]);
}
- void test_mixinOfDisallowedClass_double() {
+ void test_mixinOfDisallowedClass_class_double() {
Source source = addSource(EngineTestCase.createSource(["class A extends Object with double {}"]));
resolve(source);
assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
verify([source]);
}
- void test_mixinOfDisallowedClass_int() {
+ void test_mixinOfDisallowedClass_class_int() {
Source source = addSource(EngineTestCase.createSource(["class A extends Object with int {}"]));
resolve(source);
assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
verify([source]);
}
- void test_mixinOfDisallowedClass_Null() {
+ void test_mixinOfDisallowedClass_class_Null() {
Source source = addSource(EngineTestCase.createSource(["class A extends Object with Null {}"]));
resolve(source);
assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
verify([source]);
}
- void test_mixinOfDisallowedClass_num() {
+ void test_mixinOfDisallowedClass_class_num() {
Source source = addSource(EngineTestCase.createSource(["class A extends Object with num {}"]));
resolve(source);
assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
verify([source]);
}
- void test_mixinOfDisallowedClass_String() {
+ void test_mixinOfDisallowedClass_class_String() {
Source source = addSource(EngineTestCase.createSource(["class A extends Object with String {}"]));
resolve(source);
assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
verify([source]);
}
+ void test_mixinOfDisallowedClass_classTypeAlias_bool() {
+ Source source = addSource(EngineTestCase.createSource(["class A {}", "class C = A with bool;"]));
+ resolve(source);
+ assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
+ verify([source]);
+ }
+
+ void test_mixinOfDisallowedClass_classTypeAlias_double() {
+ Source source = addSource(EngineTestCase.createSource(["class A {}", "class C = A with double;"]));
+ resolve(source);
+ assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
+ verify([source]);
+ }
+
+ void test_mixinOfDisallowedClass_classTypeAlias_int() {
+ Source source = addSource(EngineTestCase.createSource(["class A {}", "class C = A with int;"]));
+ resolve(source);
+ assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
+ verify([source]);
+ }
+
+ void test_mixinOfDisallowedClass_classTypeAlias_Null() {
+ Source source = addSource(EngineTestCase.createSource(["class A {}", "class C = A with Null;"]));
+ resolve(source);
+ assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
+ verify([source]);
+ }
+
+ void test_mixinOfDisallowedClass_classTypeAlias_num() {
+ Source source = addSource(EngineTestCase.createSource(["class A {}", "class C = A with num;"]));
+ resolve(source);
+ assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
+ verify([source]);
+ }
+
+ void test_mixinOfDisallowedClass_classTypeAlias_String() {
+ Source source = addSource(EngineTestCase.createSource(["class A {}", "class C = A with String;"]));
+ resolve(source);
+ assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
+ verify([source]);
+ }
+
+ void test_mixinOfDisallowedClass_classTypeAlias_String_num() {
+ Source source = addSource(EngineTestCase.createSource(["class A {}", "class C = A with String, num;"]));
+ resolve(source);
+ assertErrors(source, [
+ CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS,
+ CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
+ verify([source]);
+ }
+
void test_mixinOfNonClass_class() {
Source source = addSource(EngineTestCase.createSource(["int A;", "class B extends Object with A {}"]));
resolve(source);
@@ -14249,29 +14402,53 @@ class CompileTimeErrorCodeTest extends ResolverTestCase {
final __test = new CompileTimeErrorCodeTest();
runJUnitTest(__test, __test.test_exportOfNonLibrary);
});
- _ut.test('test_extendsDisallowedClass_Null', () {
+ _ut.test('test_extendsDisallowedClass_classTypeAlias_Null', () {
final __test = new CompileTimeErrorCodeTest();
- runJUnitTest(__test, __test.test_extendsDisallowedClass_Null);
+ runJUnitTest(__test, __test.test_extendsDisallowedClass_classTypeAlias_Null);
});
- _ut.test('test_extendsDisallowedClass_String', () {
+ _ut.test('test_extendsDisallowedClass_classTypeAlias_String', () {
final __test = new CompileTimeErrorCodeTest();
- runJUnitTest(__test, __test.test_extendsDisallowedClass_String);
+ runJUnitTest(__test, __test.test_extendsDisallowedClass_classTypeAlias_String);
});
- _ut.test('test_extendsDisallowedClass_bool', () {
+ _ut.test('test_extendsDisallowedClass_classTypeAlias_bool', () {
final __test = new CompileTimeErrorCodeTest();
- runJUnitTest(__test, __test.test_extendsDisallowedClass_bool);
+ runJUnitTest(__test, __test.test_extendsDisallowedClass_classTypeAlias_bool);
});
- _ut.test('test_extendsDisallowedClass_double', () {
+ _ut.test('test_extendsDisallowedClass_classTypeAlias_double', () {
final __test = new CompileTimeErrorCodeTest();
- runJUnitTest(__test, __test.test_extendsDisallowedClass_double);
+ runJUnitTest(__test, __test.test_extendsDisallowedClass_classTypeAlias_double);
});
- _ut.test('test_extendsDisallowedClass_int', () {
+ _ut.test('test_extendsDisallowedClass_classTypeAlias_int', () {
final __test = new CompileTimeErrorCodeTest();
- runJUnitTest(__test, __test.test_extendsDisallowedClass_int);
+ runJUnitTest(__test, __test.test_extendsDisallowedClass_classTypeAlias_int);
});
- _ut.test('test_extendsDisallowedClass_num', () {
+ _ut.test('test_extendsDisallowedClass_classTypeAlias_num', () {
final __test = new CompileTimeErrorCodeTest();
- runJUnitTest(__test, __test.test_extendsDisallowedClass_num);
+ runJUnitTest(__test, __test.test_extendsDisallowedClass_classTypeAlias_num);
+ });
+ _ut.test('test_extendsDisallowedClass_class_Null', () {
+ final __test = new CompileTimeErrorCodeTest();
+ runJUnitTest(__test, __test.test_extendsDisallowedClass_class_Null);
+ });
+ _ut.test('test_extendsDisallowedClass_class_String', () {
+ final __test = new CompileTimeErrorCodeTest();
+ runJUnitTest(__test, __test.test_extendsDisallowedClass_class_String);
+ });
+ _ut.test('test_extendsDisallowedClass_class_bool', () {
+ final __test = new CompileTimeErrorCodeTest();
+ runJUnitTest(__test, __test.test_extendsDisallowedClass_class_bool);
+ });
+ _ut.test('test_extendsDisallowedClass_class_double', () {
+ final __test = new CompileTimeErrorCodeTest();
+ runJUnitTest(__test, __test.test_extendsDisallowedClass_class_double);
+ });
+ _ut.test('test_extendsDisallowedClass_class_int', () {
+ final __test = new CompileTimeErrorCodeTest();
+ runJUnitTest(__test, __test.test_extendsDisallowedClass_class_int);
+ });
+ _ut.test('test_extendsDisallowedClass_class_num', () {
+ final __test = new CompileTimeErrorCodeTest();
+ runJUnitTest(__test, __test.test_extendsDisallowedClass_class_num);
});
_ut.test('test_extendsNonClass_class', () {
final __test = new CompileTimeErrorCodeTest();
@@ -14361,29 +14538,61 @@ class CompileTimeErrorCodeTest extends ResolverTestCase {
final __test = new CompileTimeErrorCodeTest();
runJUnitTest(__test, __test.test_getterAndMethodWithSameName);
});
- _ut.test('test_implementsDisallowedClass_Null', () {
+ _ut.test('test_implementsDisallowedClass_classTypeAlias_Null', () {
+ final __test = new CompileTimeErrorCodeTest();
+ runJUnitTest(__test, __test.test_implementsDisallowedClass_classTypeAlias_Null);
+ });
+ _ut.test('test_implementsDisallowedClass_classTypeAlias_String', () {
+ final __test = new CompileTimeErrorCodeTest();
+ runJUnitTest(__test, __test.test_implementsDisallowedClass_classTypeAlias_String);
+ });
+ _ut.test('test_implementsDisallowedClass_classTypeAlias_String_num', () {
+ final __test = new CompileTimeErrorCodeTest();
+ runJUnitTest(__test, __test.test_implementsDisallowedClass_classTypeAlias_String_num);
+ });
+ _ut.test('test_implementsDisallowedClass_classTypeAlias_bool', () {
+ final __test = new CompileTimeErrorCodeTest();
+ runJUnitTest(__test, __test.test_implementsDisallowedClass_classTypeAlias_bool);
+ });
+ _ut.test('test_implementsDisallowedClass_classTypeAlias_double', () {
+ final __test = new CompileTimeErrorCodeTest();
+ runJUnitTest(__test, __test.test_implementsDisallowedClass_classTypeAlias_double);
+ });
+ _ut.test('test_implementsDisallowedClass_classTypeAlias_int', () {
+ final __test = new CompileTimeErrorCodeTest();
+ runJUnitTest(__test, __test.test_implementsDisallowedClass_classTypeAlias_int);
+ });
+ _ut.test('test_implementsDisallowedClass_classTypeAlias_num', () {
final __test = new CompileTimeErrorCodeTest();
- runJUnitTest(__test, __test.test_implementsDisallowedClass_Null);
+ runJUnitTest(__test, __test.test_implementsDisallowedClass_classTypeAlias_num);
});
- _ut.test('test_implementsDisallowedClass_String', () {
+ _ut.test('test_implementsDisallowedClass_class_Null', () {
final __test = new CompileTimeErrorCodeTest();
- runJUnitTest(__test, __test.test_implementsDisallowedClass_String);
+ runJUnitTest(__test, __test.test_implementsDisallowedClass_class_Null);
});
- _ut.test('test_implementsDisallowedClass_bool', () {
+ _ut.test('test_implementsDisallowedClass_class_String', () {
final __test = new CompileTimeErrorCodeTest();
- runJUnitTest(__test, __test.test_implementsDisallowedClass_bool);
+ runJUnitTest(__test, __test.test_implementsDisallowedClass_class_String);
});
- _ut.test('test_implementsDisallowedClass_double', () {
+ _ut.test('test_implementsDisallowedClass_class_String_num', () {
final __test = new CompileTimeErrorCodeTest();
- runJUnitTest(__test, __test.test_implementsDisallowedClass_double);
+ runJUnitTest(__test, __test.test_implementsDisallowedClass_class_String_num);
});
- _ut.test('test_implementsDisallowedClass_int', () {
+ _ut.test('test_implementsDisallowedClass_class_bool', () {
final __test = new CompileTimeErrorCodeTest();
- runJUnitTest(__test, __test.test_implementsDisallowedClass_int);
+ runJUnitTest(__test, __test.test_implementsDisallowedClass_class_bool);
});
- _ut.test('test_implementsDisallowedClass_num', () {
+ _ut.test('test_implementsDisallowedClass_class_double', () {
final __test = new CompileTimeErrorCodeTest();
- runJUnitTest(__test, __test.test_implementsDisallowedClass_num);
+ runJUnitTest(__test, __test.test_implementsDisallowedClass_class_double);
+ });
+ _ut.test('test_implementsDisallowedClass_class_int', () {
+ final __test = new CompileTimeErrorCodeTest();
+ runJUnitTest(__test, __test.test_implementsDisallowedClass_class_int);
+ });
+ _ut.test('test_implementsDisallowedClass_class_num', () {
+ final __test = new CompileTimeErrorCodeTest();
+ runJUnitTest(__test, __test.test_implementsDisallowedClass_class_num);
});
_ut.test('test_implementsDynamic', () {
final __test = new CompileTimeErrorCodeTest();
@@ -14673,29 +14882,57 @@ class CompileTimeErrorCodeTest extends ResolverTestCase {
final __test = new CompileTimeErrorCodeTest();
runJUnitTest(__test, __test.test_mixinInheritsFromNotObject_typeAlias_with);
});
- _ut.test('test_mixinOfDisallowedClass_Null', () {
+ _ut.test('test_mixinOfDisallowedClass_classTypeAlias_Null', () {
+ final __test = new CompileTimeErrorCodeTest();
+ runJUnitTest(__test, __test.test_mixinOfDisallowedClass_classTypeAlias_Null);
+ });
+ _ut.test('test_mixinOfDisallowedClass_classTypeAlias_String', () {
+ final __test = new CompileTimeErrorCodeTest();
+ runJUnitTest(__test, __test.test_mixinOfDisallowedClass_classTypeAlias_String);
+ });
+ _ut.test('test_mixinOfDisallowedClass_classTypeAlias_String_num', () {
+ final __test = new CompileTimeErrorCodeTest();
+ runJUnitTest(__test, __test.test_mixinOfDisallowedClass_classTypeAlias_String_num);
+ });
+ _ut.test('test_mixinOfDisallowedClass_classTypeAlias_bool', () {
final __test = new CompileTimeErrorCodeTest();
- runJUnitTest(__test, __test.test_mixinOfDisallowedClass_Null);
+ runJUnitTest(__test, __test.test_mixinOfDisallowedClass_classTypeAlias_bool);
});
- _ut.test('test_mixinOfDisallowedClass_String', () {
+ _ut.test('test_mixinOfDisallowedClass_classTypeAlias_double', () {
final __test = new CompileTimeErrorCodeTest();
- runJUnitTest(__test, __test.test_mixinOfDisallowedClass_String);
+ runJUnitTest(__test, __test.test_mixinOfDisallowedClass_classTypeAlias_double);
});
- _ut.test('test_mixinOfDisallowedClass_bool', () {
+ _ut.test('test_mixinOfDisallowedClass_classTypeAlias_int', () {
final __test = new CompileTimeErrorCodeTest();
- runJUnitTest(__test, __test.test_mixinOfDisallowedClass_bool);
+ runJUnitTest(__test, __test.test_mixinOfDisallowedClass_classTypeAlias_int);
});
- _ut.test('test_mixinOfDisallowedClass_double', () {
+ _ut.test('test_mixinOfDisallowedClass_classTypeAlias_num', () {
final __test = new CompileTimeErrorCodeTest();
- runJUnitTest(__test, __test.test_mixinOfDisallowedClass_double);
+ runJUnitTest(__test, __test.test_mixinOfDisallowedClass_classTypeAlias_num);
});
- _ut.test('test_mixinOfDisallowedClass_int', () {
+ _ut.test('test_mixinOfDisallowedClass_class_Null', () {
final __test = new CompileTimeErrorCodeTest();
- runJUnitTest(__test, __test.test_mixinOfDisallowedClass_int);
+ runJUnitTest(__test, __test.test_mixinOfDisallowedClass_class_Null);
});
- _ut.test('test_mixinOfDisallowedClass_num', () {
+ _ut.test('test_mixinOfDisallowedClass_class_String', () {
final __test = new CompileTimeErrorCodeTest();
- runJUnitTest(__test, __test.test_mixinOfDisallowedClass_num);
+ runJUnitTest(__test, __test.test_mixinOfDisallowedClass_class_String);
+ });
+ _ut.test('test_mixinOfDisallowedClass_class_bool', () {
+ final __test = new CompileTimeErrorCodeTest();
+ runJUnitTest(__test, __test.test_mixinOfDisallowedClass_class_bool);
+ });
+ _ut.test('test_mixinOfDisallowedClass_class_double', () {
+ final __test = new CompileTimeErrorCodeTest();
+ runJUnitTest(__test, __test.test_mixinOfDisallowedClass_class_double);
+ });
+ _ut.test('test_mixinOfDisallowedClass_class_int', () {
+ final __test = new CompileTimeErrorCodeTest();
+ runJUnitTest(__test, __test.test_mixinOfDisallowedClass_class_int);
+ });
+ _ut.test('test_mixinOfDisallowedClass_class_num', () {
+ final __test = new CompileTimeErrorCodeTest();
+ runJUnitTest(__test, __test.test_mixinOfDisallowedClass_class_num);
});
_ut.test('test_mixinOfNonClass_class', () {
final __test = new CompileTimeErrorCodeTest();
@@ -19889,13 +20126,18 @@ class AnalysisContextHelper {
*/
AnalysisContextHelper() {
context = AnalysisContextFactory.contextWithCore();
+ AnalysisOptionsImpl options = new AnalysisOptionsImpl.con1(context.analysisOptions);
+ options.cacheSize = 256;
+ context.analysisOptions = options;
}
Source addSource(String path, String code) {
Source source = new FileBasedSource.con1(FileUtilities2.createFile(path));
- ChangeSet changeSet = new ChangeSet();
- changeSet.addedSource(source);
- context.applyChanges(changeSet);
+ if (path.endsWith(".dart") || path.endsWith(".html")) {
+ ChangeSet changeSet = new ChangeSet();
+ changeSet.addedSource(source);
+ context.applyChanges(changeSet);
+ }
context.setContents(source, code);
return source;
}
@@ -22945,6 +23187,21 @@ class NonHintCodeTest extends ResolverTestCase {
verify([source]);
}
+ void test_unusedImport_metadata() {
+ Source source = addSource(EngineTestCase.createSource([
+ "library L;",
+ "@A(x)",
+ "import 'lib1.dart';",
+ "class A {",
+ " final int value;",
+ " const A(this.value);",
+ "}"]));
+ addNamedSource("/lib1.dart", EngineTestCase.createSource(["library lib1;", "const x = 0;"]));
+ resolve(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
void test_unusedImport_prefix_topLevelFunction() {
Source source = addSource(EngineTestCase.createSource([
"library L;",
@@ -23184,6 +23441,10 @@ class NonHintCodeTest extends ResolverTestCase {
final __test = new NonHintCodeTest();
runJUnitTest(__test, __test.test_unusedImport_export_infiniteLoop);
});
+ _ut.test('test_unusedImport_metadata', () {
+ final __test = new NonHintCodeTest();
+ runJUnitTest(__test, __test.test_unusedImport_metadata);
+ });
_ut.test('test_unusedImport_prefix_topLevelFunction', () {
final __test = new NonHintCodeTest();
runJUnitTest(__test, __test.test_unusedImport_prefix_topLevelFunction);
@@ -23416,7 +23677,7 @@ class LibraryElementBuilderTest extends EngineTestCase {
*/
LibraryElement _buildLibrary(Source librarySource, List<ErrorCode> expectedErrorCodes) {
LibraryResolver resolver = new LibraryResolver(_context);
- LibraryElementBuilder builder = new LibraryElementBuilder(resolver);
+ LibraryElementBuilder builder = new LibraryElementBuilder(resolver.analysisContext, resolver.errorListener);
Library library = resolver.createLibrary(librarySource);
LibraryElement element = builder.buildLibrary(library);
GatheringErrorListener listener = new GatheringErrorListener();
« pkg/analyzer/pubspec.yaml ('K') | « pkg/analyzer/pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698