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

Side by Side Diff: tests/compiler/dart2js/benign_error_test.dart

Issue 2936233003: Remove Compiler.mainApp and Compiler.mainFunction (Closed)
Patch Set: Created 3 years, 6 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 // Test that benign error do not prevent compilation. 5 // Test that benign error do not prevent compilation.
6 6
7 import 'memory_compiler.dart'; 7 import 'memory_compiler.dart';
8 8
9 import 'package:async_helper/async_helper.dart'; 9 import 'package:async_helper/async_helper.dart';
10 import 'package:compiler/src/compiler.dart'; 10 import 'package:compiler/src/compiler.dart';
(...skipping 16 matching lines...) Expand all
27 example = {'main.dart': example}; 27 example = {'main.dart': example};
28 } 28 }
29 DiagnosticCollector collector = new DiagnosticCollector(); 29 DiagnosticCollector collector = new DiagnosticCollector();
30 CompilationResult result = await runCompiler( 30 CompilationResult result = await runCompiler(
31 memorySourceFiles: example, diagnosticHandler: collector); 31 memorySourceFiles: example, diagnosticHandler: collector);
32 Expect.isTrue(result.isSuccess); 32 Expect.isTrue(result.isSuccess);
33 Expect 33 Expect
34 .isTrue(collector.errors.any((message) => message.messageKind == kind)); 34 .isTrue(collector.errors.any((message) => message.messageKind == kind));
35 Compiler compiler = result.compiler; 35 Compiler compiler = result.compiler;
36 JavaScriptBackend backend = compiler.backend; 36 JavaScriptBackend backend = compiler.backend;
37 Expect.isNotNull(backend.generatedCode[compiler.mainFunction]); 37 Expect.isNotNull(backend.generatedCode[
38 compiler.frontendStrategy.elementEnvironment.mainFunction]);
38 } 39 }
39 } 40 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/assert_message_throw_test.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698