Index: lib/src/utils.dart |
diff --git a/lib/src/utils.dart b/lib/src/utils.dart |
index 5c12593e4f4bd8864c07210b527dab933c905340..6b0939fe5ccf805bcf9ffb33e5e9d86b045eb1c1 100644 |
--- a/lib/src/utils.dart |
+++ b/lib/src/utils.dart |
@@ -28,23 +28,6 @@ String getErrorMessage(error) => |
String indent(String str) => |
str.replaceAll(new RegExp("^", multiLine: true), " "); |
-/// A pair of values. |
-class Pair<E, F> { |
- final E first; |
- final F last; |
- |
- Pair(this.first, this.last); |
- |
- String toString() => '($first, $last)'; |
- |
- bool operator ==(other) { |
- if (other is! Pair) return false; |
- return other.first == first && other.last == last; |
- } |
- |
- int get hashCode => first.hashCode ^ last.hashCode; |
-} |
- |
/// A regular expression matching the path to a temporary file used to start an |
/// isolate. |
/// |
@@ -64,29 +47,6 @@ Chain terseChain(StackTrace stackTrace) { |
}, terse: true); |
} |
-/// Returns a Trace object from a StackTrace object or a String, or the |
-/// unchanged input if formatStacks is false; |
-Trace getTrace(stack, bool formatStacks, bool filterStacks) { |
- Trace trace; |
- if (stack == null || !formatStacks) return null; |
- if (stack is String) { |
- trace = new Trace.parse(stack); |
- } else if (stack is StackTrace) { |
- trace = new Trace.from(stack); |
- } else { |
- throw new Exception('Invalid stack type ${stack.runtimeType} for $stack.'); |
- } |
- |
- if (!filterStacks) return trace; |
- |
- // Format the stack trace by removing everything above TestCase._runTest, |
- // which is usually going to be irrelevant. Also fold together unittest and |
- // core library calls so only the function the user called is visible. |
- return new Trace(trace.frames.takeWhile((frame) { |
- return frame.package != 'unittest' || frame.member != 'TestCase._runTest'; |
- })).terse.foldFrames((frame) => frame.package == 'unittest' || frame.isCore); |
-} |
- |
/// Flattens nested [Iterable]s inside an [Iterable] into a single [List] |
/// containing only non-[Iterable] elements. |
List flatten(Iterable nested) { |