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

Unified Diff: lib/src/utils.dart

Issue 916533003: Add an Invoker class that manages a running test. (Closed) Base URL: git@github.com:dart-lang/unittest@master
Patch Set: Code review changes Created 5 years, 10 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 | « lib/src/invoker.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/utils.dart
diff --git a/lib/src/utils.dart b/lib/src/utils.dart
index ea1e92ea7d939bcd7be3812ad1e1fe8371fb9977..526724128f9831a090650af448acdc7a557ac8ef 100644
--- a/lib/src/utils.dart
+++ b/lib/src/utils.dart
@@ -4,8 +4,15 @@
library unittest.utils;
+import 'dart:async';
+
import 'package:stack_trace/stack_trace.dart';
+/// A typedef for a possibly-asynchronous function.
+///
+/// The return type should only ever by [Future] or void.
+typedef AsyncFunction();
+
/// Indent each line in [str] by two spaces.
String indent(String str) =>
str.replaceAll(new RegExp("^", multiLine: true), " ");
« no previous file with comments | « lib/src/invoker.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698