Add an explicit test for Display trait on SproutShieldedAddress

This commit is contained in:
Deirdre Connolly 2020-03-27 04:45:33 -04:00 committed by Deirdre Connolly
parent ba25817943
commit 5f7f851481
1 changed files with 12 additions and 0 deletions

View File

@ -179,6 +179,18 @@ mod tests {
"SproutShieldedAddress { network: Mainnet, paying_key: PayingKey(\"972caa450769480a995064693db07e0302afe6c3a737e8cc083215dfdfbea3a7\"), transmission_key: \"92c223a94d39e539b85fad3debadc980b4c64294ab8a66d04ca80be3dd7da763\" }"
);
}
#[test]
fn display() {
let zc_addr = SproutShieldedAddress::from(
"zcU1Cd6zYyZCd2VJF8yKgmzjxdiiU1rgTTjEwoN1CGUWCziPkUTXUjXmX7TMqdMNsTfuiGN1jQoVN4kGxUR4sAPN4XZ7pxb"
);
assert_eq!(
format!("{}", zc_addr),
"SproutShieldedAddress(\"zcU1Cd6zYyZCd2VJF8yKgmzjxdiiU1rgTTjEwoN1CGUWCziPkUTXUjXmX7TMqdMNsTfuiGN1jQoVN4kGxUR4sAPN4XZ7pxb\")"
);
}
}
#[cfg(test)]