From 44246bae1fdb1fc97d72fda1106f0606bb560212 Mon Sep 17 00:00:00 2001 From: Rostyslav Tyshko Date: Fri, 2 May 2025 17:26:36 -0400 Subject: [PATCH] offset test added --- sc_core/src/private_state.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sc_core/src/private_state.rs b/sc_core/src/private_state.rs index 9e46333b..7803dc62 100644 --- a/sc_core/src/private_state.rs +++ b/sc_core/src/private_state.rs @@ -256,4 +256,11 @@ mod tests { assert_eq!(blob, deserialized); } + #[test] + fn test_calculate_offset_slot() { + assert_eq!(calculate_offset_slot(0), 0); + assert_eq!(calculate_offset_slot(PRIVATE_BLOB_SIZE), 1); + assert_eq!(calculate_offset_slot(PRIVATE_BLOB_SIZE * 2 - 1), 1); + } + }