MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / test_available_memory

Function test_available_memory

graphlite/src/exec/memory_budget.rs:409–419  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

407
408 #[test]
409 fn test_available_memory() {
410 let budget = MemoryBudget::new(1000);
411
412 assert_eq!(budget.available(), 1000);
413
414 budget.allocate(300).unwrap();
415 assert_eq!(budget.available(), 700);
416
417 budget.allocate(500).unwrap();
418 assert_eq!(budget.available(), 200);
419 }
420}

Callers

nothing calls this directly

Calls 2

unwrapMethod · 0.80
allocateMethod · 0.80

Tested by

no test coverage detected