MCPcopy Create free account
hub / github.com/ShaderFrog/glsl-parser / expectParsedProgram

Function expectParsedProgram

src/parser/test-helpers.ts:155–165  ·  view source on GitHub ↗
({ parseSrc }: Context)

Source from the content-addressed store, hash-verified

153};
154
155const expectParsedProgram = ({ parseSrc }: Context) => (
156 src: string,
157 options?: ParserOptions
158) => {
159 const ast = parseSrc(src, options);
160 const glsl = generate(ast);
161 if (glsl !== src) {
162 inspect(ast);
163 expect(glsl).toBe(src);
164 }
165};

Callers 1

buildParserFunction · 0.70

Calls 2

parseSrcFunction · 0.85
inspectFunction · 0.85

Tested by

no test coverage detected