File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ use snforge_std::{
77 start_cheat_block_number_global,
88};
99use starknet :: {ContractAddress , Store };
10+ use starkware_utils :: byte_array :: short_string_to_byte_array;
1011use starkware_utils :: components :: roles :: interface :: {IRolesDispatcher , IRolesDispatcherTrait };
1112use starkware_utils :: interfaces :: identity :: {IdentityDispatcher , IdentityDispatcherTrait };
1213use starkware_utils_testing :: constants as testing_constants;
@@ -156,7 +157,12 @@ pub fn assert_panic_with_felt_error<T, +Drop<T>>(
156157) {
157158 match result {
158159 Result :: Ok (_ ) => panic! (" Expected to fail with: {}" , expected_error ),
159- Result :: Err (error_data ) => assert! (* error_data [0 ] == expected_error ),
160+ Result :: Err (error_data ) => assert! (
161+ * error_data [0 ] == expected_error ,
162+ " Expected error: {}\ n Actual error: {}" ,
163+ short_string_to_byte_array (expected_error ),
164+ short_string_to_byte_array (* error_data [0 ]),
165+ ),
160166 };
161167}
162168
You can’t perform that action at this time.
0 commit comments