Skip to content

Commit

Permalink
generic name of macro in test
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewRayCode committed Jul 29, 2024
1 parent 9ce4b36 commit a0ca973
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/preprocessor/preprocessor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,17 +335,17 @@ foo`);

test(`function macro where source variable is same as macro argument`, () => {
const program = `
#define GE(x, y) x + y
GE(y, x);
GE(y.y, x.x);
GE(yy, xx);
#define FN(x, y) x + y
FN(y, x);
FN(y.y, x.x);
FN(yy, xx);
`;

const ast = parse(program);
preprocessAst(ast);

// Ensure that if the argument passed to the fn GE(X) has the
// same name as the macro definition #define GE(X), it doesn't get expanded
// Ensure that if the argument passed to the fn FN(X) has the
// same name as the macro definition #define FN(X), it doesn't get expanded
// https://github.com/ShaderFrog/glsl-parser/issues/31
expect(generate(ast)).toBe(`
y + x;
Expand Down

0 comments on commit a0ca973

Please sign in to comment.