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

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

Issue 2296773002: Revert "Move error checking from scope creation to error reporter" (TBD) (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/test/generated/non_error_resolver_test.dart ('k') | pkg/analyzer/test/src/task/dart_test.dart » ('j') | 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 7e8a63910f9e81563481f21953f6d75a54539197..cd87a6fd01c74b2e2b5ab981b1e3653a130674d8 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -198,12 +198,13 @@ class EnclosedScopeTest extends ResolverTestCase {
Scope rootScope =
new Scope_EnclosedScopeTest_test_define_duplicate(listener);
EnclosedScope scope = new EnclosedScope(rootScope);
- SimpleIdentifier identifier = AstFactory.identifier3("v1");
- VariableElement element1 = ElementFactory.localVariableElement(identifier);
- VariableElement element2 = ElementFactory.localVariableElement(identifier);
+ VariableElement element1 =
+ ElementFactory.localVariableElement(AstFactory.identifier3("v1"));
+ VariableElement element2 =
+ ElementFactory.localVariableElement(AstFactory.identifier3("v1"));
scope.define(element1);
scope.define(element2);
- expect(scope.lookup(identifier, null), element1);
+ listener.assertErrorsWithSeverities([ErrorSeverity.ERROR]);
}
void test_define_normal() {
@@ -598,12 +599,13 @@ class ScopeTest extends ResolverTestCase {
void test_define_duplicate() {
GatheringErrorListener errorListener = new GatheringErrorListener();
ScopeTest_TestScope scope = new ScopeTest_TestScope(errorListener);
- SimpleIdentifier identifier = AstFactory.identifier3("v1");
- VariableElement element1 = ElementFactory.localVariableElement(identifier);
- VariableElement element2 = ElementFactory.localVariableElement(identifier);
+ VariableElement element1 =
+ ElementFactory.localVariableElement(AstFactory.identifier3("v1"));
+ VariableElement element2 =
+ ElementFactory.localVariableElement(AstFactory.identifier3("v1"));
scope.define(element1);
scope.define(element2);
- expect(scope.lookup(identifier, null), element1);
+ errorListener.assertErrorsWithSeverities([ErrorSeverity.ERROR]);
}
void test_define_normal() {
« no previous file with comments | « pkg/analyzer/test/generated/non_error_resolver_test.dart ('k') | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698