From c9195f997f3e797f03ab90464e4158717198a167 Mon Sep 17 00:00:00 2001 From: skal Date: Sun, 8 Feb 2026 07:40:29 +0100 Subject: style: Apply clang-format to all source files --- src/tests/test_effect_base.cc | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'src/tests/test_effect_base.cc') diff --git a/src/tests/test_effect_base.cc b/src/tests/test_effect_base.cc index 8180535..5dc2dcc 100644 --- a/src/tests/test_effect_base.cc +++ b/src/tests/test_effect_base.cc @@ -3,10 +3,10 @@ // Verifies effect initialization, activation, and basic rendering. #include "effect_test_helpers.h" -#include "offscreen_render_target.h" -#include "webgpu_test_fixture.h" #include "gpu/demo_effects.h" #include "gpu/effect.h" +#include "offscreen_render_target.h" +#include "webgpu_test_fixture.h" #include #include #include @@ -72,8 +72,7 @@ static void test_effect_construction() { } // Create FlashEffect (simple post-process effect) - auto effect = std::make_shared( - fixture.ctx()); + auto effect = std::make_shared(fixture.ctx()); assert(!effect->is_initialized && "Effect should not be initialized yet"); @@ -95,8 +94,7 @@ static void test_effect_initialization() { main_seq.init_test(fixture.ctx()); // Create FlashEffect - auto effect = std::make_shared( - fixture.ctx()); + auto effect = std::make_shared(fixture.ctx()); assert(!effect->is_initialized && "Effect should not be initialized yet"); @@ -107,7 +105,8 @@ static void test_effect_initialization() { // Initialize sequence (this sets effect->is_initialized) seq->init(&main_seq); - assert(effect->is_initialized && "Effect should be initialized after Sequence::init()"); + assert(effect->is_initialized && + "Effect should be initialized after Sequence::init()"); fprintf(stdout, " ✓ FlashEffect initialized via Sequence::init()\n"); } @@ -129,10 +128,10 @@ static void test_sequence_add_effect() { auto seq = std::make_shared(); // Create effect - auto effect = std::make_shared( - fixture.ctx()); + auto effect = std::make_shared(fixture.ctx()); - assert(!effect->is_initialized && "Effect should not be initialized before Sequence::init()"); + assert(!effect->is_initialized && + "Effect should not be initialized before Sequence::init()"); // Add effect to sequence (time range: 0.0 - 10.0, priority 0) seq->add_effect(effect, 0.0f, 10.0f, 0); @@ -140,9 +139,12 @@ static void test_sequence_add_effect() { // Initialize sequence (this should initialize the effect) seq->init(&main_seq); - assert(effect->is_initialized && "Effect should be initialized after Sequence::init()"); + assert(effect->is_initialized && + "Effect should be initialized after Sequence::init()"); - fprintf(stdout, " ✓ Effect added to sequence and initialized (time=0.0-10.0, priority=0)\n"); + fprintf(stdout, + " ✓ Effect added to sequence and initialized (time=0.0-10.0, " + "priority=0)\n"); } // Test 6: Sequence activation logic @@ -159,8 +161,7 @@ static void test_sequence_activation() { main_seq.init_test(fixture.ctx()); auto seq = std::make_shared(); - auto effect = std::make_shared( - fixture.ctx()); + auto effect = std::make_shared(fixture.ctx()); // Effect active from 5.0 to 10.0 seconds seq->add_effect(effect, 5.0f, 10.0f, 0); @@ -213,7 +214,7 @@ static void test_pixel_helpers() { "Black frame should have no content"); std::vector colored_frame(256 * 256 * 4, 0); - colored_frame[0] = 255; // Set one red pixel + colored_frame[0] = 255; // Set one red pixel assert(has_rendered_content(colored_frame, 256, 256) && "Colored frame should have content"); @@ -222,7 +223,7 @@ static void test_pixel_helpers() { // Test all_pixels_match_color std::vector red_frame(256 * 256 * 4, 0); for (size_t i = 0; i < 256 * 256; ++i) { - red_frame[i * 4 + 2] = 255; // BGRA: Red in position 2 + red_frame[i * 4 + 2] = 255; // BGRA: Red in position 2 } assert(all_pixels_match_color(red_frame, 256, 256, 255, 0, 0, 5) && "Red frame should match red color"); -- cgit v1.2.3