use crate::{IonHash, IonValue};
use sha2::Sha256;
#[test]
fn ion_hash_float64_1() {
let value = IonValue::Float(123.123);
let hash = IonHash::digest::<Sha256>(&value);
println!("Resulting hash: {:X?}", hash);
assert_eq!(b"\x77\x97\x4d\x9d\x8f\x47\xb7\xca\xfa\x7e\xfb\x82\x12\xa7\xa6\xb4\x84\x08\xd5\xd3\x4f\xbf\x65\xbb\x51\xbd\xa1\xc5\x21\x95\x08\x83", &hash[..]);
}
#[test]
fn ion_hash_float64_2() {
let value = IonValue::Float(std::f64::INFINITY);
let hash = IonHash::digest::<Sha256>(&value);
println!("Resulting hash: {:X?}", hash);
assert_eq!(b"\x99\x85\xea\xd9\x83\xf1\x93\x9d\x38\x1b\x22\xe3\x06\x78\xe0\x9c\x74\x36\x9b\x77\x07\xdc\x3f\x17\xc2\xfd\x5e\x6c\xe4\x24\xd4\x63", &hash[..]);
}
#[test]
fn ion_hash_float64_3() {
let value = IonValue::Float(std::f64::NEG_INFINITY);
let hash = IonHash::digest::<Sha256>(&value);
println!("Resulting hash: {:X?}", hash);
assert_eq!(b"\x97\x70\x38\x64\xea\x12\x9b\x09\x8b\x5f\x85\xab\xe1\x86\x1c\xab\x5a\x94\xfe\xbc\x1a\xd4\x0e\x93\x7e\x15\xa0\x47\x7b\x51\xc3\x68", &hash[..]);
}
#[test]
fn ion_hash_float64_4() {
let value = IonValue::Float(std::f64::NAN);
let hash = IonHash::digest::<Sha256>(&value);
println!("Resulting hash: {:X?}", hash);
assert_eq!(b"\xed\x86\x50\x17\xdd\x3f\x6d\x06\xe5\x7b\xab\xc0\x2e\xe8\xc2\xd0\x15\x38\xad\xb6\x31\x6c\xd4\x71\x63\xf4\xd8\x13\xda\x2b\x98\x9d", &hash[..]);
}
#[test]
fn ion_hash_float64_5() {
let value = IonValue::Float(-123.123);
let hash = IonHash::digest::<Sha256>(&value);
println!("Resulting hash: {:X?}", hash);
assert_eq!(b"\xec\x5e\xae\x54\x67\x3a\xc2\xcb\x3c\xc7\x5c\xde\x4d\x9f\xec\x1a\xde\xc1\x08\x40\x97\x6a\xd9\x79\x96\x64\x4d\x76\x20\x90\xc6\x51", &hash[..]);
}
#[test]
fn ion_hash_float64_neg_zero() {
let value = IonValue::Float(-0.0);
let hash = IonHash::digest::<Sha256>(&value);
println!("Resulting hash: {:X?}", hash);
assert_eq!(b"\x56\x32\x5d\x7b\xb2\x99\x07\x67\x48\x0c\xc4\x52\x99\x30\x58\xd2\xb4\x0c\xe5\x53\x7f\xea\x1a\x54\xf9\x32\xae\x0b\x4a\x04\xf5\x03", &hash[..]);
}