pub use sp_core_hashing::*;
#[cfg(test)]
mod test {
use super::*;
#[test]
fn blake2b() {
assert_eq!(sp_core_hashing_proc_macro::blake2b_64!(b""), blake2_64(b"")[..]);
assert_eq!(sp_core_hashing_proc_macro::blake2b_256!(b"test"), blake2_256(b"test")[..]);
assert_eq!(sp_core_hashing_proc_macro::blake2b_512!(b""), blake2_512(b"")[..]);
}
#[test]
fn keccak() {
assert_eq!(sp_core_hashing_proc_macro::keccak_256!(b"test"), keccak_256(b"test")[..]);
assert_eq!(sp_core_hashing_proc_macro::keccak_512!(b"test"), keccak_512(b"test")[..]);
}
#[test]
fn sha2() {
assert_eq!(sp_core_hashing_proc_macro::sha2_256!(b"test"), sha2_256(b"test")[..]);
}
#[test]
fn twox() {
assert_eq!(sp_core_hashing_proc_macro::twox_128!(b"test"), twox_128(b"test")[..]);
assert_eq!(sp_core_hashing_proc_macro::twox_64!(b""), twox_64(b"")[..]);
}
#[test]
fn twox_concats() {
assert_eq!(
sp_core_hashing_proc_macro::twox_128!(b"test", b"123", b"45", b"", b"67890"),
super::twox_128(&b"test1234567890"[..]),
);
assert_eq!(
sp_core_hashing_proc_macro::twox_128!(b"test", test, b"45", b"", b"67890"),
super::twox_128(&b"testtest4567890"[..]),
);
}
}