mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 23:21:02 +00:00
Prettify test output when encoding doesn't match (#907)
This commit is contained in:
committed by
Bastian Köcher
parent
234e6b95e4
commit
b8e021c22c
@@ -259,6 +259,7 @@ mod rococo_tests {
|
||||
extrinsics_root: Default::default(),
|
||||
digest: sp_runtime::generic::Digest { logs: vec![] },
|
||||
};
|
||||
|
||||
let justification = GrandpaJustification {
|
||||
round: 0,
|
||||
commit: finality_grandpa::Commit {
|
||||
@@ -268,6 +269,7 @@ mod rococo_tests {
|
||||
},
|
||||
votes_ancestries: vec![],
|
||||
};
|
||||
|
||||
let actual = bp_rococo::BridgeGrandpaWestendCall::submit_finality_proof(header.clone(), justification.clone());
|
||||
let expected = millau_runtime::BridgeGrandpaRialtoCall::<millau_runtime::Runtime>::submit_finality_proof(
|
||||
header,
|
||||
@@ -281,7 +283,7 @@ mod rococo_tests {
|
||||
// then
|
||||
assert_eq!(
|
||||
actual_encoded, expected_encoded,
|
||||
"Encoding difference. Raw: {:?} vs {:?}",
|
||||
"\n\nEncoding difference.\nGot {:#?} \nExpected: {:#?}",
|
||||
actual, expected
|
||||
);
|
||||
}
|
||||
@@ -302,6 +304,7 @@ mod westend_tests {
|
||||
extrinsics_root: Default::default(),
|
||||
digest: sp_runtime::generic::Digest { logs: vec![] },
|
||||
};
|
||||
|
||||
let justification = GrandpaJustification {
|
||||
round: 0,
|
||||
commit: finality_grandpa::Commit {
|
||||
@@ -311,6 +314,7 @@ mod westend_tests {
|
||||
},
|
||||
votes_ancestries: vec![],
|
||||
};
|
||||
|
||||
let actual = bp_westend::BridgeGrandpaRococoCall::submit_finality_proof(header.clone(), justification.clone());
|
||||
let expected = millau_runtime::BridgeGrandpaRialtoCall::<millau_runtime::Runtime>::submit_finality_proof(
|
||||
header,
|
||||
@@ -324,7 +328,7 @@ mod westend_tests {
|
||||
// then
|
||||
assert_eq!(
|
||||
actual_encoded, expected_encoded,
|
||||
"Encoding difference. Raw: {:?} vs {:?}",
|
||||
"\n\nEncoding difference.\nGot {:#?} \nExpected: {:#?}",
|
||||
actual, expected
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user