WIP
This commit is contained in:
@@ -33,10 +33,6 @@ unsafe fn test_timeout() {
|
||||
}];
|
||||
let out = poll_oneoff_impl(&r#in, 1);
|
||||
let event = &out[0];
|
||||
assert_eq!(
|
||||
event.userdata, CLOCK_ID,
|
||||
"the event.userdata should contain clock_id specified by the user"
|
||||
);
|
||||
assert_eq!(
|
||||
event.error,
|
||||
wasi::ERRNO_SUCCESS,
|
||||
@@ -47,6 +43,10 @@ unsafe fn test_timeout() {
|
||||
wasi::EVENTTYPE_CLOCK,
|
||||
"the event.type should equal clock"
|
||||
);
|
||||
assert_eq!(
|
||||
event.userdata, CLOCK_ID,
|
||||
"the event.userdata should contain clock_id specified by the user"
|
||||
);
|
||||
}
|
||||
|
||||
unsafe fn test_stdin_read() {
|
||||
@@ -71,18 +71,9 @@ unsafe fn test_stdin_read() {
|
||||
r#type: wasi::EVENTTYPE_FD_READ,
|
||||
u: wasi::SubscriptionU { fd_readwrite },
|
||||
},
|
||||
wasi::Subscription {
|
||||
userdata: 42,
|
||||
r#type: wasi::EVENTTYPE_FD_READ,
|
||||
u: wasi::SubscriptionU { fd_readwrite },
|
||||
},
|
||||
];
|
||||
let out = poll_oneoff_impl(&r#in, 1);
|
||||
let event = &out[0];
|
||||
assert_eq!(
|
||||
event.userdata, CLOCK_ID,
|
||||
"the event.userdata should contain clock_id specified by the user"
|
||||
);
|
||||
assert_eq!(
|
||||
event.error,
|
||||
wasi::ERRNO_SUCCESS,
|
||||
@@ -93,6 +84,10 @@ unsafe fn test_stdin_read() {
|
||||
wasi::EVENTTYPE_CLOCK,
|
||||
"the event.type should equal clock"
|
||||
);
|
||||
assert_eq!(
|
||||
event.userdata, CLOCK_ID,
|
||||
"the event.userdata should contain clock_id specified by the user"
|
||||
);
|
||||
}
|
||||
|
||||
unsafe fn test_stdout_stderr_write() {
|
||||
|
||||
Reference in New Issue
Block a user