@@ -492,6 +492,7 @@ mod tests {
492492 use crate :: hints:: codes:: * ;
493493 use crate :: hints:: hint_processors:: MinimalBootloaderHintProcessor ;
494494 use crate :: hints:: types:: { BootloaderConfig , SimpleBootloaderInput } ;
495+ use crate :: test_utils:: prepare_ids_data_for_test;
495496 use cairo_vm:: hint_processor:: builtin_hint_processor:: builtin_hint_processor_definition:: HintProcessorData ;
496497 use cairo_vm:: hint_processor:: builtin_hint_processor:: hint_utils:: get_maybe_relocatable_from_var_name;
497498 use cairo_vm:: hint_processor:: hint_processor_definition:: HintProcessorLogic ;
@@ -529,44 +530,6 @@ mod tests {
529530 }
530531 }
531532
532- fn prepare_refrences_for_test ( num : i32 ) -> HashMap < usize , HintReference > {
533- // Create a HashMap of HintReferences for testing.
534- // output should look like:
535- // {
536- // 0: HintReference::new_simple(-num),
537- // 1: HintReference::new_simple(-num + 1),
538- // ...
539- // num - 1: HintReference::new_simple(-1),
540- // num: HintReference::new_simple(0),
541- // }
542- let mut references = HashMap :: < usize , HintReference > :: new ( ) ;
543- for i in 0 ..num {
544- references. insert ( i as usize , HintReference :: new_simple ( i - num) ) ;
545- }
546- references
547- }
548-
549- fn prepare_ids_data_for_test (
550- names : & [ & str ] ,
551- ) -> std:: collections:: HashMap < String , HintReference > {
552- // Create a HashMap of HintReferences for testing, where each name corresponds to a
553- // HintReference.
554- // The output should look like:
555- // {
556- // "name1": HintReference::new_simple(-num),
557- // "name2": HintReference::new_simple(-num + 1),
558- // ...
559- // "nameN": HintReference::new_simple(-1),
560- // }
561- // where num is the length of names.
562- let references = prepare_refrences_for_test ( names. len ( ) as i32 ) ;
563- let mut ids_data = std:: collections:: HashMap :: < String , HintReference > :: new ( ) ;
564- for ( i, name) in names. iter ( ) . enumerate ( ) {
565- ids_data. insert ( name. to_string ( ) , references. get ( & i) . unwrap ( ) . clone ( ) ) ;
566- }
567- ids_data
568- }
569-
570533 #[ rstest]
571534 fn test_prepare_simple_bootloader_output_segment ( bootloader_input : BootloaderInput ) {
572535 // Tests that after running prepare_simple_bootloader_output_segment,
0 commit comments