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

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

Issue 9124006: Blacklist types from core library, issue 969 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use Set for checking type names. Created 8 years, 11 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 new CompileTimeConstantResolver().exec(unit, context, scope, typeProvider); 86 new CompileTimeConstantResolver().exec(unit, context, scope, typeProvider);
87 new CompileTimeConstantAnalyzer(typeProvider, context).exec(unit); 87 new CompileTimeConstantAnalyzer(typeProvider, context).exec(unit);
88 return scope; 88 return scope;
89 } 89 }
90 90
91 91
92 static DartClass makeClass(String name, DartTypeNode supertype, String... type Parameters) { 92 static DartClass makeClass(String name, DartTypeNode supertype, String... type Parameters) {
93 return makeClass(name, supertype, Collections.<DartTypeNode>emptyList(), typ eParameters); 93 return makeClass(name, supertype, Collections.<DartTypeNode>emptyList(), typ eParameters);
94 } 94 }
95 95
96 static DartClass makeInterface(String name, String... typeParameters) {
97 return makeInterface(name, Collections.<DartTypeNode>emptyList(), null, type Parameters);
98 }
99
96 static DartClass makeClass(String name, DartTypeNode supertype, List<DartTypeN ode> interfaces, 100 static DartClass makeClass(String name, DartTypeNode supertype, List<DartTypeN ode> interfaces,
97 String... typeParameters) { 101 String... typeParameters) {
98 List<DartTypeParameter> parameterNodes = new ArrayList<DartTypeParameter>(); 102 List<DartTypeParameter> parameterNodes = new ArrayList<DartTypeParameter>();
99 for (String parameter : typeParameters) { 103 for (String parameter : typeParameters) {
100 parameterNodes.add(makeTypeVariable(parameter)); 104 parameterNodes.add(makeTypeVariable(parameter));
101 } 105 }
102 List<DartNode> members = Arrays.<DartNode>asList(); 106 List<DartNode> members = Arrays.<DartNode>asList();
103 return new DartClass(new DartIdentifier(name), null, supertype, 107 return new DartClass(new DartIdentifier(name), null, supertype,
104 interfaces, members, parameterNodes, Modifiers.NONE); 108 interfaces, members, parameterNodes, Modifiers.NONE);
105 } 109 }
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 public void onError(DartCompilationError event) { 480 public void onError(DartCompilationError event) {
477 resolveErrors.add(event); 481 resolveErrors.add(event);
478 } 482 }
479 }; 483 };
480 // resolve and check errors 484 // resolve and check errors
481 resolveCompileTimeConst(unit, ctx); 485 resolveCompileTimeConst(unit, ctx);
482 ErrorExpectation.assertErrors(resolveErrors, expectedErrors); 486 ErrorExpectation.assertErrors(resolveErrors, expectedErrors);
483 return resolveErrors; 487 return resolveErrors;
484 } 488 }
485 } 489 }
OLDNEW
« no previous file with comments | « compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698