From a0ca97385dea86f037073a7fd131bc7bf6679b34 Mon Sep 17 00:00:00 2001 From: Andrew Ray Date: Sun, 28 Jul 2024 15:36:29 -1000 Subject: [PATCH] generic name of macro in test --- src/preprocessor/preprocessor.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/preprocessor/preprocessor.test.ts b/src/preprocessor/preprocessor.test.ts index 0ddc16a..8e74dbb 100644 --- a/src/preprocessor/preprocessor.test.ts +++ b/src/preprocessor/preprocessor.test.ts @@ -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;