diff --git a/CHANGELOG.md b/CHANGELOG.md index e66e01a0ba..410e36ec17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ #### Upcoming Changes +* chore: remove duplicate get_integer_from_var_name tests from memcpy_hint_utils [#2250](https://github.com/lambdaclass/cairo-vm/pull/2250) + #### [3.0.0-rc.4] - 2025-28-10 * fix: error mapping for fee_provision in excess_balance hint [#2236](https://github.com/lambdaclass/cairo-vm/pull/2236) diff --git a/vm/src/hint_processor/builtin_hint_processor/memcpy_hint_utils.rs b/vm/src/hint_processor/builtin_hint_processor/memcpy_hint_utils.rs index ea0d6e799c..af776982af 100644 --- a/vm/src/hint_processor/builtin_hint_processor/memcpy_hint_utils.rs +++ b/vm/src/hint_processor/builtin_hint_processor/memcpy_hint_utils.rs @@ -40,63 +40,3 @@ pub fn memcpy_enter_scope( exec_scopes.enter_scope(HashMap::from([(String::from("n"), len)])); Ok(()) } - -#[cfg(test)] -mod tests { - use super::*; - - use crate::utils::test_utils::*; - use assert_matches::assert_matches; - - use crate::Felt252; - #[cfg(target_arch = "wasm32")] - use wasm_bindgen_test::*; - - #[test] - #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)] - fn get_integer_from_var_name_valid() { - let mut vm = vm!(); - // initialize memory segments - vm.segments.add(); - - // initialize fp - vm.run_context.fp = 1; - - let var_name: &str = "variable"; - - //Create ids_data - let ids_data = ids_data![var_name]; - - //Insert ids.prev_locs.exp into memory - vm.segments = segments![((1, 0), 10)]; - - assert_eq!( - get_integer_from_var_name(var_name, &vm, &ids_data, &ApTracking::default()) - .unwrap() - .as_ref(), - &Felt252::from(10) - ); - } - - #[test] - #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)] - fn get_integer_from_var_name_invalid_expected_integer() { - let mut vm = vm!(); - - // initialize fp - vm.run_context.fp = 1; - - let var_name: &str = "variable"; - - //Create ids_data - let ids_data = ids_data![var_name]; - - //Insert ids.variable into memory as a RelocatableValue - vm.segments = segments![((1, 0), (1, 1))]; - - assert_matches!( - get_integer_from_var_name(var_name, &vm, &ids_data, &ApTracking::default()), - Err(HintError::IdentifierNotInteger(bx)) if bx.as_ref() == var_name - ); - } -}