From 5a9ac6a32905a9e9d3165ec1e9c7170015aae5b6 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Thu, 14 Jan 2016 12:39:14 +0100 Subject: [PATCH] State diff output tweaks. --- src/tests/state.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/tests/state.rs b/src/tests/state.rs index dee20965d..080bdf979 100644 --- a/src/tests/state.rs +++ b/src/tests/state.rs @@ -36,26 +36,25 @@ fn do_json_test(json_data: &[u8]) -> Vec { let r = s.apply(&env, engine.deref(), &t).unwrap(); if fail_unless(&r.state_root == &post_state_root) { - println!("!!! {}: State mismatch (expect: {}, got: {}):", name, r.state_root, post_state_root); + println!("!!! {}: State mismatch (got: {}, expect: {}):", name, r.state_root, post_state_root); let our_post = s.to_pod(); - println!("Expect:\n{}\n", post); - println!("Got:\n{}\n", our_post); - println!("Diff:\n{}", pod_state_diff(&post, &our_post)); + println!("Got:\n{}", our_post); + println!("Expect:\n{}", post); + println!("Diff ---expect -> +++got:\n{}", pod_state_diff(&post, &our_post)); } if fail_unless(logs == r.logs) { println!("!!! {}: Logs mismatch:", name); - println!("Expect:\n{:?}", logs); println!("Got:\n{:?}", r.logs); + println!("Expect:\n{:?}", logs); } // TODO: Add extra APIs for output //if fail_unless(out == r.) } - for f in failed.iter() { - println!("FAILED: {:?}", f); - } + println!("!!! {:?} tests from failed.", failed.len()); failed } declare_test!{StateTests_stExample, "StateTests/stExample"} +declare_test!{StateTests_stLogTests, "StateTests/stLogTests"} \ No newline at end of file