()
| 892 | |
| 893 | #[test] |
| 894 | fn test_get_contents_root_vertex() { |
| 895 | let store = MemoryChangeStore::new(); |
| 896 | |
| 897 | let hash_fn = |_: NodeId| -> Option<Hash> { None }; |
| 898 | |
| 899 | // ROOT span should return 0 |
| 900 | let mut buf = vec![0u8; 10]; |
| 901 | let n = store |
| 902 | .get_contents(hash_fn, GraphNode::ROOT, &mut buf) |
| 903 | .unwrap(); |
| 904 | assert_eq!(n, 0); |
| 905 | } |
| 906 | |
| 907 | #[test] |
| 908 | fn test_get_contents_out_of_bounds() { |
nothing calls this directly
no test coverage detected