convert all errno assertions to assert_errno!
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
use std::{env, process};
|
||||
use wasi_tests::{create_file, open_scratch_directory};
|
||||
use wasi_tests::{assert_errno, create_file, open_scratch_directory};
|
||||
|
||||
unsafe fn test_path_open_create_existing(dir_fd: wasi::Fd) {
|
||||
create_file(dir_fd, "file");
|
||||
assert_eq!(
|
||||
assert_errno!(
|
||||
wasi::path_open(
|
||||
dir_fd,
|
||||
0,
|
||||
@@ -16,7 +16,6 @@ unsafe fn test_path_open_create_existing(dir_fd: wasi::Fd) {
|
||||
.expect_err("trying to create a file that already exists")
|
||||
.raw_error(),
|
||||
wasi::ERRNO_EXIST,
|
||||
"errno should be ERRNO_EXIST"
|
||||
);
|
||||
wasi::path_unlink_file(dir_fd, "file").expect("removing a file");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user