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

Unified Diff: pkg/analyzer_cli/test/embedder_test.dart

Issue 2658863002: Run analyzer_cli asynchronously. (Closed)
Patch Set: Created 3 years, 11 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 | « pkg/analyzer_cli/test/driver_test.dart ('k') | pkg/analyzer_cli/test/package_prefix_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/test/embedder_test.dart
diff --git a/pkg/analyzer_cli/test/embedder_test.dart b/pkg/analyzer_cli/test/embedder_test.dart
index c1c544c6f5b26065ec97be2c73983b8434cfa236..eaa790a45a84eec5d8b3eefc292a14089756adc9 100644
--- a/pkg/analyzer_cli/test/embedder_test.dart
+++ b/pkg/analyzer_cli/test/embedder_test.dart
@@ -24,15 +24,16 @@ main() {
outSink = new StringBuffer();
errorSink = new StringBuffer();
});
+
tearDown(() {
outSink = savedOutSink;
errorSink = savedErrorSink;
exitCode = savedExitCode;
});
- test('resolution', wrap(() {
+ test('resolution', wrap(() async {
var testDir = path.join(testDirectory, 'data', 'embedder_client');
- new Driver().start([
+ await new Driver().start([
'--packages',
path.join(testDir, '_packages'),
path.join(testDir, 'embedder_yaml_user.dart')
@@ -42,10 +43,10 @@ main() {
expect(outSink.toString(), contains('No issues found'));
}));
- test('sdk setup', wrap(() {
+ test('sdk setup', wrap(() async {
var testDir = path.join(testDirectory, 'data', 'embedder_client');
Driver driver = new Driver();
- driver.start([
+ await driver.start([
'--packages',
path.join(testDir, '_packages'),
path.join(testDir, 'embedder_yaml_user.dart')
@@ -60,9 +61,9 @@ main() {
/// Wrap a function call to dump stdout and stderr in case of an exception.
Function wrap(Function f) {
- return () {
+ return () async {
try {
- f();
+ await f();
} catch (e) {
if (outSink.toString().isNotEmpty) {
print('stdout:');
« no previous file with comments | « pkg/analyzer_cli/test/driver_test.dart ('k') | pkg/analyzer_cli/test/package_prefix_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698