sdk: add missing "0x" prefix to unit test strings

This commit is contained in:
zero
2024-03-30 09:31:27 +01:00
parent 6504ceceb7
commit f92fc9b096

View File

@@ -135,10 +135,10 @@ fn test_fp_to_u64() {
#[test]
fn test_fp_to_str() {
use self::FieldElemAsStr;
let fpstr = "227ae0da79929f3e23f8d5bc9992f5f140f5198932378731e1b49b67fdc296c8";
let fpstr = "0x227ae0da79929f3e23f8d5bc9992f5f140f5198932378731e1b49b67fdc296c8";
assert_eq!(pallas::Base::from_str(fpstr).unwrap().to_string(), fpstr);
let fpstr = "000000000000000000000000000000000000000000000000ffffffffffffffff";
let fpstr = "0x000000000000000000000000000000000000000000000000ffffffffffffffff";
let fp = pallas::Base::from(u64::MAX);
assert_eq!(fp.to_string(), fpstr);
assert_eq!(pallas::Base::from_str(fpstr).unwrap(), fp);