()
| 232 | |
| 233 | #[test] |
| 234 | fn store_then_load_roundtrips() { |
| 235 | // Skip when the env doesn't expose a cache dir (CI sandbox can do this). |
| 236 | let Some(_) = cache_dir() else { return; }; |
| 237 | // Use a hash unlikely to collide with anything else's tests. |
| 238 | let h = MeshHash(0xfeed_cafe_dead_beef); |
| 239 | let bytes: Vec<u8> = (0..VOXEL_BYTES).map(|i| (i * 7 + 13) as u8).collect(); |
| 240 | store(h, &bytes).expect("store"); |
| 241 | let got = load(h).expect("load hit"); |
| 242 | assert_eq!(got, bytes); |
| 243 | // Cleanup so the test is repeatable. |
| 244 | if let Some(p) = cache_path(h) { let _ = fs::remove_file(p); } |
| 245 | } |
| 246 | |
| 247 | #[test] |
| 248 | fn load_miss_returns_none() { |
nothing calls this directly
no test coverage detected