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

Function expectParsedProgram

src/preprocessor/preprocessor.test.ts:27–34  ·  view source on GitHub ↗
(sourceGlsl: string)

Source from the content-addressed store, hash-verified

25};
26
27const expectParsedProgram = (sourceGlsl: string) => {
28 const ast = parse(sourceGlsl);
29 const glsl = generate(ast);
30 if (glsl !== sourceGlsl) {
31 debugAst(ast);
32 expect(glsl).toBe(sourceGlsl);
33 }
34};
35
36// test('pre test file', () => {
37// expectParsedProgram(fileContents('./preprocess-test-grammar.glsl'));

Callers 1

Calls 2

parseFunction · 0.85
debugAstFunction · 0.85

Tested by

no test coverage detected