MCPcopy Create free account
hub / github.com/arcjet/gravity / test_embedded_wasm

Function test_embedded_wasm

cmd/gravity/src/codegen/wasm.rs:79–88  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77
78 #[test]
79 fn test_embedded_wasm() {
80 let var = GoIdentifier::private("wasm");
81 let wasm = WasmData::Embedded("hello.wasm");
82 let mut tokens = Tokens::<Go>::new();
83 Wasm::new(&var, wasm).format_into(&mut tokens);
84 assert_eq!(
85 tokens.to_string().unwrap(),
86 "import _ \"embed\"\n\n//go:embed hello.wasm\nvar wasm []byte"
87 );
88 }
89}

Callers

nothing calls this directly

Calls 1

format_intoMethod · 0.45

Tested by

no test coverage detected