Skip to content

Commit

Permalink
Fixes tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ultimaweapon committed Dec 28, 2024
1 parent a42d2b9 commit 52c936a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
6 changes: 2 additions & 4 deletions src/console.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ use core::fmt::Write;
#[macro_export]
macro_rules! println {
($($args:tt)*) => {{
use $crate::SystemTable;
use ::core::fmt::Write;

let mut dev = SystemTable::current().stdout();
let mut dev = $crate::system_table().stdout();

dev.write_fmt(::core::format_args!($($args)*)).unwrap();
dev.write_eol().unwrap();
Expand All @@ -21,10 +20,9 @@ macro_rules! println {
#[macro_export]
macro_rules! eprintln {
($($args:tt)*) => {{
use $crate::SystemTable;
use ::core::fmt::Write;

let mut dev = SystemTable::current().stderr();
let mut dev = $crate::system_table().stderr();

dev.write_fmt(::core::format_args!($($args)*)).unwrap();
dev.write_eol().unwrap();
Expand Down
8 changes: 4 additions & 4 deletions tests/filesystem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use zfi_testing::qemu;
#[test]
#[qemu]
fn file_info() {
use zfi::{FileAttributes, FileModes, Image};
use zfi::{current_image, FileAttributes, FileModes};

let image = Image::current().proto();
let image = current_image().proto();
let fs = image.device().file_system().unwrap();
let root = fs.open().unwrap();
let file = root
Expand All @@ -25,9 +25,9 @@ fn file_info() {
#[test]
#[qemu]
fn create() {
use zfi::{str, FileAttributes, Image};
use zfi::{current_image, str, FileAttributes};

let image = Image::current().proto();
let image = current_image().proto();
let fs = image.device().file_system().unwrap();
let root = fs.open().unwrap();

Expand Down
4 changes: 2 additions & 2 deletions tests/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use zfi_testing::qemu;
#[test]
#[qemu]
fn proto() {
use zfi::{str, Image, PathBuf};
use zfi::{current_image, str, PathBuf};

let proto = Image::current().proto();
let proto = current_image().proto();
let mut path = PathBuf::new();

path.push_media_file_path(if cfg!(target_arch = "x86_64") {
Expand Down

0 comments on commit 52c936a

Please sign in to comment.