Index: pkg/unittest/lib/unittest.dart |
=================================================================== |
--- pkg/unittest/lib/unittest.dart (revision 19087) |
+++ pkg/unittest/lib/unittest.dart (working copy) |
@@ -773,7 +773,7 @@ |
_registerException(testNum, e, [trace]) { |
trace = trace == null ? '' : trace.toString(); |
if (_tests[testNum].result == null) { |
- String message = (e is ExpectException) ? e.message : 'Caught $e'; |
+ String message = (e is Exception) ? e.message : 'Caught $e'; |
Siggi Cherem (dart-lang)
2013/02/27 00:40:03
is TestFailure?
(e.message doesn't exist in the d
gram
2013/02/27 00:56:13
Done.
|
_tests[testNum].fail(message, trace); |
} else { |
_tests[testNum].error('Caught $e', trace); |
@@ -829,7 +829,7 @@ |
} |
void fail(String message) { |
- throw new ExpectException(message); |
+ throw new TestFailure(message); |
} |
/** |
@@ -891,4 +891,4 @@ |
void disableTest(int testId) => _setTestEnabledState(testId, false); |
/** Signature for a test function. */ |
-typedef void TestFunction(); |
+typedef Future TestFunction(); |
Siggi Cherem (dart-lang)
2013/02/27 00:40:03
I think this is fine, but I wonder if we might wan
gram
2013/02/27 00:56:13
Done.
|