| Index: pkg/dev_compiler/test/codegen_test.dart
|
| diff --git a/pkg/dev_compiler/test/codegen_test.dart b/pkg/dev_compiler/test/codegen_test.dart
|
| index ef89c6db85a8c1539e76d82ba155075003528679..8a32896300cd2eb3e96819da93ca11ecb5eedbcd 100644
|
| --- a/pkg/dev_compiler/test/codegen_test.dart
|
| +++ b/pkg/dev_compiler/test/codegen_test.dart
|
| @@ -12,6 +12,7 @@ library dev_compiler.test.codegen_test;
|
| // compiles stuff. This should be changed to not use unittest and just be a
|
| // regular program that outputs files.
|
|
|
| +import 'dart:async';
|
| import 'dart:io' show Directory, File, Platform;
|
| import 'package:analyzer/analyzer.dart'
|
| show
|
| @@ -126,7 +127,7 @@ main(List<String> arguments) {
|
| if (codeCoverage && !isTopLevelTest) continue;
|
|
|
| var name = path.withoutExtension(relativePath);
|
| - test('dartdevc $name', () {
|
| + test('dartdevc $name', () async {
|
| // Check if we need to use special compile options.
|
| var contents = new File(testFile).readAsStringSync();
|
| var match = testFileOptionsMatcher.firstMatch(contents);
|
| @@ -158,7 +159,7 @@ main(List<String> arguments) {
|
| JSModuleFile module = null;
|
| var error, trace;
|
| try {
|
| - module = compiler.compile(unit, options);
|
| + module = await compiler.compile(unit, options);
|
| } catch (e, t) {
|
| error = e;
|
| trace = t;
|
| @@ -198,8 +199,8 @@ main(List<String> arguments) {
|
| }
|
|
|
| if (filePattern.hasMatch('sunflower')) {
|
| - test('sunflower', () {
|
| - _buildSunflower(sharedCompiler, codegenOutputDir, codegenExpectDir);
|
| + test('sunflower', () async {
|
| + await _buildSunflower(sharedCompiler, codegenOutputDir, codegenExpectDir);
|
| });
|
| }
|
|
|
| @@ -239,8 +240,8 @@ void _writeModule(String outPath, String expectPath, ModuleFormat format,
|
| }
|
| }
|
|
|
| -void _buildSunflower(
|
| - ModuleCompiler compiler, String outputDir, String expectDir) {
|
| +Future<Null> _buildSunflower(
|
| + ModuleCompiler compiler, String outputDir, String expectDir) async {
|
| var baseDir = path.join(codegenDir, 'sunflower');
|
| var files = ['sunflower', 'circle', 'painter']
|
| .map((f) => path.join(baseDir, '$f.dart'))
|
| @@ -248,7 +249,7 @@ void _buildSunflower(
|
| var input = new BuildUnit('sunflower', baseDir, files, _moduleForLibrary);
|
| var options = new CompilerOptions(summarizeApi: false);
|
|
|
| - var built = compiler.compile(input, options);
|
| + var built = await compiler.compile(input, options);
|
| _writeModule(path.join(outputDir, 'sunflower', 'sunflower'),
|
| path.join(expectDir, 'sunflower', 'sunflower'), ModuleFormat.amd, built);
|
| }
|
|
|