mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-17 23:07:50 +00:00
Remove superfluous printing from tests
Our test_runner now prints these messages automatically (see #816 and #817).
This commit is contained in:
@@ -710,12 +710,10 @@ use alloc::boxed::Box;
|
||||
|
||||
#[test_case]
|
||||
fn simple_allocation() {
|
||||
serial_print!("simple_allocation... ");
|
||||
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]");
|
||||
}
|
||||
```
|
||||
|
||||
@@ -730,14 +728,12 @@ use alloc::vec::Vec;
|
||||
|
||||
#[test_case]
|
||||
fn large_vec() {
|
||||
serial_print!("large_vec... ");
|
||||
let n = 1000;
|
||||
let mut vec = Vec::new();
|
||||
for i in 0..n {
|
||||
vec.push(i);
|
||||
}
|
||||
assert_eq!(vec.iter().sum::<u64>(), (n - 1) * n / 2);
|
||||
serial_println!("[ok]");
|
||||
}
|
||||
```
|
||||
|
||||
@@ -754,12 +750,10 @@ use blog_os::allocator::HEAP_SIZE;
|
||||
|
||||
#[test_case]
|
||||
fn many_boxes() {
|
||||
serial_print!("many_boxes... ");
|
||||
for i in 0..HEAP_SIZE {
|
||||
let x = Box::new(i);
|
||||
assert_eq!(*x, i);
|
||||
}
|
||||
serial_println!("[ok]");
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user