@@ -133,30 +133,21 @@ fn test_spltoken_domain_data(
133133 multisig : & AccountInfo < ' _ > ,
134134 rent : & AccountInfo < ' _ > ,
135135) {
136- test_spl_account_pack_is_native_branch ( acc) ;
137- test_spl_account_is_native_branch ( acc) ;
136+ test_spl_account_is_native_branches ( acc) ;
138137 test_spl_account_domain_data ( acc) ;
139138 test_spl_mint_domain_data ( mint) ;
140139 test_spl_multisig_domain_data ( multisig) ;
141140 test_spl_rent_domain_data ( rent) ;
142141}
143142
144- fn test_spl_account_pack_is_native_branch ( acc : & AccountInfo < ' _ > ) {
145- // Keep is_native symbolic and pack through an extra call frame to mirror process_burn’s cross-frame writeback
143+ fn test_spl_account_is_native_branches ( acc : & AccountInfo < ' _ > ) {
144+ // Keep is_native symbolic, hit pack through an extra call frame, and exercise COption::<u64>::is_some
146145 cheatcode_is_spl_account ( acc) ;
146+
147147 let account = get_account ( acc) ;
148148 let mut borrow = acc. data . borrow_mut ( ) ;
149149 pack_account_inner ( & mut borrow, & account) ;
150- }
151-
152- fn pack_account_inner ( buf : & mut [ u8 ] , account : & Account ) {
153- Account :: pack ( account. clone ( ) , buf) . unwrap ( ) ;
154- }
155150
156- fn test_spl_account_is_native_branch ( acc : & AccountInfo < ' _ > ) {
157- // Keep is_native symbolic and exercise COption::<u64>::is_some to reproduce the ndbranch
158- cheatcode_is_spl_account ( acc) ;
159- let account = get_account ( acc) ;
160151 let _ = account. is_native ( ) ;
161152}
162153
@@ -263,6 +254,10 @@ fn get_multisig(acc: &AccountInfo<'_>) -> Multisig {
263254 Multisig :: unpack_unchecked ( & acc. data . borrow ( ) ) . unwrap ( )
264255}
265256
257+ fn pack_account_inner ( buf : & mut [ u8 ] , account : & Account ) {
258+ Account :: pack ( account. clone ( ) , buf) . unwrap ( ) ;
259+ }
260+
266261#[ inline( never) ]
267262fn cheatcode_is_spl_account ( _: & AccountInfo < ' _ > ) { }
268263
0 commit comments