MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / insert_dim_mismatch

Function insert_dim_mismatch

nodedb-vector/src/multivec/storage.rs:136–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

134
135 #[test]
136 fn insert_dim_mismatch() {
137 let mut store = MultiVectorStore::new(4, MultiVecMode::PerToken);
138 let doc = MultiVectorDoc {
139 doc_id: 2,
140 vectors: vec![vec![0.0f32; 3]], // wrong dim
141 };
142 let err = store.insert(doc).unwrap_err();
143 assert!(matches!(
144 err,
145 MultivecError::DimMismatch {
146 expected: 4,
147 actual: 3
148 }
149 ));
150 }
151
152 #[test]
153 fn insert_meta_token_valid() {

Callers

nothing calls this directly

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected