test: add type check test for abi array tuples (#1143)

This commit is contained in:
Matthias Seitz 2022-04-18 19:02:56 +02:00 committed by GitHub
parent c1807fa3bb
commit 7a098b183f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 0 deletions

View File

@ -270,4 +270,22 @@ mod tests {
<[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)>>();
}
}