()
| 383 | |
| 384 | #[test] |
| 385 | fn test_memory_stats_format() { |
| 386 | let budget = MemoryBudget::new(100 * 1024 * 1024); // 100MB |
| 387 | budget.allocate(50 * 1024 * 1024).unwrap(); // 50MB |
| 388 | |
| 389 | let stats = budget.stats(); |
| 390 | let formatted = stats.format_human_readable(); |
| 391 | |
| 392 | assert!(formatted.contains("50.00MB")); |
| 393 | assert!(formatted.contains("100.00MB")); |
| 394 | assert!(formatted.contains("50.0%")); |
| 395 | } |
| 396 | |
| 397 | #[test] |
| 398 | fn test_try_allocate() { |
nothing calls this directly
no test coverage detected