()
| 393 | |
| 394 | #[test] |
| 395 | fn test_view_state_invalid_kind() { |
| 396 | // Build valid v2 bytes but with an invalid kind byte |
| 397 | let mut bytes = Vec::new(); |
| 398 | bytes.extend_from_slice(&1u64.to_le_bytes()); // id |
| 399 | let name = "test"; |
| 400 | bytes.extend_from_slice(&(name.len() as u32).to_le_bytes()); |
| 401 | bytes.extend_from_slice(name.as_bytes()); |
| 402 | bytes.extend_from_slice(&[0u8; 32]); // merkle |
| 403 | bytes.extend_from_slice(&0u64.to_le_bytes()); // change_count |
| 404 | bytes.push(99); // invalid kind |
| 405 | bytes.extend_from_slice(&u64::MAX.to_le_bytes()); // parent (none) |
| 406 | |
| 407 | let result = deserialize_view_state(&bytes); |
| 408 | assert!(result.is_err()); |
| 409 | } |
| 410 | |
| 411 | #[test] |
| 412 | fn test_adj_iterator() { |
nothing calls this directly
no test coverage detected