diff --git a/tests/test_backend/test_directx/test_preprocessor.py b/tests/test_backend/test_directx/test_preprocessor.py index 59270380..5ff2afba 100644 --- a/tests/test_backend/test_directx/test_preprocessor.py +++ b/tests/test_backend/test_directx/test_preprocessor.py @@ -3,10 +3,12 @@ from DirectxParser import HLSLParser from DirectxCrossGLCodeGen import HLSLToCrossGLConverter + @pytest.fixture def converter(): return HLSLToCrossGLConverter() + def test_include_directive(converter): shader_code = '#include "common.hlsl"\nfloat4 main() : SV_Target { return 0; }' expected_output = ( @@ -17,8 +19,7 @@ def test_include_directive(converter): parser = HLSLParser(tokens) ast = parser.parse() output = converter.convert(ast) - + # Check if the included file path is part of the output assert "// Included file: common.hlsl" in output # Additional assertions can be added here to verify the correctness of the output -