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

Function if_else

crates/wit-bindgen/src/source.rs:110–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

108
109 #[test]
110 fn if_else() {
111 let mut s = Source::default();
112 s.push_str("if() {\n");
113 s.push_str("y\n");
114 s.push_str("} else if () {\n");
115 s.push_str("z\n");
116 s.push_str("}\n");
117 assert_eq!(s.s, "if() {\n y\n} else if () {\n z\n}\n");
118 }
119
120 #[test]
121 fn trim_ws() {

Callers

nothing calls this directly

Calls 1

push_strMethod · 0.45

Tested by

no test coverage detected