Fix Script de/serialization (version -> 0.4.4)
This commit is contained in:
parent
322f4740f1
commit
a8ffce4904
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "bitcoin"
|
name = "bitcoin"
|
||||||
version = "0.4.3"
|
version = "0.4.4"
|
||||||
authors = ["Andrew Poelstra <apoelstra@wpsoftware.net>"]
|
authors = ["Andrew Poelstra <apoelstra@wpsoftware.net>"]
|
||||||
license = "CC0-1.0"
|
license = "CC0-1.0"
|
||||||
homepage = "https://github.com/apoelstra/rust-bitcoin/"
|
homepage = "https://github.com/apoelstra/rust-bitcoin/"
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -181,6 +181,14 @@ mod tests {
|
||||||
assert!(d3 > d1);
|
assert!(d3 > d1);
|
||||||
assert!(d3 > d2);
|
assert!(d3 > d2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn json_parse() {
|
||||||
|
let json = Json::from_str("0.00980000").unwrap();
|
||||||
|
assert_eq!(json.to_bytes(), b"0.00980000");
|
||||||
|
let dec: Decimal = json.into_deserialize().unwrap();
|
||||||
|
assert_eq!(dec, Decimal::new(980000, 8));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue