diff options
| author | Marvin Löbel <loebel.marvin@gmail.com> | 2013-10-11 23:20:34 +0200 |
|---|---|---|
| committer | Marvin Löbel <loebel.marvin@gmail.com> | 2013-10-28 08:50:32 +0100 |
| commit | fa8e71a8257f4226ab532d4bf268d3ecbfa98eb4 (patch) | |
| tree | 0b8051814dd8a5ef08e663c172e2b456065d625d /src/libextra/test.rs | |
| parent | cb5b21eba713ff3888b2741db4c9e7d841cfde02 (diff) | |
Allow fail messages to be caught, and introduce the Any trait
Some code cleanup, sorting of import blocks Removed std::unstable::UnsafeArc's use of Either Added run-fail tests for the new FailWithCause impls Changed future_result and try to return Result<(), ~Any>. - Internally, there is an enum of possible fail messages passend around. - In case of linked failure or a string message, the ~Any gets lazyly allocated in future_results recv method. - For that, future result now returns a wrapper around a Port. - Moved and renamed task::TaskResult into rt::task::UnwindResult and made it an internal enum. - Introduced a replacement typedef `type TaskResult = Result<(), ~Any>`.
Diffstat (limited to 'src/libextra/test.rs')
| -rw-r--r-- | src/libextra/test.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libextra/test.rs b/src/libextra/test.rs index 457f7868e23..070108ddf2e 100644 --- a/src/libextra/test.rs +++ b/src/libextra/test.rs @@ -873,8 +873,7 @@ pub fn run_test(force_ignore: bool, task.spawn(testfn_cell.take()); let task_result = result_future.recv(); - let test_result = calc_result(&desc, - task_result == task::Success); + let test_result = calc_result(&desc, task_result.is_ok()); monitor_ch.send((desc.clone(), test_result)); } } |
