diff options
| author | Natasha Moongrave <natasha@256phi.eu> | 2026-04-01 20:04:58 +0200 |
|---|---|---|
| committer | Natasha Moongrave <natasha@256phi.eu> | 2026-04-01 20:04:58 +0200 |
| commit | b30e04fe6dbe180abbd222dc0de81af1d4cc0cdb (patch) | |
| tree | 861565c2358cc7007609c66c438e66bc7e357fc7 | |
| parent | bd87767255c784156deb19ea166826ab78a023fb (diff) | |
added a many_boxes_long_lived intgration test for heap_allocation
| -rw-r--r-- | StrixKernel/tests/heap_allocation.rs | 10 |
1 files changed, 10 insertions, 0 deletions
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 |
