@@ -114,9 +114,15 @@ async fn _burn_invalid_source() {
114114
115115 // When we burn 50 tokens.
116116
117- let burn_ix =
118- spl_token:: instruction:: burn ( & spl_token:: ID , & Pubkey :: new_unique ( ) , & mint, & owner. pubkey ( ) , & [ ] , 50 )
119- . unwrap ( ) ; // Invalid sender
117+ let burn_ix = spl_token:: instruction:: burn (
118+ & spl_token:: ID ,
119+ & Pubkey :: new_unique ( ) ,
120+ & mint,
121+ & owner. pubkey ( ) ,
122+ & [ ] ,
123+ 50 ,
124+ )
125+ . unwrap ( ) ; // Invalid sender
120126
121127 let tx = Transaction :: new_signed_with_payer (
122128 & [ burn_ix] ,
@@ -126,7 +132,13 @@ async fn _burn_invalid_source() {
126132 ) ;
127133 let result = context. banks_client . process_transaction ( tx) . await ;
128134 let inner_error = result. err ( ) . unwrap ( ) . unwrap ( ) ;
129- assert_eq ! ( inner_error, solana_transaction_error:: TransactionError :: InstructionError ( 0 , solana_instruction:: error:: InstructionError :: InvalidAccountData ) ) ;
135+ assert_eq ! (
136+ inner_error,
137+ solana_transaction_error:: TransactionError :: InstructionError (
138+ 0 ,
139+ solana_instruction:: error:: InstructionError :: InvalidAccountData
140+ )
141+ ) ;
130142}
131143
132144#[ tokio:: test]
@@ -182,7 +194,11 @@ async fn burn_frozen_source() {
182194 & [ & context. payer , & freeze_authority] ,
183195 context. last_blockhash ,
184196 ) ;
185- context. banks_client . process_transaction ( freeze_tx) . await . unwrap ( ) ;
197+ context
198+ . banks_client
199+ . process_transaction ( freeze_tx)
200+ . await
201+ . unwrap ( ) ;
186202
187203 // When we burn 50 tokens.
188204
@@ -198,7 +214,13 @@ async fn burn_frozen_source() {
198214 ) ;
199215 let result = context. banks_client . process_transaction ( tx) . await ;
200216 let inner_error = result. err ( ) . unwrap ( ) . unwrap ( ) ;
201- assert_eq ! ( inner_error, solana_transaction_error:: TransactionError :: InstructionError ( 0 , solana_instruction:: error:: InstructionError :: Custom ( 17 ) ) ) ;
217+ assert_eq ! (
218+ inner_error,
219+ solana_transaction_error:: TransactionError :: InstructionError (
220+ 0 ,
221+ solana_instruction:: error:: InstructionError :: Custom ( 17 )
222+ )
223+ ) ;
202224}
203225
204226#[ tokio:: test]
@@ -230,7 +252,13 @@ async fn burn_native() {
230252 ) ;
231253 let result = context. banks_client . process_transaction ( tx) . await ;
232254 let inner_error = result. err ( ) . unwrap ( ) . unwrap ( ) ;
233- assert_eq ! ( inner_error, solana_transaction_error:: TransactionError :: InstructionError ( 0 , solana_instruction:: error:: InstructionError :: Custom ( 10 ) ) ) ;
255+ assert_eq ! (
256+ inner_error,
257+ solana_transaction_error:: TransactionError :: InstructionError (
258+ 0 ,
259+ solana_instruction:: error:: InstructionError :: Custom ( 10 )
260+ )
261+ ) ;
234262}
235263
236264#[ tokio:: test]
@@ -285,7 +313,13 @@ async fn burn_excessive_amount() {
285313 ) ;
286314 let result = context. banks_client . process_transaction ( tx) . await ;
287315 let inner_error = result. err ( ) . unwrap ( ) . unwrap ( ) ;
288- assert_eq ! ( inner_error, solana_transaction_error:: TransactionError :: InstructionError ( 0 , solana_instruction:: error:: InstructionError :: Custom ( 1 ) ) ) ;
316+ assert_eq ! (
317+ inner_error,
318+ solana_transaction_error:: TransactionError :: InstructionError (
319+ 0 ,
320+ solana_instruction:: error:: InstructionError :: Custom ( 1 )
321+ )
322+ ) ;
289323}
290324
291325#[ tokio:: test]
@@ -330,9 +364,15 @@ async fn burn_different_mint() {
330364
331365 // When we burn 50 tokens.
332366
333- let burn_ix =
334- spl_token:: instruction:: burn ( & spl_token:: ID , & account, & native_mint, & owner. pubkey ( ) , & [ ] , 50 )
335- . unwrap ( ) ;
367+ let burn_ix = spl_token:: instruction:: burn (
368+ & spl_token:: ID ,
369+ & account,
370+ & native_mint,
371+ & owner. pubkey ( ) ,
372+ & [ ] ,
373+ 50 ,
374+ )
375+ . unwrap ( ) ;
336376
337377 let tx = Transaction :: new_signed_with_payer (
338378 & [ burn_ix] ,
@@ -342,5 +382,11 @@ async fn burn_different_mint() {
342382 ) ;
343383 let result = context. banks_client . process_transaction ( tx) . await ;
344384 let inner_error = result. err ( ) . unwrap ( ) . unwrap ( ) ;
345- assert_eq ! ( inner_error, solana_transaction_error:: TransactionError :: InstructionError ( 0 , solana_instruction:: error:: InstructionError :: Custom ( 3 ) ) ) ;
385+ assert_eq ! (
386+ inner_error,
387+ solana_transaction_error:: TransactionError :: InstructionError (
388+ 0 ,
389+ solana_instruction:: error:: InstructionError :: Custom ( 3 )
390+ )
391+ ) ;
346392}
0 commit comments