MCPcopy Create free account
hub / github.com/erans/pgsqlite / test_mapped_value_factory

Function test_mapped_value_factory

src/protocol/memory_mapped.rs:370–384  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

368
369 #[test]
370 fn test_mapped_value_factory() {
371 let factory = MappedValueFactory::new();
372
373 // Small blob should use memory
374 let small_blob = b"small";
375 let value = factory.create_from_blob(small_blob).unwrap();
376 match value {
377 MappedValue::Memory(_) => {}
378 _ => panic!("Expected memory storage for small blob"),
379 }
380
381 // Test empty blob
382 let empty_value = factory.create_from_blob(&[]).unwrap();
383 assert!(empty_value.is_empty());
384 }
385
386 #[test]
387 fn test_value_slicing() {

Callers

nothing calls this directly

Calls 1

create_from_blobMethod · 0.80

Tested by

no test coverage detected