use primitive_types::{H256, U256};
use scale_info_crate::{build::Fields, Path, Type, TypeInfo};
#[test]
fn u256_scale_info() {
let r#type = Type::builder()
.path(Path::new("U256", "primitive_types"))
.composite(Fields::unnamed().field(|f| f.ty::<[u64; 4]>().type_name("[u64; 4]")));
assert_eq!(U256::type_info(), r#type.into());
}
#[test]
fn h256_scale_info() {
let r#type = Type::builder()
.path(Path::new("H256", "primitive_types"))
.composite(Fields::unnamed().field(|f| f.ty::<[u8; 32]>().type_name("[u8; 32]")));
assert_eq!(H256::type_info(), r#type.into());
}