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

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

Issue 2722223006: Move all main methods to tool/. (Closed)
Patch Set: Update tools/patch_sdk.dart. 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
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE.md file.
4
5 library fasta.scanner.testing.scanner_chain;
6
7 import 'package:testing/testing.dart';
8
9 import '../../scanner.dart';
10
11 import '../io.dart';
12
13 class Read extends Step<TestDescription, List<int>, ChainContext> {
14 const Read();
15
16 String get name => "read";
17
18 Future<Result<List<int>>> run(
19 TestDescription input, ChainContext context) async {
20 return pass(await readBytesFromFile(input.uri));
21 }
22 }
23
24 class Scan extends Step<List<int>, ScannerResult, ChainContext> {
25 const Scan();
26
27 String get name => "scan";
28
29 Future<Result<ScannerResult>> run(
30 List<int> bytes, ChainContext context) async {
31 return pass(scan(bytes));
32 }
33 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/scanner/scanner_main.dart ('k') | pkg/front_end/lib/src/fasta/testing/scanner_chain.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698