()
| 451 | |
| 452 | #[test] |
| 453 | fn test_view_state_truncated() { |
| 454 | let state = ViewState { |
| 455 | id: 1, |
| 456 | name: "test".to_string(), |
| 457 | state: Merkle::ZERO, |
| 458 | change_count: 0, |
| 459 | kind: ViewScope::Shared, |
| 460 | parent: None, |
| 461 | }; |
| 462 | |
| 463 | let bytes = serialize_view_state(&state); |
| 464 | // Cut into the v1 portion (not just the v2 extension) |
| 465 | let truncated = &bytes[..12]; |
| 466 | let result = deserialize_view_state(truncated); |
| 467 | assert!(result.is_err()); |
| 468 | } |
| 469 | |
| 470 | #[test] |
| 471 | fn test_view_state_invalid_kind() { |
nothing calls this directly
no test coverage detected