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

Unified Diff: tests/compiler/dart2js/kernel/closed_world2_test.dart

Issue 2847143002: Fix KernelEquivalence.entityEquivalence for equi-named instance/top-level members (Closed)
Patch Set: Updated cf. comment 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/kernel/closed_world2_test.dart
diff --git a/tests/compiler/dart2js/kernel/closed_world2_test.dart b/tests/compiler/dart2js/kernel/closed_world2_test.dart
index 871779d8af1d2e559dc39d3959e1cfb8edd56df8..732c76122ee828d45498dae12d71be07ffc96ca2 100644
--- a/tests/compiler/dart2js/kernel/closed_world2_test.dart
+++ b/tests/compiler/dart2js/kernel/closed_world2_test.dart
@@ -72,6 +72,7 @@ class Class2 extends Object with Mixin {
method3() {}
}
+method1() {} // Deliberately the same name as the instance member in Mixin.
@NoInline()
main() {
@@ -83,6 +84,7 @@ main() {
new Class2().method2();
new Class2().method3();
null is List<int>;
+ method1(); // Both top level and instance method named 'method1' are live.
}
'''
};
@@ -93,7 +95,9 @@ main(List<String> args) {
});
}
-Future mainInternal(List<String> args,
+enum ResultKind { crashes, errors, warnings, success, failure }
+
+Future<ResultKind> mainInternal(List<String> args,
{bool skipWarnings: false, bool skipErrors: false}) async {
Arguments arguments = new Arguments.from(args);
Uri entryPoint;
@@ -118,13 +122,17 @@ Future mainInternal(List<String> args,
ElementResolutionWorldBuilder.useInstantiationMap = true;
compiler1.resolution.retainCachesForTesting = true;
await compiler1.run(entryPoint);
+ if (collector.crashes.isNotEmpty) {
+ print('Skipping due to crashes.');
+ return ResultKind.crashes;
+ }
if (collector.errors.isNotEmpty && skipErrors) {
print('Skipping due to errors.');
- return;
+ return ResultKind.errors;
}
if (collector.warnings.isNotEmpty && skipWarnings) {
print('Skipping due to warnings.');
- return;
+ return ResultKind.warnings;
}
Expect.isFalse(compiler1.compilationFailed);
ResolutionEnqueuer enqueuer1 = compiler1.enqueuer.resolution;
@@ -179,6 +187,8 @@ Future mainInternal(List<String> args,
checkClosedWorlds(closedWorld1, closedWorld2, equivalence.entityEquivalence,
verbose: arguments.verbose);
+
+ return ResultKind.success;
}
List createKernelResolutionEnqueuerListener(
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map.dart ('k') | tests/compiler/dart2js/kernel/closed_world_tester.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698