test: add type check test for abi array tuples (#1143)
This commit is contained in:
parent
c1807fa3bb
commit
7a098b183f
|
@ -270,4 +270,22 @@ mod tests {
|
||||||
<[u16; 32]>::param_type()
|
<[u16; 32]>::param_type()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn abi_type_tuples_work() {
|
||||||
|
fn assert_abitype<T: AbiType>() {}
|
||||||
|
fn assert_abiarraytype<T: AbiArrayType>() {}
|
||||||
|
|
||||||
|
assert_abitype::<(u64, u64)>();
|
||||||
|
assert_abiarraytype::<(u64, u64)>();
|
||||||
|
|
||||||
|
assert_abitype::<(u8, u8)>();
|
||||||
|
assert_abiarraytype::<(u8, u8)>();
|
||||||
|
|
||||||
|
assert_abitype::<Vec<(u64, u64)>>();
|
||||||
|
assert_abiarraytype::<Vec<(u64, u64)>>();
|
||||||
|
|
||||||
|
assert_abitype::<Vec<(u8, u8)>>();
|
||||||
|
assert_abiarraytype::<Vec<(u8, u8)>>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue