Index: lib/src/descriptor/file_descriptor.dart |
diff --git a/lib/src/descriptor/file_descriptor.dart b/lib/src/descriptor/file_descriptor.dart |
index ca7704f4cf68713c00a9b0ad5efcb982bb017904..f8ed29a1c2edff8f60ec4c872c496338bc4dbb98 100644 |
--- a/lib/src/descriptor/file_descriptor.dart |
+++ b/lib/src/descriptor/file_descriptor.dart |
@@ -10,7 +10,6 @@ import 'dart:io'; |
import 'dart:math' as math; |
import 'package:path/path.dart' as path; |
-import 'package:stack_trace/stack_trace.dart'; |
import '../../descriptor.dart'; |
import '../../scheduled_test.dart'; |
@@ -82,10 +81,11 @@ class _BinaryFileDescriptor extends FileDescriptor { |
_BinaryFileDescriptor(String name, List<int> contents) |
: super._(name, contents); |
- Future _validateNow(List<int> actualContents) { |
+ Future _validateNow(List<int> actualContents) async { |
nweiz
2015/06/04 19:20:10
Don't use async/await in scheduled test until issu
kevmoo
2015/06/04 19:23:46
Done.
|
if (orderedIterableEquals(contents, actualContents)) return null; |
// TODO(nweiz): show a hex dump here if the data is small enough. |
- fail("File '$name' didn't contain the expected binary data."); |
+ throw new TestFailure( |
+ "File '$name' didn't contain the expected binary data."); |
nweiz
2015/06/04 19:20:10
Why aren't you calling fail() here anymore?
kevmoo
2015/06/04 19:23:46
analyzer yells about having one flow w/ a return v
|
} |
} |
@@ -95,8 +95,8 @@ class _StringFileDescriptor extends FileDescriptor { |
Future _validateNow(List<int> actualContents) { |
if (orderedIterableEquals(contents, actualContents)) return null; |
- throw _textMismatchMessage(textContents, |
- new String.fromCharCodes(actualContents)); |
+ throw new TestFailure(_textMismatchMessage( |
+ textContents, new String.fromCharCodes(actualContents))); |
} |
String _textMismatchMessage(String expected, String actual) { |