MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / generate_static_api_tests

Function generate_static_api_tests

fuzz/build.rs:23–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21 use wasmtime_test_util::component_fuzz::{Declarations, MAX_TYPE_DEPTH, TestCase, Type};
22
23 pub fn generate_static_api_tests() -> Result<()> {
24 println!("cargo:rerun-if-changed=build.rs");
25 let out_dir = PathBuf::from(
26 env::var_os("OUT_DIR").expect("The OUT_DIR environment variable must be set"),
27 );
28
29 let mut out = String::new();
30 write_static_api_tests(&mut out)?;
31
32 let output = out_dir.join("static_component_api.rs");
33 fs::write(&output, out)?;
34
35 drop(Command::new("rustfmt").arg(&output).status());
36
37 Ok(())
38 }
39
40 fn write_static_api_tests(out: &mut String) -> Result<()> {
41 println!("cargo:rerun-if-env-changed=WASMTIME_FUZZ_SEED");

Callers 1

mainFunction · 0.85

Calls 10

fromFunction · 0.85
write_static_api_testsFunction · 0.85
OkFunction · 0.85
statusMethod · 0.80
newFunction · 0.50
writeFunction · 0.50
dropFunction · 0.50
expectMethod · 0.45
joinMethod · 0.45
argMethod · 0.45

Tested by

no test coverage detected