From 5b2098c9f78fe2e8453fb8e440687a16fa0c9caf Mon Sep 17 00:00:00 2001 From: Rostyslav Tyshko Date: Thu, 3 Apr 2025 18:36:06 -0400 Subject: [PATCH] add test_produce_blob_from_fit_vec_panic --- storage/src/sc_db_utils.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/storage/src/sc_db_utils.rs b/storage/src/sc_db_utils.rs index 59f59af..1cd32e4 100644 --- a/storage/src/sc_db_utils.rs +++ b/storage/src/sc_db_utils.rs @@ -132,5 +132,12 @@ mod tests { assert_eq!(blob[..4], [0, 1, 2, 3]); } + #[test] + #[should_panic] + fn test_produce_blob_from_fit_vec_panic() { + let data = vec![0; SC_DATA_BLOB_SIZE + 1]; + let _ = produce_blob_from_fit_vec(data); + } + }