diff --git a/basics/account-data/native/program/tests/tests.rs b/basics/account-data/native/program/tests/tests.rs index 25fa5beba..515fd5f32 100644 --- a/basics/account-data/native/program/tests/tests.rs +++ b/basics/account-data/native/program/tests/tests.rs @@ -49,7 +49,7 @@ fn test_account_data() { svm.latest_blockhash(), ); - svm.send_transaction(tx).unwrap(); + assert!(svm.send_transaction(tx).is_ok()); let address_info_account_data = &svm .get_account(&address_info_account.pubkey()) diff --git a/basics/checking-accounts/native/program/tests/test.rs b/basics/checking-accounts/native/program/tests/test.rs index a9eb81d59..8fe3ddcfd 100644 --- a/basics/checking-accounts/native/program/tests/test.rs +++ b/basics/checking-accounts/native/program/tests/test.rs @@ -36,7 +36,7 @@ fn test_checking_accounts() { ); // verify tx was sent successfully - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); let ix = Instruction { program_id, @@ -57,5 +57,5 @@ fn test_checking_accounts() { ); // verify tx was sent successfully - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); } diff --git a/basics/close-account/native/program/tests/test.rs b/basics/close-account/native/program/tests/test.rs index 94f15de62..94549910c 100644 --- a/basics/close-account/native/program/tests/test.rs +++ b/basics/close-account/native/program/tests/test.rs @@ -46,7 +46,7 @@ fn test_close_account() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); // clsose user ix let data = borsh::to_vec(&MyInstruction::CloseUser).unwrap(); @@ -68,5 +68,5 @@ fn test_close_account() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); } diff --git a/basics/counter/native/program/tests/test.rs b/basics/counter/native/program/tests/test.rs index 02fa39fb9..05936d443 100644 --- a/basics/counter/native/program/tests/test.rs +++ b/basics/counter/native/program/tests/test.rs @@ -38,7 +38,7 @@ fn test_counter() { &[&payer, &counter_account], svm.latest_blockhash(), ); - svm.send_transaction(tx).unwrap(); + assert!(svm.send_transaction(tx).is_ok()); let ix = Instruction { program_id, diff --git a/basics/create-account/native/program/tests/test.rs b/basics/create-account/native/program/tests/test.rs index 8c29dffb8..da70c8d1a 100644 --- a/basics/create-account/native/program/tests/test.rs +++ b/basics/create-account/native/program/tests/test.rs @@ -34,5 +34,5 @@ fn test_create_account() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); } diff --git a/basics/cross-program-invocation/native/programs/hand/tests/test.rs b/basics/cross-program-invocation/native/programs/hand/tests/test.rs index cd66ed900..9014535a9 100644 --- a/basics/cross-program-invocation/native/programs/hand/tests/test.rs +++ b/basics/cross-program-invocation/native/programs/hand/tests/test.rs @@ -46,7 +46,7 @@ fn test_cpi() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); let data = borsh::to_vec(&SetPowerStatus { name: "Chris".to_string(), @@ -69,5 +69,5 @@ fn test_cpi() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); } diff --git a/basics/favorites/native/program/tests/test.rs b/basics/favorites/native/program/tests/test.rs index 279418659..4b726a6ee 100644 --- a/basics/favorites/native/program/tests/test.rs +++ b/basics/favorites/native/program/tests/test.rs @@ -51,7 +51,7 @@ fn test_favorites() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); let favorites_account_data = svm.get_account(&favorites_pda).unwrap().data; @@ -79,5 +79,5 @@ fn test_favorites() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); } diff --git a/basics/pda-rent-payer/native/program/tests/test.rs b/basics/pda-rent-payer/native/program/tests/test.rs index dfd0c3116..337835e5a 100644 --- a/basics/pda-rent-payer/native/program/tests/test.rs +++ b/basics/pda-rent-payer/native/program/tests/test.rs @@ -43,7 +43,7 @@ fn test_pda_rent_payer() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); let new_account = Keypair::new(); @@ -66,5 +66,5 @@ fn test_pda_rent_payer() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); } diff --git a/basics/processing-instructions/native/program/tests/test.rs b/basics/processing-instructions/native/program/tests/test.rs index a2368fe29..ebc20d2d4 100644 --- a/basics/processing-instructions/native/program/tests/test.rs +++ b/basics/processing-instructions/native/program/tests/test.rs @@ -47,5 +47,5 @@ fn test_processing_ixs() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); } diff --git a/basics/program-derived-addresses/native/program/tests/test.rs b/basics/program-derived-addresses/native/program/tests/test.rs index 6c2a02c3e..23e7be935 100644 --- a/basics/program-derived-addresses/native/program/tests/test.rs +++ b/basics/program-derived-addresses/native/program/tests/test.rs @@ -40,7 +40,7 @@ fn test_pda() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); let (pda, bump) = Pubkey::find_program_address(&[b"page_visits", test_user.pubkey().as_ref()], &program_id); @@ -69,7 +69,7 @@ fn test_pda() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); let data = borsh::to_vec(&IncrementPageVisits {}).unwrap(); @@ -89,7 +89,7 @@ fn test_pda() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); // read page visits let account_info = svm.get_account(&pda).unwrap(); diff --git a/basics/realloc/native/program/tests/test.rs b/basics/realloc/native/program/tests/test.rs index 7fd01d339..0b70fd863 100644 --- a/basics/realloc/native/program/tests/test.rs +++ b/basics/realloc/native/program/tests/test.rs @@ -47,7 +47,7 @@ fn test_realloc() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); let data = borsh::to_vec(&ReallocInstruction::ReallocateWithoutZeroInit( EnhancedAddressInfoExtender { @@ -74,7 +74,7 @@ fn test_realloc() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); let data = borsh::to_vec(&ReallocInstruction::ReallocateZeroInit(WorkInfo { name: "Pete".to_string(), @@ -97,5 +97,5 @@ fn test_realloc() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); } diff --git a/basics/rent/native/program/tests/test.rs b/basics/rent/native/program/tests/test.rs index 868526407..5dbc229ed 100644 --- a/basics/rent/native/program/tests/test.rs +++ b/basics/rent/native/program/tests/test.rs @@ -37,7 +37,7 @@ fn test_rent() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); // rent let _rent = svm.get_account(&new_keypair.pubkey()).unwrap().lamports; diff --git a/basics/repository-layout/native/program/tests/test.rs b/basics/repository-layout/native/program/tests/test.rs index 3c5514912..2db9c57da 100644 --- a/basics/repository-layout/native/program/tests/test.rs +++ b/basics/repository-layout/native/program/tests/test.rs @@ -41,14 +41,14 @@ fn test_repo_layout() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); let data = borsh::to_vec(&CarnivalInstructionData { name: "Jimmy".to_string(), height: 36, ticket_count: 15, attraction: "game".to_string(), - attraction_name: "I Got it!".to_string(), + attraction_name: "I Got It!".to_string(), }) .unwrap(); @@ -65,7 +65,8 @@ fn test_repo_layout() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); + let data = borsh::to_vec(&CarnivalInstructionData { name: "Jimmy".to_string(), height: 36, @@ -88,5 +89,5 @@ fn test_repo_layout() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); } diff --git a/basics/transfer-sol/native/program/tests/test.rs b/basics/transfer-sol/native/program/tests/test.rs index fa7e0a349..09e4abc1b 100644 --- a/basics/transfer-sol/native/program/tests/test.rs +++ b/basics/transfer-sol/native/program/tests/test.rs @@ -45,7 +45,7 @@ fn test_transfer_sol() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); let payer_balance_after = svm.get_balance(&payer.pubkey()).unwrap(); let recipient_balance_after = svm.get_balance(&test_recipient1.pubkey()).unwrap_or(0); @@ -68,7 +68,7 @@ fn test_transfer_sol() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); let data = borsh::to_vec(&TransferInstruction::ProgramTransfer(LAMPORTS_PER_SOL)).unwrap(); @@ -89,5 +89,5 @@ fn test_transfer_sol() { svm.latest_blockhash(), ); - let _ = svm.send_transaction(tx).is_ok(); + assert!(svm.send_transaction(tx).is_ok()); }