()
| 357 | |
| 358 | #[test] |
| 359 | fn index_serialization_roundtrip() { |
| 360 | let mut index = Index::new(); |
| 361 | index.weight_map.insert( |
| 362 | "tensor.weight".to_string(), |
| 363 | "file.safetensors".to_string(), |
| 364 | ); |
| 365 | let json = serde_json::to_string(&index).unwrap(); |
| 366 | let deserialized: Index = serde_json::from_str(&json).unwrap(); |
| 367 | assert_eq!(deserialized.weight_map.len(), 1); |
| 368 | assert_eq!(deserialized.weight_map["tensor.weight"], "file.safetensors"); |
| 369 | } |
| 370 | } |
nothing calls this directly
no outgoing calls
no test coverage detected