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

Unified Diff: pkg/front_end/test/fasta/testing/suite.dart

Issue 2914773003: add check of preconditions in `run` step. (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/test/fasta/testing/suite.dart
diff --git a/pkg/front_end/test/fasta/testing/suite.dart b/pkg/front_end/test/fasta/testing/suite.dart
index 49ab8d3481d5aabc99f084861a360536b10d6b32..dcbedbc151ec0dedc9410e32c24c6b3a10efc379 100644
--- a/pkg/front_end/test/fasta/testing/suite.dart
+++ b/pkg/front_end/test/fasta/testing/suite.dart
@@ -176,10 +176,13 @@ class Run extends Step<Uri, int, FastaContext> {
bool get isRuntime => true;
Future<Result<int>> run(Uri uri, FastaContext context) async {
+ if (context.platformUri == null) {
+ return new Result<int>.fail(
+ 1, "Executed `Run` step before initializing the context.");
Siggi Cherem (dart-lang) 2017/05/31 21:15:43 not sure if you prefer to indicate these checks as
ahe 2017/06/01 10:45:43 Sounds like a crash to me.
+ }
File generated = new File.fromUri(uri);
StdioProcess process;
try {
- await context.ensurePlatformUris();
var platformDill = context.platformUri.toFilePath();
var args = ['--platform=$platformDill', generated.path, "Hello, World!"];
process = await StdioProcess.run(context.vm.toFilePath(), args);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698