mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-03-25 19:53:07 +00:00
test_write_append_and_read added
This commit is contained in:
parent
20c35b0cbb
commit
a48057eac3
@ -275,4 +275,16 @@ mod tests {
|
||||
assert_eq!(max_slot(&state), 5);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_write_append_and_read() {
|
||||
let mut state = PrivateSCState::new();
|
||||
let data = vec![1u8; PRIVATE_BLOB_SIZE * 2 + 10];
|
||||
|
||||
let last_slot = write_num_bytes_append(&mut state, data.clone()).unwrap();
|
||||
assert_eq!(last_slot, 3);
|
||||
|
||||
let read = read_num_bytes_start(&state, last_slot).unwrap();
|
||||
assert_eq!(read.len(), 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user