Skip to content

Commit

Permalink
Updating tests to match the new name for ModuleHash::sha256()
Browse files Browse the repository at this point in the history
Michael-F-Bryan committed Jan 5, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 4ce8a54 commit 3517716
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/tasks/post_message_payload.rs
Original file line number Diff line number Diff line change
@@ -161,12 +161,9 @@ impl PostMessagePayload {

#[cfg(test)]
mod tests {
use std::{
num::NonZeroUsize,
sync::{
atomic::{AtomicBool, Ordering},
Arc,
},
use std::sync::{
atomic::{AtomicBool, Ordering},
Arc,
};

use futures::channel::oneshot;
@@ -279,7 +276,7 @@ mod tests {
let engine = wasmer::Engine::default();
let module = wasmer::Module::new(&engine, wasm).unwrap();
let msg = PostMessagePayload::Notification(Notification::CacheModule {
hash: ModuleHash::sha256(wasm),
hash: ModuleHash::hash(wasm),
module: module.into(),
});

@@ -288,7 +285,7 @@ mod tests {

match round_tripped {
PostMessagePayload::Notification(Notification::CacheModule { hash, module: _ }) => {
assert_eq!(hash, ModuleHash::sha256(wasm));
assert_eq!(hash, ModuleHash::hash(wasm));
}
_ => unreachable!(),
};

0 comments on commit 3517716

Please sign in to comment.