Skip to content

Commit

Permalink
Fix for #302 / #296 conflict (#303)
Browse files Browse the repository at this point in the history
I merged #296 thinking I would rebase #302 but before I could it was
merged.

This just renames BigInt -> BigInteger in the new BigInt tests
introduced in #296 which was done before the #302 renaming.
  • Loading branch information
rooooooooob authored Jan 30, 2024
1 parent 6e37d57 commit 0940f0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chain/rust/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,18 +596,18 @@ mod tests {
#[test]
fn bigint_uint_u128_min() {
let bytes = [0x00];
let x = BigInt::from_cbor_bytes(&bytes).unwrap();
let x = BigInteger::from_cbor_bytes(&bytes).unwrap();
assert_eq!(bytes, x.to_cbor_bytes().as_slice());
assert_eq!(x.as_u128(), Some(u128::MIN));
assert_eq!(x.to_string(), "0");
}

#[test]
fn bigint_uint_u128_max() {
let bytes = BigInt::from_str(&u128::MAX.to_string())
let bytes = BigInteger::from_str(&u128::MAX.to_string())
.unwrap()
.to_cbor_bytes();
let x = BigInt::from_cbor_bytes(&bytes).unwrap();
let x = BigInteger::from_cbor_bytes(&bytes).unwrap();
assert_eq!(bytes, x.to_cbor_bytes().as_slice());
assert_eq!(x.as_u128(), Some(u128::MAX));
assert_eq!(x.to_string(), "340282366920938463463374607431768211455");
Expand Down

0 comments on commit 0940f0a

Please sign in to comment.