Fix wiggle tests
This commit is contained in:
committed by
Andrew Brown
parent
df9c725fa0
commit
fa98f0bc91
@@ -12,7 +12,7 @@ impl_errno!(types::Errno, types::GuestErrorConversion);
|
||||
|
||||
impl<'a> ints::Ints for WasiCtx<'a> {
|
||||
fn cookie_cutter(&self, init_cookie: types::Cookie) -> Result<types::Bool, types::Errno> {
|
||||
let res = if init_cookie == types::Cookie::START {
|
||||
let res = if init_cookie == types::COOKIE_START {
|
||||
types::Bool::True
|
||||
} else {
|
||||
types::Bool::False
|
||||
@@ -50,10 +50,10 @@ impl CookieCutterExercise {
|
||||
let res = ints::cookie_cutter(
|
||||
&ctx,
|
||||
&host_memory,
|
||||
self.cookie.into(),
|
||||
self.cookie as i64,
|
||||
self.return_ptr_loc.ptr as i32,
|
||||
);
|
||||
assert_eq!(res, Ok(types::Errno::Ok.into()), "cookie cutter errno");
|
||||
assert_eq!(res, Ok(types::Errno::Ok as i32), "cookie cutter errno");
|
||||
|
||||
let is_cookie_start = host_memory
|
||||
.ptr::<types::Bool>(self.return_ptr_loc.ptr)
|
||||
@@ -66,7 +66,7 @@ impl CookieCutterExercise {
|
||||
} else {
|
||||
false
|
||||
},
|
||||
self.cookie == types::Cookie::START,
|
||||
self.cookie == types::COOKIE_START,
|
||||
"returned Bool should test if input was Cookie::START",
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user