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

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

Issue 2914773003: add check of preconditions in `run` step. (Closed)
Patch Set: make it a crash instead 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 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 d45a76ee2a2a827a892e7f75019548e7fa7aa505..1f9d70557287f3ea0e9cb74ac3891df39221426f 100644
--- a/pkg/front_end/test/fasta/testing/suite.dart
+++ b/pkg/front_end/test/fasta/testing/suite.dart
@@ -180,10 +180,12 @@ class Run extends Step<Uri, int, FastaContext> {
bool get isRuntime => true;
Future<Result<int>> run(Uri uri, FastaContext context) async {
+ if (context.platformUri == null) {
+ throw "Executed `Run` step before initializing the context.";
+ }
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