| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 library fasta.testing.suite; | 5 library fasta.testing.suite; |
| 6 | 6 |
| 7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
| 8 | 8 |
| 9 import 'dart:io' show File; | 9 import 'dart:io' show File; |
| 10 | 10 |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 String get name { | 202 String get name { |
| 203 return fullCompile ? "${astKind} compile" : "outline"; | 203 return fullCompile ? "${astKind} compile" : "outline"; |
| 204 } | 204 } |
| 205 | 205 |
| 206 bool get isCompiler => fullCompile; | 206 bool get isCompiler => fullCompile; |
| 207 | 207 |
| 208 Future<Result<Program>> run( | 208 Future<Result<Program>> run( |
| 209 TestDescription description, FastaContext context) async { | 209 TestDescription description, FastaContext context) async { |
| 210 Program platformOutline = await context.loadPlatformOutline(); | 210 Program platformOutline = await context.loadPlatformOutline(); |
| 211 Ticker ticker = new Ticker(); | 211 Ticker ticker = new Ticker(); |
| 212 DillTarget dillTarget = new DillTarget(ticker, context.uriTranslator); | 212 DillTarget dillTarget = new DillTarget(ticker, context.uriTranslator, "vm"); |
| 213 platformOutline.unbindCanonicalNames(); | 213 platformOutline.unbindCanonicalNames(); |
| 214 dillTarget.loader.appendLibraries(platformOutline); | 214 dillTarget.loader.appendLibraries(platformOutline); |
| 215 KernelTarget sourceTarget = astKind == AstKind.Analyzer | 215 KernelTarget sourceTarget = astKind == AstKind.Analyzer |
| 216 ? new AnalyzerTarget(dillTarget, context.uriTranslator, strongMode) | 216 ? new AnalyzerTarget(dillTarget, context.uriTranslator, strongMode) |
| 217 : new KernelTarget(PhysicalFileSystem.instance, dillTarget, | 217 : new KernelTarget(PhysicalFileSystem.instance, dillTarget, |
| 218 context.uriTranslator, strongMode); | 218 context.uriTranslator, strongMode); |
| 219 | 219 |
| 220 Program p; | 220 Program p; |
| 221 try { | 221 try { |
| 222 sourceTarget.read(description.uri); | 222 sourceTarget.read(description.uri); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 238 return fail(null, instrumentation.problemsAsString); | 238 return fail(null, instrumentation.problemsAsString); |
| 239 } | 239 } |
| 240 } | 240 } |
| 241 } | 241 } |
| 242 } on InputError catch (e, s) { | 242 } on InputError catch (e, s) { |
| 243 return fail(null, e.error, s); | 243 return fail(null, e.error, s); |
| 244 } | 244 } |
| 245 return pass(p); | 245 return pass(p); |
| 246 } | 246 } |
| 247 } | 247 } |
| OLD | NEW |