Skip to content

Commit

Permalink
Fix relocatable tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Juanma authored and Juanma committed Feb 13, 2023
1 parent bce4570 commit 0247165
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/types/relocatable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,18 +381,18 @@ mod tests {
#[test]
fn add_bigint_to_int() {
let addr = MaybeRelocatable::from(Felt::new(7i32));
let _added_addr = addr.add_int(&Felt::new(2i32));
let added_addr = addr.add_int(&Felt::new(2i32));
assert_matches!(
Ok::<MaybeRelocatable, VirtualMachineError>(MaybeRelocatable::Int(Felt::new(9i32))),
_added_addr
added_addr,
Ok(MaybeRelocatable::Int(num)) if num == Felt::new(9)
);
}

#[test]
fn add_usize_to_int() {
let addr = MaybeRelocatable::from(Felt::new(7_i32));
let _added_addr = addr.add_usize(2);
assert_eq!(MaybeRelocatable::Int(Felt::new(9_i32)), _added_addr);
let added_addr = addr.add_usize(2);
assert_eq!(MaybeRelocatable::Int(Felt::new(9)), added_addr);
}

#[test]
Expand Down

0 comments on commit 0247165

Please sign in to comment.