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

Function test_generate_write_string

cmd/gravity/src/codegen/factory.rs:184–203  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

182
183 #[test]
184 fn test_generate_write_string() {
185 let analyzed_imports = &AnalyzedImports {
186 interfaces: vec![],
187 standalone_types: vec![],
188 standalone_functions: vec![],
189 factory_name: GoIdentifier::public("test-factory"),
190 instance_name: GoIdentifier::public("test-instance"),
191 constructor_name: GoIdentifier::public("test-constructor"),
192 };
193 let config = FactoryConfig {
194 analyzed_imports,
195 import_chains: Default::default(),
196 wasm_var_name: &GoIdentifier::public("test-wasm"),
197 };
198 let generator = FactoryGenerator::new(config);
199 let mut tokens = Tokens::new();
200 generator.generate_write_string(&mut tokens);
201
202 assert!(tokens.to_string().unwrap().contains("func writeString"));
203 }
204}

Callers

nothing calls this directly

Calls 1

generate_write_stringMethod · 0.80

Tested by

no test coverage detected