Fix unused imports in oracles
This commit is contained in:
@@ -12,8 +12,7 @@
|
||||
|
||||
pub mod dummy;
|
||||
|
||||
use dummy::{dummy_imports, dummy_values};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use dummy::dummy_imports;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering::SeqCst};
|
||||
use wasmtime::*;
|
||||
|
||||
@@ -114,6 +113,8 @@ pub fn differential_execution(
|
||||
ttf: &crate::generators::WasmOptTtf,
|
||||
configs: &[crate::generators::DifferentialConfig],
|
||||
) {
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
||||
crate::init_fuzzing();
|
||||
|
||||
// We need at least two configs.
|
||||
@@ -205,7 +206,7 @@ pub fn differential_execution(
|
||||
};
|
||||
|
||||
let ty = f.ty();
|
||||
let params = match dummy_values(ty.params()) {
|
||||
let params = match dummy::dummy_values(ty.params()) {
|
||||
Ok(p) => p,
|
||||
Err(_) => continue,
|
||||
};
|
||||
@@ -217,7 +218,6 @@ pub fn differential_execution(
|
||||
assert_same_export_func_result(&existing_result, &this_result, name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn init_hang_limit(instance: &Instance) {
|
||||
match instance.get_export("hangLimitInitializer") {
|
||||
@@ -282,11 +282,13 @@ fn assert_same_export_func_result(
|
||||
_ => fail(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Invoke the given API calls.
|
||||
#[cfg(feature = "binaryen")]
|
||||
pub fn make_api_calls(api: crate::generators::api::ApiCalls) {
|
||||
use crate::generators::api::ApiCall;
|
||||
use std::collections::HashMap;
|
||||
|
||||
crate::init_fuzzing();
|
||||
|
||||
@@ -401,7 +403,7 @@ pub fn make_api_calls(api: crate::generators::api::ApiCalls) {
|
||||
let nth = nth % funcs.len();
|
||||
let f = &funcs[nth];
|
||||
let ty = f.ty();
|
||||
let params = match dummy_values(ty.params()) {
|
||||
let params = match dummy::dummy_values(ty.params()) {
|
||||
Ok(p) => p,
|
||||
Err(_) => continue,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user