Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit bf73572

Browse files
committed
Update more panic format change affected tests...
1 parent 4ff19a2 commit bf73572

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed

accounts-db/src/account_storage.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ pub(crate) mod tests {
352352
}
353353

354354
#[test]
355-
#[should_panic(expected = "assertion failed: self.no_shrink_in_progress()")]
355+
#[should_panic(expected = "self.no_shrink_in_progress()")]
356356
fn test_get_slot_storage_entry_fail() {
357357
let storage = AccountStorage::default();
358358
storage
@@ -362,7 +362,7 @@ pub(crate) mod tests {
362362
}
363363

364364
#[test]
365-
#[should_panic(expected = "assertion failed: self.no_shrink_in_progress()")]
365+
#[should_panic(expected = "self.no_shrink_in_progress()")]
366366
fn test_all_slots_fail() {
367367
let storage = AccountStorage::default();
368368
storage
@@ -372,7 +372,7 @@ pub(crate) mod tests {
372372
}
373373

374374
#[test]
375-
#[should_panic(expected = "assertion failed: self.no_shrink_in_progress()")]
375+
#[should_panic(expected = "self.no_shrink_in_progress()")]
376376
fn test_initialize_fail() {
377377
let mut storage = AccountStorage::default();
378378
storage
@@ -382,9 +382,7 @@ pub(crate) mod tests {
382382
}
383383

384384
#[test]
385-
#[should_panic(
386-
expected = "assertion failed: shrink_can_be_active || self.shrink_in_progress_map.is_empty()"
387-
)]
385+
#[should_panic(expected = "shrink_can_be_active || self.shrink_in_progress_map.is_empty()")]
388386
fn test_remove_fail() {
389387
let storage = AccountStorage::default();
390388
storage
@@ -394,7 +392,7 @@ pub(crate) mod tests {
394392
}
395393

396394
#[test]
397-
#[should_panic(expected = "assertion failed: self.no_shrink_in_progress()")]
395+
#[should_panic(expected = "self.no_shrink_in_progress()")]
398396
fn test_iter_fail() {
399397
let storage = AccountStorage::default();
400398
storage
@@ -404,7 +402,7 @@ pub(crate) mod tests {
404402
}
405403

406404
#[test]
407-
#[should_panic(expected = "assertion failed: self.no_shrink_in_progress()")]
405+
#[should_panic(expected = "self.no_shrink_in_progress()")]
408406
fn test_insert_fail() {
409407
let storage = AccountStorage::default();
410408
let sample = storage.get_test_storage();

accounts-db/src/accounts_db.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17764,7 +17764,7 @@ pub mod tests {
1776417764
}
1776517765

1776617766
#[test]
17767-
#[should_panic(expected = "assertion failed: self.storage.remove")]
17767+
#[should_panic(expected = "self.storage.remove")]
1776817768
fn test_handle_dropped_roots_for_ancient_assert() {
1776917769
solana_logger::setup();
1777017770
let common_store_path = Path::new("");

accounts-db/src/ancient_append_vecs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ pub mod tests {
993993

994994
#[test]
995995
#[should_panic(
996-
expected = "assertion failed: accounts_to_combine.target_slots_sorted.len() >= packed_contents.len()"
996+
expected = "accounts_to_combine.target_slots_sorted.len() >= packed_contents.len()"
997997
)]
998998
fn test_write_packed_storages_too_few_slots() {
999999
let (db, storages, slots, _infos) = get_sample_storages(1, None);

accounts-db/src/append_vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ pub mod tests {
732732
static_assertions::assert_eq_align!(u64, StoredMeta, AccountMeta);
733733

734734
#[test]
735-
#[should_panic(expected = "assertion failed: accounts.has_hash_and_write_version()")]
735+
#[should_panic(expected = "accounts.has_hash_and_write_version()")]
736736
fn test_storable_accounts_with_hashes_and_write_versions_new() {
737737
let account = AccountSharedData::default();
738738
// for (Slot, &'a [(&'a Pubkey, &'a T)], IncludeSlotInHash)

accounts-db/src/rolling_bit_field.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,13 +477,13 @@ pub mod tests {
477477
}
478478

479479
#[test]
480-
#[should_panic(expected = "assertion failed: max_width.is_power_of_two()")]
480+
#[should_panic(expected = "max_width.is_power_of_two()")]
481481
fn test_bitfield_power_2() {
482482
let _ = RollingBitField::new(3);
483483
}
484484

485485
#[test]
486-
#[should_panic(expected = "assertion failed: max_width > 0")]
486+
#[should_panic(expected = "max_width > 0")]
487487
fn test_bitfield_0() {
488488
let _ = RollingBitField::new(0);
489489
}

bucket_map/src/bucket_storage.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,9 @@ mod test {
538538
}
539539

540540
#[test]
541-
#[should_panic(expected = "assertion failed: `(left == right)`")]
541+
// rust 1.73+ (our as-of-writing nightly version) changed panic message. we're stuck with this
542+
// short common substring until the monorepo is fully 1.73+ including stable.
543+
#[should_panic(expected = "left == right")]
542544
fn test_header_size() {
543545
_ = BucketStorage::<BucketBadHeader>::new_with_capacity(
544546
Arc::default(),

entry/src/poh.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ mod tests {
182182
}
183183

184184
#[test]
185-
#[should_panic(expected = "assertion failed: hashes_per_tick > 1")]
185+
#[should_panic(expected = "hashes_per_tick > 1")]
186186
fn test_target_poh_time_hashes_per_tick() {
187187
let zero = Hash::default();
188188
let poh = Poh::new(zero, Some(0));

runtime/src/bank/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3585,7 +3585,7 @@ fn test_bank_hash_internal_state_verify() {
35853585
}
35863586

35873587
#[test]
3588-
#[should_panic(expected = "assertion failed: self.is_frozen()")]
3588+
#[should_panic(expected = "self.is_frozen()")]
35893589
fn test_verify_hash_unfrozen() {
35903590
let bank = create_simple_test_bank(2_000);
35913591
assert!(bank.verify_hash());
@@ -12459,7 +12459,7 @@ fn test_distribute_partitioned_epoch_rewards() {
1245912459
}
1246012460

1246112461
#[test]
12462-
#[should_panic(expected = "assertion failed: self.epoch_schedule.get_slots_in_epoch")]
12462+
#[should_panic(expected = "self.epoch_schedule.get_slots_in_epoch")]
1246312463
fn test_distribute_partitioned_epoch_rewards_too_many_partitions() {
1246412464
let (genesis_config, _mint_keypair) = create_genesis_config(1_000_000 * LAMPORTS_PER_SOL);
1246512465
let mut bank = Bank::new_for_tests(&genesis_config);

sdk/program/src/epoch_rewards.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ mod tests {
6666

6767
#[test]
6868
#[should_panic(
69-
expected = "assertion failed: self.distributed_rewards.saturating_add(amount) <= self.total_rewards"
69+
expected = "self.distributed_rewards.saturating_add(amount) <= self.total_rewards"
7070
)]
7171
fn test_epoch_rewards_distribute_panic() {
7272
let mut epoch_rewards = EpochRewards::new(100, 0, 64);

0 commit comments

Comments
 (0)