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(),
|
extrinsics_root: Default::default(),
|
||||||
digest: sp_runtime::generic::Digest { logs: vec![] },
|
digest: sp_runtime::generic::Digest { logs: vec![] },
|
||||||
};
|
};
|
||||||
|
|
||||||
let justification = GrandpaJustification {
|
let justification = GrandpaJustification {
|
||||||
round: 0,
|
round: 0,
|
||||||
commit: finality_grandpa::Commit {
|
commit: finality_grandpa::Commit {
|
||||||
@@ -268,6 +269,7 @@ mod rococo_tests {
|
|||||||
},
|
},
|
||||||
votes_ancestries: vec![],
|
votes_ancestries: vec![],
|
||||||
};
|
};
|
||||||
|
|
||||||
let actual = bp_rococo::BridgeGrandpaWestendCall::submit_finality_proof(header.clone(), justification.clone());
|
let actual = bp_rococo::BridgeGrandpaWestendCall::submit_finality_proof(header.clone(), justification.clone());
|
||||||
let expected = millau_runtime::BridgeGrandpaRialtoCall::<millau_runtime::Runtime>::submit_finality_proof(
|
let expected = millau_runtime::BridgeGrandpaRialtoCall::<millau_runtime::Runtime>::submit_finality_proof(
|
||||||
header,
|
header,
|
||||||
@@ -281,7 +283,7 @@ mod rococo_tests {
|
|||||||
// then
|
// then
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
actual_encoded, expected_encoded,
|
actual_encoded, expected_encoded,
|
||||||
"Encoding difference. Raw: {:?} vs {:?}",
|
"\n\nEncoding difference.\nGot {:#?} \nExpected: {:#?}",
|
||||||
actual, expected
|
actual, expected
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -302,6 +304,7 @@ mod westend_tests {
|
|||||||
extrinsics_root: Default::default(),
|
extrinsics_root: Default::default(),
|
||||||
digest: sp_runtime::generic::Digest { logs: vec![] },
|
digest: sp_runtime::generic::Digest { logs: vec![] },
|
||||||
};
|
};
|
||||||
|
|
||||||
let justification = GrandpaJustification {
|
let justification = GrandpaJustification {
|
||||||
round: 0,
|
round: 0,
|
||||||
commit: finality_grandpa::Commit {
|
commit: finality_grandpa::Commit {
|
||||||
@@ -311,6 +314,7 @@ mod westend_tests {
|
|||||||
},
|
},
|
||||||
votes_ancestries: vec![],
|
votes_ancestries: vec![],
|
||||||
};
|
};
|
||||||
|
|
||||||
let actual = bp_westend::BridgeGrandpaRococoCall::submit_finality_proof(header.clone(), justification.clone());
|
let actual = bp_westend::BridgeGrandpaRococoCall::submit_finality_proof(header.clone(), justification.clone());
|
||||||
let expected = millau_runtime::BridgeGrandpaRialtoCall::<millau_runtime::Runtime>::submit_finality_proof(
|
let expected = millau_runtime::BridgeGrandpaRialtoCall::<millau_runtime::Runtime>::submit_finality_proof(
|
||||||
header,
|
header,
|
||||||
@@ -324,7 +328,7 @@ mod westend_tests {
|
|||||||
// then
|
// then
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
actual_encoded, expected_encoded,
|
actual_encoded, expected_encoded,
|
||||||
"Encoding difference. Raw: {:?} vs {:?}",
|
"\n\nEncoding difference.\nGot {:#?} \nExpected: {:#?}",
|
||||||
actual, expected
|
actual, expected
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user