mirror of
https://github.com/hexagonal-sun/moss-kernel.git
synced 2026-04-19 14:49:15 -04:00
formatting
This commit is contained in:
@@ -590,8 +590,11 @@ fn test_rust_file() {
|
||||
fs::hard_link(path, "/tmp/rust_fs_test_link.txt").expect("Failed to create hard link");
|
||||
let metadata = fs::metadata(path).expect("Failed to get metadata");
|
||||
assert_eq!(metadata.len(), 12);
|
||||
fs::rename("/tmp/rust_fs_test_link.txt", "/tmp/rust_fs_test_renamed.txt")
|
||||
.expect("Failed to rename file");
|
||||
fs::rename(
|
||||
"/tmp/rust_fs_test_link.txt",
|
||||
"/tmp/rust_fs_test_renamed.txt",
|
||||
)
|
||||
.expect("Failed to rename file");
|
||||
fs::remove_file("/tmp/rust_fs_test_renamed.txt").expect("Failed to delete renamed file");
|
||||
fs::remove_file(path).expect("Failed to delete file");
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use colored::Colorize;
|
||||
use std::{
|
||||
io::{Write, stdout},
|
||||
sync::{Arc, Barrier, Mutex},
|
||||
thread,
|
||||
};
|
||||
use colored::Colorize;
|
||||
|
||||
mod fs;
|
||||
mod futex;
|
||||
@@ -21,7 +21,7 @@ macro_rules! register_test {
|
||||
($name:ident) => {
|
||||
// Add to inventory
|
||||
inventory::submit! {
|
||||
crate::Test {
|
||||
$crate::Test {
|
||||
test_text: concat!(module_path!(), "::", stringify!($name)),
|
||||
test_fn: $name,
|
||||
}
|
||||
@@ -30,7 +30,7 @@ macro_rules! register_test {
|
||||
($name:ident, $text:expr) => {
|
||||
// Add to inventory
|
||||
inventory::submit! {
|
||||
crate::Test {
|
||||
$crate::Test {
|
||||
test_text: $text,
|
||||
test_fn: $name,
|
||||
}
|
||||
@@ -246,7 +246,10 @@ fn main() {
|
||||
}
|
||||
let end = std::time::Instant::now();
|
||||
if failures > 0 {
|
||||
eprintln!("{failures} tests failed in {} ms", (end - start).as_millis());
|
||||
eprintln!(
|
||||
"{failures} tests failed in {} ms",
|
||||
(end - start).as_millis()
|
||||
);
|
||||
std::process::exit(1);
|
||||
}
|
||||
println!("All tests passed in {} ms", (end - start).as_millis());
|
||||
|
||||
Reference in New Issue
Block a user