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

Side by Side Diff: pkg/kernel/test/reify/kernel_chain.dart

Issue 2975253002: Format analyzer, analysis_server, analyzer_plugin, front_end and kernel with the latest dartfmt. (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
« no previous file with comments | « pkg/kernel/test/interpreter/suite.dart ('k') | no next file » | 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 library test.kernel.reify.suite; 5 library test.kernel.reify.suite;
6 6
7 import 'dart:async' show Future; 7 import 'dart:async' show Future;
8 8
9 import 'dart:io' show Directory, File, IOSink; 9 import 'dart:io' show Directory, File, IOSink;
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } else { 89 } else {
90 return pass(program); 90 return pass(program);
91 } 91 }
92 } 92 }
93 if (updateExpectations) { 93 if (updateExpectations) {
94 await openWrite(expectedFile.uri, (IOSink sink) { 94 await openWrite(expectedFile.uri, (IOSink sink) {
95 sink.writeln("$buffer".trim()); 95 sink.writeln("$buffer".trim());
96 }); 96 });
97 return pass(program); 97 return pass(program);
98 } else { 98 } else {
99 return fail( 99 return fail(program, """
100 program,
101 """
102 Please create file ${expectedFile.path} with this content: 100 Please create file ${expectedFile.path} with this content:
103 $buffer"""); 101 $buffer""");
104 } 102 }
105 } 103 }
106 } 104 }
107 105
108 class WriteDill extends Step<Program, Uri, ChainContext> { 106 class WriteDill extends Step<Program, Uri, ChainContext> {
109 const WriteDill(); 107 const WriteDill();
110 108
111 String get name => "write .dill"; 109 String get name => "write .dill";
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 187
190 Future openWrite(Uri uri, f(IOSink sink)) async { 188 Future openWrite(Uri uri, f(IOSink sink)) async {
191 IOSink sink = new File.fromUri(uri).openWrite(); 189 IOSink sink = new File.fromUri(uri).openWrite();
192 try { 190 try {
193 await f(sink); 191 await f(sink);
194 } finally { 192 } finally {
195 await sink.close(); 193 await sink.close();
196 } 194 }
197 print("Wrote $uri"); 195 print("Wrote $uri");
198 } 196 }
OLDNEW
« no previous file with comments | « pkg/kernel/test/interpreter/suite.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698