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

Side by Side Diff: pkg/kernel/test/interpreter/suite.dart

Issue 2970273004: Deprecate all diagnostics methods that use strings. (Closed)
Patch Set: Created 3 years, 5 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
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 test.kernel.closures.suite; 5 library test.kernel.closures.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 11 matching lines...) Expand all
22 22
23 import 'package:front_end/src/fasta/ticker.dart' show Ticker; 23 import 'package:front_end/src/fasta/ticker.dart' show Ticker;
24 24
25 import 'package:front_end/src/fasta/dill/dill_target.dart' show DillTarget; 25 import 'package:front_end/src/fasta/dill/dill_target.dart' show DillTarget;
26 26
27 import 'package:front_end/src/fasta/kernel/kernel_target.dart' 27 import 'package:front_end/src/fasta/kernel/kernel_target.dart'
28 show KernelTarget; 28 show KernelTarget;
29 29
30 import 'package:front_end/src/fasta/translate_uri.dart' show TranslateUri; 30 import 'package:front_end/src/fasta/translate_uri.dart' show TranslateUri;
31 31
32 import 'package:front_end/src/fasta/errors.dart' show InputError; 32 import 'package:front_end/src/fasta/deprecated_problems.dart'
33 show deprecated_InputError;
33 34
34 import 'package:front_end/src/fasta/testing/patched_sdk_location.dart'; 35 import 'package:front_end/src/fasta/testing/patched_sdk_location.dart';
35 36
36 import 'package:kernel/kernel.dart' show loadProgramFromBinary; 37 import 'package:kernel/kernel.dart' show loadProgramFromBinary;
37 38
38 import 'package:kernel/target/targets.dart' show TargetFlags; 39 import 'package:kernel/target/targets.dart' show TargetFlags;
39 40
40 import 'package:kernel/target/vm_fasta.dart' show VmFastaTarget; 41 import 'package:kernel/target/vm_fasta.dart' show VmFastaTarget;
41 42
42 import 'package:kernel/interpreter/interpreter.dart'; 43 import 'package:kernel/interpreter/interpreter.dart';
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 dillTarget.loader.appendLibraries(platform); 91 dillTarget.loader.appendLibraries(platform);
91 KernelTarget sourceTarget = new KernelTarget( 92 KernelTarget sourceTarget = new KernelTarget(
92 PhysicalFileSystem.instance, dillTarget, context.uriTranslator); 93 PhysicalFileSystem.instance, dillTarget, context.uriTranslator);
93 94
94 Program p; 95 Program p;
95 try { 96 try {
96 sourceTarget.read(description.uri); 97 sourceTarget.read(description.uri);
97 await dillTarget.buildOutlines(); 98 await dillTarget.buildOutlines();
98 await sourceTarget.buildOutlines(); 99 await sourceTarget.buildOutlines();
99 p = await sourceTarget.buildProgram(); 100 p = await sourceTarget.buildProgram();
100 } on InputError catch (e, s) { 101 } on deprecated_InputError catch (e, s) {
101 return fail(null, e.error, s); 102 return fail(null, e.error, s);
102 } 103 }
103 return pass(p); 104 return pass(p);
104 } 105 }
105 } 106 }
106 107
107 class Interpret extends Step<Program, EvaluationLog, InterpreterContext> { 108 class Interpret extends Step<Program, EvaluationLog, InterpreterContext> {
108 const Interpret(); 109 const Interpret();
109 110
110 String get name => "interpret"; 111 String get name => "interpret";
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 final Uri uri; 159 final Uri uri;
159 160
160 /// Evaluated program log. 161 /// Evaluated program log.
161 final String log; 162 final String log;
162 163
163 EvaluationLog(this.uri, this.log); 164 EvaluationLog(this.uri, this.log);
164 } 165 }
165 166
166 main(List<String> arguments) => 167 main(List<String> arguments) =>
167 runMe(arguments, InterpreterContext.create, "testing.json"); 168 runMe(arguments, InterpreterContext.create, "testing.json");
OLDNEW
« pkg/front_end/lib/src/fasta/deprecated_problems.dart ('K') | « pkg/kernel/test/closures/suite.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698