diff options
| -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 |
