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

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

Issue 29313003: Don't evaluate << because of possible overflow. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer_experimental/lib/src/generated/resolver.dart ('k') | tests/co19/co19-analyzer2.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_experimental/test/generated/resolver_test.dart
diff --git a/pkg/analyzer_experimental/test/generated/resolver_test.dart b/pkg/analyzer_experimental/test/generated/resolver_test.dart
index 0141f5a6af552d9be294c002158517e56829e343..9620ea8870338bc103a1f5d62e43f393f45cfc96 100644
--- a/pkg/analyzer_experimental/test/generated/resolver_test.dart
+++ b/pkg/analyzer_experimental/test/generated/resolver_test.dart
@@ -1599,6 +1599,22 @@ class NonErrorResolverTest extends ResolverTestCase {
assertNoErrors(source);
verify([source]);
}
+ void test_functionWithoutCall() {
+ Source source = addSource(EngineTestCase.createSource([
+ "abstract class A implements Function {",
+ "}",
+ "class B implements A {",
+ " void call() {}",
+ "}",
+ "class C extends A {",
+ " void call() {}",
+ "}",
+ "class D extends C {",
+ "}"]));
+ resolve(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
void test_implicitThisReferenceInInitializer_constructorName() {
Source source = addSource(EngineTestCase.createSource([
"class A {",
@@ -3746,6 +3762,10 @@ class NonErrorResolverTest extends ResolverTestCase {
final __test = new NonErrorResolverTest();
runJUnitTest(__test, __test.test_functionTypeAlias_scope_signature);
});
+ _ut.test('test_functionWithoutCall', () {
+ final __test = new NonErrorResolverTest();
+ runJUnitTest(__test, __test.test_functionWithoutCall);
+ });
_ut.test('test_implicitThisReferenceInInitializer_constructorName', () {
final __test = new NonErrorResolverTest();
runJUnitTest(__test, __test.test_implicitThisReferenceInInitializer_constructorName);
@@ -13856,6 +13876,32 @@ class StaticWarningCodeTest extends ResolverTestCase {
assertErrors(source, [StaticWarningCode.FINAL_NOT_INITIALIZED]);
verify([source]);
}
+ void test_functionWithoutCall_direct() {
+ Source source = addSource(EngineTestCase.createSource(["class A implements Function {", "}"]));
+ resolve(source);
+ assertErrors(source, [StaticWarningCode.FUNCTION_WITHOUT_CALL]);
+ verify([source]);
+ }
+ void test_functionWithoutCall_indirect_extends() {
+ Source source = addSource(EngineTestCase.createSource([
+ "abstract class A implements Function {",
+ "}",
+ "class B extends A {",
+ "}"]));
+ resolve(source);
+ assertErrors(source, [StaticWarningCode.FUNCTION_WITHOUT_CALL]);
+ verify([source]);
+ }
+ void test_functionWithoutCall_indirect_implements() {
+ Source source = addSource(EngineTestCase.createSource([
+ "abstract class A implements Function {",
+ "}",
+ "class B implements A {",
+ "}"]));
+ resolve(source);
+ assertErrors(source, [StaticWarningCode.FUNCTION_WITHOUT_CALL]);
+ verify([source]);
+ }
void test_importDuplicatedLibraryName() {
Source source = addSource(EngineTestCase.createSource([
"library test;",
@@ -15169,6 +15215,18 @@ class StaticWarningCodeTest extends ResolverTestCase {
final __test = new StaticWarningCodeTest();
runJUnitTest(__test, __test.test_finalNotInitialized_local_final);
});
+ _ut.test('test_functionWithoutCall_direct', () {
+ final __test = new StaticWarningCodeTest();
+ runJUnitTest(__test, __test.test_functionWithoutCall_direct);
+ });
+ _ut.test('test_functionWithoutCall_indirect_extends', () {
+ final __test = new StaticWarningCodeTest();
+ runJUnitTest(__test, __test.test_functionWithoutCall_indirect_extends);
+ });
+ _ut.test('test_functionWithoutCall_indirect_implements', () {
+ final __test = new StaticWarningCodeTest();
+ runJUnitTest(__test, __test.test_functionWithoutCall_indirect_implements);
+ });
_ut.test('test_importDuplicatedLibraryName', () {
final __test = new StaticWarningCodeTest();
runJUnitTest(__test, __test.test_importDuplicatedLibraryName);
« no previous file with comments | « pkg/analyzer_experimental/lib/src/generated/resolver.dart ('k') | tests/co19/co19-analyzer2.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698