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

Side by Side Diff: compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java

Issue 10134035: Fix a bug that caused private names from an imported library to be included in the name scope of th… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 package com.google.dart.compiler.resolver; 5 package com.google.dart.compiler.resolver;
6 6
7 import com.google.common.base.Joiner; 7 import com.google.common.base.Joiner;
8 import com.google.common.base.Splitter; 8 import com.google.common.base.Splitter;
9 import com.google.common.collect.Lists; 9 import com.google.common.collect.Lists;
10 import com.google.dart.compiler.DartCompilationError; 10 import com.google.dart.compiler.DartCompilationError;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 resetParseErrors(); 49 resetParseErrors();
50 } 50 }
51 51
52 @Override 52 @Override
53 public void tearDown() { 53 public void tearDown() {
54 resetParseErrors(); 54 resetParseErrors();
55 } 55 }
56 56
57 private static CoreTypeProvider setupTypeProvider(DartUnit unit, TestCompilerC ontext context, Scope scope) { 57 private static CoreTypeProvider setupTypeProvider(DartUnit unit, TestCompilerC ontext context, Scope scope) {
58 new TopLevelElementBuilder().exec(unit.getLibrary(), unit, context); 58 new TopLevelElementBuilder().exec(unit.getLibrary(), unit, context);
59 new TopLevelElementBuilder().fillInUnitScope(unit, context, scope); 59 new TopLevelElementBuilder().fillInUnitScope(unit, context, scope, true);
60 ClassElement object = (ClassElement) scope.findElement(null, "Object"); 60 ClassElement object = (ClassElement) scope.findElement(null, "Object");
61 assertNotNull("Cannot resolve Object", object); 61 assertNotNull("Cannot resolve Object", object);
62 return new MockCoreTypeProvider(object); 62 return new MockCoreTypeProvider(object);
63 } 63 }
64 64
65 static Scope resolve(DartUnit unit, TestCompilerContext context) { 65 static Scope resolve(DartUnit unit, TestCompilerContext context) {
66 LibraryUnit libraryUnit = MockLibraryUnit.create(unit); 66 LibraryUnit libraryUnit = MockLibraryUnit.create(unit);
67 67
68 // Prepare for running phases. 68 // Prepare for running phases.
69 Scope scope = libraryUnit.getElement().getScope(); 69 Scope scope = libraryUnit.getElement().getScope();
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 public void onError(DartCompilationError event) { 545 public void onError(DartCompilationError event) {
546 resolveErrors.add(event); 546 resolveErrors.add(event);
547 } 547 }
548 }; 548 };
549 // resolve and check errors 549 // resolve and check errors
550 resolveCompileTimeConst(unit, ctx); 550 resolveCompileTimeConst(unit, ctx);
551 ErrorExpectation.assertErrors(resolveErrors, expectedErrors); 551 ErrorExpectation.assertErrors(resolveErrors, expectedErrors);
552 return resolveErrors; 552 return resolveErrors;
553 } 553 }
554 } 554 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698