Compare commits

...

3 Commits

Author SHA1 Message Date
Robert Lucas
31dbcf833c Merge f894fb15d5 into 4f6558c021 2025-01-16 00:11:54 +00: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
}