From b30e04fe6dbe180abbd222dc0de81af1d4cc0cdb Mon Sep 17 00:00:00 2001 From: Natasha Moongrave Date: Wed, 1 Apr 2026 20:04:58 +0200 Subject: added a many_boxes_long_lived intgration test for heap_allocation --- StrixKernel/tests/heap_allocation.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/StrixKernel/tests/heap_allocation.rs b/StrixKernel/tests/heap_allocation.rs index 075a5d1..bd8efc1 100644 --- a/StrixKernel/tests/heap_allocation.rs +++ b/StrixKernel/tests/heap_allocation.rs @@ -63,4 +63,14 @@ fn many_boxes() { let x = Box::new(i); assert_eq!(*x, i); } +} + +#[test_case] +fn many_boxes_long_lived() { + let long_lived = Box::new(1); + for i in 0..HEAP_SIZE { + let x = Box::new(i); + assert_eq!(*x, i); + } + assert_eq!(*long_lived, 1); } \ No newline at end of file -- cgit v1.2.3