Add output to test helper, so we can see in the trace whats happening

This commit is contained in:
Matthias Beyer 2016-10-07 18:26:48 +02:00
parent ae66b00f5f
commit d375a6d2c6

View file

@ -2502,12 +2502,16 @@ mod store_hook_tests {
} }
fn get_result(succeed: bool, abort: bool) -> HookResult<()> { fn get_result(succeed: bool, abort: bool) -> HookResult<()> {
println!("Generting result: succeed = {}, abort = {}", succeed, abort);
if succeed { if succeed {
println!("Generating result: Ok(())");
Ok(()) Ok(())
} else { } else {
if abort { if abort {
println!("Generating result: Err(_), aborting");
Err(HEK::HookExecutionError.into_error()) Err(HEK::HookExecutionError.into_error())
} else { } else {
println!("Generating result: Err(_), not aborting");
let custom = CustomData::default().aborting(false); let custom = CustomData::default().aborting(false);
Err(HEK::HookExecutionError.into_error().with_custom_data(custom)) Err(HEK::HookExecutionError.into_error().with_custom_data(custom))
} }