Compare commits

...

3 Commits

Author SHA1 Message Date
Robert Lucas
b5f611eb19 Merge f894fb15d5 into 9ea911b0bb 2025-01-15 19:42:45 +01:00
Robert-M-Lucas
f894fb15d5 cargo fmt 2025-01-01 14:30:55 +00:00
Robert-M-Lucas
38aab28025 Correcting many_boxes_long_lived that BumpAllocator should fail, when it currently succeeds with cargo test -r 2025-01-01 14:23:57 +00:00

View File

@@ -9,6 +9,7 @@ extern crate alloc;
use alloc::{boxed::Box, vec::Vec};
use blog_os::allocator::HEAP_SIZE;
use bootloader::{entry_point, BootInfo};
use core::hint::black_box;
use core::panic::PanicInfo;
entry_point!(main);
@@ -61,6 +62,7 @@ fn many_boxes_long_lived() {
let x = Box::new(i);
assert_eq!(*x, i);
}
black_box(&long_lived); // new - ensures long_lived isn't optimized away
assert_eq!(*long_lived, 1); // new
}