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

Function test_value_slicing

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

Source from the content-addressed store, hash-verified

385
386 #[test]
387 fn test_value_slicing() {
388 let data = b"hello world test";
389 let value = MappedValue::Memory(data.to_vec());
390
391 let slice = value.slice(6, 5).unwrap();
392 assert_eq!(slice.as_slice(), b"world");
393
394 let invalid_slice = value.slice(10, 20);
395 assert!(invalid_slice.is_none());
396 }
397
398 #[tokio::test]
399 async fn test_large_value_temp_file() {

Callers

nothing calls this directly

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected