MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / include_guard

Function include_guard

native/shared/src/renderer/shader_include.rs:155–164  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

153
154 #[test]
155 fn include_guard() {
156 // Same header included twice should appear once.
157 let src = table(&[
158 ("a.wgsl", "#include \"h.wgsl\"\n#include \"h.wgsl\"\nmain\n"),
159 ("h.wgsl", "HEADER_BODY\n"),
160 ]);
161 let out = process(&src, "a.wgsl").unwrap();
162 let count = out.matches("HEADER_BODY").count();
163 assert_eq!(count, 1);
164 }
165
166 #[test]
167 fn missing_is_error() {

Callers

nothing calls this directly

Calls 3

tableFunction · 0.85
processFunction · 0.85
countMethod · 0.45

Tested by

no test coverage detected