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

Unified Diff: tests/compiler/dart2js/type_representation_test.dart

Issue 2809203003: Remove Compiler/JavaScriptBackend from metadata_collector (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/type_representation_test.dart
diff --git a/tests/compiler/dart2js/type_representation_test.dart b/tests/compiler/dart2js/type_representation_test.dart
index 0de157816ef8ea795b1f9f1c64023872b0de56e9..f7ab52b4a99e0ec177df6e367658427a32e8c4d7 100644
--- a/tests/compiler/dart2js/type_representation_test.dart
+++ b/tests/compiler/dart2js/type_representation_test.dart
@@ -54,27 +54,32 @@ void testTypeRepresentations() {
env.compiler.backend.constants,
const TypeMaskStrategy()));
TypeRepresentationGenerator typeRepresentation =
- new TypeRepresentationGenerator(
- env.compiler.backend.namer, env.compiler.backend.emitter);
+ new TypeRepresentationGenerator(env.compiler.backend.namer);
Expression onVariable(ResolutionTypeVariableType variable) {
return new VariableUse(variable.name);
}
String stringify(Expression expression) {
- return prettyPrint(expression, env.compiler);
+ return prettyPrint(expression, env.compiler.options);
}
void expect(ResolutionDartType type, String expectedRepresentation,
[String expectedTypedefRepresentation]) {
bool encodeTypedefName = false;
Expression expression = typeRepresentation.getTypeRepresentation(
- type, onVariable, (x) => encodeTypedefName);
+ env.compiler.backend.emitter.emitter,
+ type,
+ onVariable,
+ (x) => encodeTypedefName);
Expect.stringEquals(expectedRepresentation, stringify(expression));
encodeTypedefName = true;
expression = typeRepresentation.getTypeRepresentation(
- type, onVariable, (x) => encodeTypedefName);
+ env.compiler.backend.emitter.emitter,
+ type,
+ onVariable,
+ (x) => encodeTypedefName);
if (expectedTypedefRepresentation == null) {
expectedTypedefRepresentation = expectedRepresentation;
}
@@ -83,7 +88,8 @@ void testTypeRepresentations() {
}
String getJsName(Element cls) {
- Expression name = typeRepresentation.getJavaScriptClassName(cls);
+ Expression name = typeRepresentation.getJavaScriptClassName(
+ cls, env.compiler.backend.emitter.emitter);
return stringify(name);
}

Powered by Google App Engine
This is Rietveld 408576698