Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion basics/account-data/native/program/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
4 changes: 2 additions & 2 deletions basics/checking-accounts/native/program/tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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());
}
4 changes: 2 additions & 2 deletions basics/close-account/native/program/tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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());
}
2 changes: 1 addition & 1 deletion basics/counter/native/program/tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion basics/create-account/native/program/tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -69,5 +69,5 @@ fn test_cpi() {
svm.latest_blockhash(),
);

let _ = svm.send_transaction(tx).is_ok();
assert!(svm.send_transaction(tx).is_ok());
}
4 changes: 2 additions & 2 deletions basics/favorites/native/program/tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -79,5 +79,5 @@ fn test_favorites() {
svm.latest_blockhash(),
);

let _ = svm.send_transaction(tx).is_ok();
assert!(svm.send_transaction(tx).is_ok());
}
4 changes: 2 additions & 2 deletions basics/pda-rent-payer/native/program/tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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());
}
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
6 changes: 3 additions & 3 deletions basics/program-derived-addresses/native/program/tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();

Expand All @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions basics/realloc/native/program/tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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(),
Expand All @@ -97,5 +97,5 @@ fn test_realloc() {
svm.latest_blockhash(),
);

let _ = svm.send_transaction(tx).is_ok();
assert!(svm.send_transaction(tx).is_ok());
}
2 changes: 1 addition & 1 deletion basics/rent/native/program/tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 5 additions & 4 deletions basics/repository-layout/native/program/tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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,
Expand All @@ -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());
}
6 changes: 3 additions & 3 deletions basics/transfer-sol/native/program/tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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();

Expand All @@ -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());
}