| 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(
|
|
|