Skip to content

Commit

Permalink
add test for From<u64>
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinheavey committed Sep 10, 2024
1 parent 3a924b0 commit 3e40adf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sdk/pubkey/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1259,11 +1259,12 @@ mod tests {
#[test]
fn test_pubkey_error_from_primitive_exhaustive() {
for variant in PubkeyError::iter() {
let variant_i64 = variant as i64;
let variant_i64 = variant.clone() as i64;
assert_eq!(
PubkeyError::from_repr(variant_i64 as usize),
PubkeyError::from_i64(variant_i64)
);
assert_eq!(PubkeyError::from(variant_i64 as u64), variant);
}
}

Expand Down

0 comments on commit 3e40adf

Please sign in to comment.