From 8ab89ee55d8bc825ac42d11846702b559be83113 Mon Sep 17 00:00:00 2001 From: Yonatan Iluz Date: Mon, 15 Jul 2024 08:19:37 +0300 Subject: [PATCH] test: test segment arena number of instances --- crates/blockifier/src/execution/entry_point_test.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/crates/blockifier/src/execution/entry_point_test.rs b/crates/blockifier/src/execution/entry_point_test.rs index 55dfe57fe2..07abce7eb9 100644 --- a/crates/blockifier/src/execution/entry_point_test.rs +++ b/crates/blockifier/src/execution/entry_point_test.rs @@ -529,12 +529,11 @@ fn test_cairo1_entry_point_segment_arena() { ..trivial_external_entry_point_new(test_contract) }; - assert!( - entry_point_call - .execute_directly(&mut state) - .unwrap() - .resources - .builtin_instance_counter - .contains_key(&BuiltinName::segment_arena) + assert_eq!( + entry_point_call.execute_directly(&mut state).unwrap().resources.builtin_instance_counter + [&BuiltinName::segment_arena], + // Note: the number of segment_arena instances should not depend on the compiler or VM + // version. Do not manually fix this then when upgrading them - it might be a bug. + 2 ); }