| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library dart_backend.test_helper; | 5 library dart_backend.test_helper; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'package:async_helper/async_helper.dart'; | 8 import 'package:async_helper/async_helper.dart'; |
| 9 import 'package:compiler/implementation/dart2jslib.dart'; | 9 import 'package:compiler/src/dart2jslib.dart'; |
| 10 import '../../../../pkg/analyzer2dart/test/test_helper.dart'; | 10 import '../../../../pkg/analyzer2dart/test/test_helper.dart'; |
| 11 import '../compiler_helper.dart'; | 11 import '../compiler_helper.dart'; |
| 12 | 12 |
| 13 /// Compiles the given dart code (which must include a 'main' function) and | 13 /// Compiles the given dart code (which must include a 'main' function) and |
| 14 /// returns the compiler. | 14 /// returns the compiler. |
| 15 Future<Compiler> compilerFor(String code) { | 15 Future<Compiler> compilerFor(String code) { |
| 16 MockCompiler compiler = new MockCompiler.internal( | 16 MockCompiler compiler = new MockCompiler.internal( |
| 17 emitJavaScript: false, | 17 emitJavaScript: false, |
| 18 enableMinification: false); | 18 enableMinification: false); |
| 19 compiler.diagnosticHandler = createHandler(compiler, code); | 19 compiler.diagnosticHandler = createHandler(compiler, code); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 34 compiler.irBuilder.buildNodes(useNewBackend: true); | 34 compiler.irBuilder.buildNodes(useNewBackend: true); |
| 35 | 35 |
| 36 return compiler; | 36 return compiler; |
| 37 }); | 37 }); |
| 38 } | 38 } |
| 39 | 39 |
| 40 /// Test group using async_helper. | 40 /// Test group using async_helper. |
| 41 asyncTester(Group group, RunTest runTest) { | 41 asyncTester(Group group, RunTest runTest) { |
| 42 asyncTest(() => Future.forEach(group.results, runTest)); | 42 asyncTest(() => Future.forEach(group.results, runTest)); |
| 43 } | 43 } |
| OLD | NEW |