State diff output tweaks.
This commit is contained in:
parent
507678aaa9
commit
5a9ac6a329
@ -36,26 +36,25 @@ fn do_json_test(json_data: &[u8]) -> Vec<String> {
|
|||||||
let r = s.apply(&env, engine.deref(), &t).unwrap();
|
let r = s.apply(&env, engine.deref(), &t).unwrap();
|
||||||
|
|
||||||
if fail_unless(&r.state_root == &post_state_root) {
|
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();
|
let our_post = s.to_pod();
|
||||||
println!("Expect:\n{}\n", post);
|
println!("Got:\n{}", our_post);
|
||||||
println!("Got:\n{}\n", our_post);
|
println!("Expect:\n{}", post);
|
||||||
println!("Diff:\n{}", pod_state_diff(&post, &our_post));
|
println!("Diff ---expect -> +++got:\n{}", pod_state_diff(&post, &our_post));
|
||||||
}
|
}
|
||||||
|
|
||||||
if fail_unless(logs == r.logs) {
|
if fail_unless(logs == r.logs) {
|
||||||
println!("!!! {}: Logs mismatch:", name);
|
println!("!!! {}: Logs mismatch:", name);
|
||||||
println!("Expect:\n{:?}", logs);
|
|
||||||
println!("Got:\n{:?}", r.logs);
|
println!("Got:\n{:?}", r.logs);
|
||||||
|
println!("Expect:\n{:?}", logs);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Add extra APIs for output
|
// TODO: Add extra APIs for output
|
||||||
//if fail_unless(out == r.)
|
//if fail_unless(out == r.)
|
||||||
}
|
}
|
||||||
for f in failed.iter() {
|
println!("!!! {:?} tests from failed.", failed.len());
|
||||||
println!("FAILED: {:?}", f);
|
|
||||||
}
|
|
||||||
failed
|
failed
|
||||||
}
|
}
|
||||||
|
|
||||||
declare_test!{StateTests_stExample, "StateTests/stExample"}
|
declare_test!{StateTests_stExample, "StateTests/stExample"}
|
||||||
|
declare_test!{StateTests_stLogTests, "StateTests/stLogTests"}
|
Loading…
Reference in New Issue
Block a user