MCPcopy Create free account
hub / github.com/bytecodealliance/wit-bindgen / if_else

Function if_else

crates/core/src/source.rs:202–210  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

200
201 #[test]
202 fn if_else() {
203 let mut s = Source::default();
204 s.push_str("if() {\n");
205 s.push_str("y\n");
206 s.push_str("} else if () {\n");
207 s.push_str("z\n");
208 s.push_str("}\n");
209 assert_eq!(s.s, "if() {\n y\n} else if () {\n z\n}\n");
210 }
211
212 #[test]
213 fn trim_ws() {

Callers

nothing calls this directly

Calls 1

push_strMethod · 0.45

Tested by

no test coverage detected