From d351958458499ec404abfa4a798f3169d120d64f Mon Sep 17 00:00:00 2001 From: Rostyslav Tyshko Date: Fri, 2 May 2025 17:27:55 -0400 Subject: [PATCH] size_mismatch_error test added --- sc_core/src/private_state.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sc_core/src/private_state.rs b/sc_core/src/private_state.rs index 277021c5..272254c7 100644 --- a/sc_core/src/private_state.rs +++ b/sc_core/src/private_state.rs @@ -311,5 +311,11 @@ mod tests { assert!(matches!(rewrite_result, Err(PrivateStateError::EmptyWrite))); } + #[test] + fn test_read_size_mismatch_error() { + let state = PrivateSCState::new(); + let result = read_num_bytes_start(&state, PRIVATE_BLOB_SIZE * 2); + assert!(matches!(result, Err(PrivateStateError::ReadSizeMismatch(_, _)))); + } }