33/// accounts[2] // Authority Info
44/// instruction_data[0..8] // Little Endian Bytes of u64 amount
55#[ inline( never) ]
6- fn test_process_burn ( accounts : & [ AccountInfo ; 3 ] , instruction_data : & [ u8 ; 8 ] ) -> ProgramResult {
6+ pub fn test_process_burn ( accounts : & [ AccountInfo ; 3 ] , instruction_data : & [ u8 ; 8 ] ) -> ProgramResult {
77 cheatcode_account ! ( & accounts[ 0 ] ) ;
88 cheatcode_mint ! ( & accounts[ 1 ] ) ;
99 cheatcode_account ! ( & accounts[ 2 ] ) ; // Excluding the multisig case
@@ -22,11 +22,13 @@ fn test_process_burn(accounts: &[AccountInfo; 3], instruction_data: &[u8; 8]) ->
2222 let src_mint = src_old. mint ;
2323 let src_owned_sys_inc = src_old. is_owned_by_system_program_or_incinerator ( ) ;
2424 let src_owner = src_old. owner ;
25+ let src_info_owner = owner ! ( & accounts[ 0 ] ) ;
2526 let old_src_delgate = src_old. delegate ( ) . cloned ( ) ;
2627 let old_src_delgated_amount = src_old. delegated_amount ( ) ;
2728 let mint_initialised = mint_old. is_initialized ( ) ;
2829 let mint_init_supply = mint_old. supply ( ) ;
29- let maybe_multisig_is_initialised = None ;
30+ let mint_info_owner = * owner ! ( & accounts[ 1 ] ) ;
31+ let maybe_multisig_is_initialised = None ; // Value set to `None` since authority is an account
3032
3133 #[ cfg( feature = "assumptions" ) ]
3234 if !( src_init_amount <= mint_init_supply && old_src_delgated_amount <= src_init_amount) {
@@ -87,9 +89,9 @@ fn test_process_burn(accounts: &[AccountInfo; 3], instruction_data: &[u8; 8]) ->
8789 }
8890 }
8991
90- if amount == 0 && ! ( owner ! ( & accounts [ 0 ] ) == & PROGRAM_ID ) {
92+ if amount == 0 && * src_info_owner != PROGRAM_ID {
9193 assert_eq ! ( result, Err ( ProgramError :: IncorrectProgramId ) )
92- } else if amount == 0 && ! ( owner ! ( & accounts [ 1 ] ) == & PROGRAM_ID ) {
94+ } else if amount == 0 && mint_info_owner != PROGRAM_ID {
9395 assert_eq ! ( result, Err ( ProgramError :: IncorrectProgramId ) )
9496 } else {
9597 let src_new = get_account ( & accounts[ 0 ] ) ;
0 commit comments