From b567d061081af9b0356dc09543b09cc9ed6ca87c Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Fri, 22 May 2020 10:54:49 +0200 Subject: [PATCH] Improve simple_allocation test Proposed in https://github.com/phil-opp/blog_os/issues/627#issuecomment-632578270. --- tests/heap_allocation.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/heap_allocation.rs b/tests/heap_allocation.rs index 94a6171f..cfec1ed5 100644 --- a/tests/heap_allocation.rs +++ b/tests/heap_allocation.rs @@ -31,8 +31,10 @@ fn main(boot_info: &'static BootInfo) -> ! { #[test_case] fn simple_allocation() { serial_print!("simple_allocation... "); - let heap_value = Box::new(41); - assert_eq!(*heap_value, 41); + let heap_value_1 = Box::new(41); + let heap_value_2 = Box::new(13); + assert_eq!(*heap_value_1, 41); + assert_eq!(*heap_value_2, 13); serial_println!("[ok]"); }