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

Side by Side Diff: pkg/front_end/lib/src/fasta/testing/kernel_chain.dart

Issue 2746923002: Implement nested switches and missing switch continue targets. (Closed)
Patch Set: Long line. Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/verifier.dart ('k') | pkg/kernel/lib/verifier.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // TODO(ahe): Copied from closure_conversion branch of kernel, remove this file 5 // TODO(ahe): Copied from closure_conversion branch of kernel, remove this file
6 // when closure_conversion is merged with master. 6 // when closure_conversion is merged with master.
7 7
8 library kernel.testing.kernel_chain; 8 library kernel.testing.kernel_chain;
9 9
10 import 'dart:async' show Future; 10 import 'dart:async' show Future;
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 } 185 }
186 186
187 class Verify extends Step<Program, Program, TestContext> { 187 class Verify extends Step<Program, Program, TestContext> {
188 final bool fullCompile; 188 final bool fullCompile;
189 189
190 const Verify(this.fullCompile); 190 const Verify(this.fullCompile);
191 191
192 String get name => "verify"; 192 String get name => "verify";
193 193
194 Future<Result<Program>> run(Program program, TestContext testContext) async { 194 Future<Result<Program>> run(Program program, TestContext testContext) async {
195 try { 195 var errors = verifyProgram(program, isOutline: !fullCompile);
196 verifyProgram(program, isOutline: !fullCompile); 196 if (errors.isEmpty) {
197 return pass(program); 197 return pass(program);
198 } catch (e, s) { 198 } else {
199 return new Result<Program>( 199 return new Result<Program>(
200 null, testContext.expectationSet["VerificationError"], e, s); 200 null, testContext.expectationSet["VerificationError"], errors, null);
201 } 201 }
202 } 202 }
203 } 203 }
204 204
205 class MatchExpectation extends Step<Program, Program, TestContext> { 205 class MatchExpectation extends Step<Program, Program, TestContext> {
206 final String suffix; 206 final String suffix;
207 207
208 // TODO(ahe): This is true by default which doesn't match well with the class 208 // TODO(ahe): This is true by default which doesn't match well with the class
209 // name. 209 // name.
210 final bool updateExpectations; 210 final bool updateExpectations;
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 356
357 Future openWrite(Uri uri, f(IOSink sink)) async { 357 Future openWrite(Uri uri, f(IOSink sink)) async {
358 IOSink sink = new File.fromUri(uri).openWrite(); 358 IOSink sink = new File.fromUri(uri).openWrite();
359 try { 359 try {
360 await f(sink); 360 await f(sink);
361 } finally { 361 } finally {
362 await sink.close(); 362 await sink.close();
363 } 363 }
364 print("Wrote $uri"); 364 print("Wrote $uri");
365 } 365 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/verifier.dart ('k') | pkg/kernel/lib/verifier.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698