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

Unified Diff: pkg/unittest/lib/src/utils.dart

Issue 208273009: pkg/unittest: Removed references to expectAsync[Until]X in docs (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/unittest/lib/src/test_case.dart ('k') | pkg/unittest/lib/unittest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/lib/src/utils.dart
diff --git a/pkg/unittest/lib/src/utils.dart b/pkg/unittest/lib/src/utils.dart
index ef724e3d82344574a750896451fe96cf5a9db333..9aaae5b52c493e224f120db6c5a581d38087b514 100644
--- a/pkg/unittest/lib/src/utils.dart
+++ b/pkg/unittest/lib/src/utils.dart
@@ -4,10 +4,8 @@
library unittest.utils;
-/**
- * Returns the name of the type of [x], or "Unknown" if the type name can't be
- * determined.
- */
+/// Returns the name of the type of [x], or "Unknown" if the type name can't be
+/// determined.
String typeName(x) {
// dart2js blows up on some objects (e.g. window.navigator).
// So we play safe here.
@@ -22,17 +20,15 @@ String typeName(x) {
}
}
-/**
- * Returns [source] with any control characters replaced by their escape
- * sequences.
- *
- * This doesn't add quotes to the string, but it does escape single quote
- * characters so that single quotes can be applied externally.
- */
+/// Returns [source] with any control characters replaced by their escape
+/// sequences.
+///
+/// This doesn't add quotes to the string, but it does escape single quote
+/// characters so that single quotes can be applied externally.
String escapeString(String source) =>
source.split("").map(_escapeChar).join("");
-/** Return the escaped form of a character [ch]. */
+/// Return the escaped form of a character [ch].
String _escapeChar(String ch) {
if (ch == "'")
return "\\'";
@@ -46,14 +42,14 @@ String _escapeChar(String ch) {
return ch;
}
-/** Indent each line in [str] by two spaces. */
+/// Indent each line in [str] by two spaces.
String indent(String str) =>
str.replaceAll(new RegExp("^", multiLine: true), " ");
-/** A pair of values. */
+/// A pair of values.
class Pair<E, F> {
- E first;
- F last;
+ final E first;
+ final F last;
Pair(this.first, this.last);
« no previous file with comments | « pkg/unittest/lib/src/test_case.dart ('k') | pkg/unittest/lib/unittest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698