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

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

Issue 2875313002: Access BackendUsage through ClosedWorld (Closed)
Patch Set: Created 3 years, 7 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/no_such_method_enabled_test.dart
diff --git a/tests/compiler/dart2js/no_such_method_enabled_test.dart b/tests/compiler/dart2js/no_such_method_enabled_test.dart
index 774fbd104df7002d86a1add23c9ca2509c688335..fef7e738b5e7cc270f9152fbe1e4001633fdb27d 100644
--- a/tests/compiler/dart2js/no_such_method_enabled_test.dart
+++ b/tests/compiler/dart2js/no_such_method_enabled_test.dart
@@ -8,6 +8,7 @@ import 'package:compiler/src/common_elements.dart';
import 'package:compiler/src/compiler.dart';
import 'package:compiler/src/elements/entities.dart';
import 'package:compiler/src/js_backend/no_such_method_registry.dart';
+import 'package:compiler/src/world.dart';
import 'package:expect/expect.dart';
import 'kernel/compiler_helper.dart';
import 'compiler_helper.dart';
@@ -259,6 +260,7 @@ main() {
print('---- testing with kernel --------------------------------------');
print(sources[index]);
Compiler compiler = await results[index]();
+ compiler.resolutionWorldBuilder.closeWorld();
// Complex returns are computed during inference.
checkTest(compiler, TESTS[index], testComplexReturns: false);
}
@@ -271,6 +273,8 @@ checkTest(Compiler compiler, NoSuchMethodTest test, {bool testComplexReturns}) {
NoSuchMethodResolver resolver = registry.internalResolverForTesting;
FunctionEntity ObjectNSM = elementEnvironment.lookupClassMember(
compiler.commonElements.objectClass, 'noSuchMethod');
+ ClosedWorld closedWorld =
+ compiler.resolutionWorldBuilder.closedWorldForTesting;
// Test [NoSuchMethodResolver] results for each method.
for (NoSuchMethodInfo info in test.methods) {
@@ -345,6 +349,6 @@ checkTest(Compiler compiler, NoSuchMethodTest test, {bool testComplexReturns}) {
Expect.equals(
test.isNoSuchMethodUsed,
- compiler.backend.backendUsage.isNoSuchMethodUsed,
+ closedWorld.backendUsage.isNoSuchMethodUsed,
"Unexpected isNoSuchMethodUsed result.");
}
« no previous file with comments | « tests/compiler/dart2js/kernel/closed_world_test.dart ('k') | tests/compiler/dart2js/serialization/model_test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698