diff options
Diffstat (limited to 'src/tests/test_shader_composer.cc')
| -rw-r--r-- | src/tests/test_shader_composer.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/tests/test_shader_composer.cc b/src/tests/test_shader_composer.cc index 1dd8298..a98a259 100644 --- a/src/tests/test_shader_composer.cc +++ b/src/tests/test_shader_composer.cc @@ -81,7 +81,9 @@ void test_recursive_composition() { sc.RegisterSnippet("base", "fn base() {}"); sc.RegisterSnippet("mid", "#include \"base\"\nfn mid() { base(); }"); - sc.RegisterSnippet("top", "#include \"mid\"\n#include \"base\"\nfn top() { mid(); base(); }"); + sc.RegisterSnippet( + "top", + "#include \"mid\"\n#include \"base\"\nfn top() { mid(); base(); }"); std::string main_code = "#include \"top\"\nfn main() { top(); }"; std::string result = sc.Compose({}, main_code); @@ -106,11 +108,15 @@ void test_renderer_composition() { std::cout << "Testing Renderer Shader Composition..." << std::endl; auto& sc = ShaderComposer::Get(); - sc.RegisterSnippet("common_uniforms", "struct GlobalUniforms { view_proj: mat4x4<f32> };"); + sc.RegisterSnippet("common_uniforms", + "struct GlobalUniforms { view_proj: mat4x4<f32> };"); sc.RegisterSnippet("math/sdf_shapes", "fn sdSphere() {}"); - sc.RegisterSnippet("render/scene_query", "#include \"math/sdf_shapes\"\nfn map_scene() {}"); + sc.RegisterSnippet("render/scene_query", + "#include \"math/sdf_shapes\"\nfn map_scene() {}"); - std::string main_code = "#include \"common_uniforms\"\n#include \"render/scene_query\"\nfn main() {}"; + std::string main_code = + "#include \"common_uniforms\"\n#include \"render/scene_query\"\nfn " + "main() {}"; std::string result = sc.Compose({}, main_code); assert(result.find("struct GlobalUniforms") != std::string::npos); |
