summaryrefslogtreecommitdiff
path: root/src/tests/test_sequence.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/test_sequence.cc')
-rw-r--r--src/tests/test_sequence.cc37
1 files changed, 22 insertions, 15 deletions
diff --git a/src/tests/test_sequence.cc b/src/tests/test_sequence.cc
index 363846b..6b04302 100644
--- a/src/tests/test_sequence.cc
+++ b/src/tests/test_sequence.cc
@@ -19,23 +19,26 @@ static WGPURenderPassEncoder dummy_render_pass_encoder =
// --- Dummy Effect for Tracking ---
class DummyEffect : public Effect {
-public:
+ public:
int init_calls = 0;
int start_calls = 0;
int render_calls = 0;
int end_calls = 0;
bool is_pp = false;
- DummyEffect(bool post_process = false) : is_pp(post_process) {}
+ DummyEffect(bool post_process = false) : is_pp(post_process) {
+ }
- void init(MainSequence *demo) override {
- init_calls++;
+ void init(MainSequence* demo) override {
+ ++init_calls;
(void)demo;
}
- void start() override { start_calls++; }
+ void start() override {
+ ++start_calls;
+ }
void render(WGPURenderPassEncoder pass, float time, float beat,
float intensity, float aspect_ratio) override {
- render_calls++;
+ ++render_calls;
(void)pass;
(void)time;
(void)beat;
@@ -50,13 +53,17 @@ public:
(void)intensity;
(void)aspect_ratio;
}
- void end() override { end_calls++; }
- bool is_post_process() const override { return is_pp; }
+ void end() override {
+ ++end_calls;
+ }
+ bool is_post_process() const override {
+ return is_pp;
+ }
};
// --- Dummy PostProcessEffect for Tracking (unused in simplified tests) ---
class DummyPostProcessEffect : public PostProcessEffect {
-public:
+ public:
int init_calls = 0;
int render_calls = 0;
int update_bind_group_calls = 0;
@@ -66,13 +73,13 @@ public:
(void)format;
}
- void init(MainSequence *demo) override {
- init_calls++;
+ void init(MainSequence* demo) override {
+ ++init_calls;
(void)demo;
}
void render(WGPURenderPassEncoder pass, float time, float beat,
float intensity, float aspect_ratio) override {
- render_calls++;
+ ++render_calls;
(void)pass;
(void)time;
(void)beat;
@@ -80,7 +87,7 @@ public:
(void)aspect_ratio;
}
void update_bind_group(WGPUTextureView input_view) override {
- update_bind_group_calls++;
+ ++update_bind_group_calls;
(void)input_view;
}
};
@@ -133,7 +140,7 @@ void test_effect_lifecycle() {
}
void test_simulate_until() {
-#ifndef STRIP_ALL
+#if !defined(STRIP_ALL)
printf(" test_simulate_until...\n");
MainSequence main_seq;
main_seq.init_test(dummy_device, dummy_queue, dummy_format);
@@ -158,7 +165,7 @@ void test_simulate_until() {
assert(effect1->end_calls == 1); // Should end
#else
printf(" test_simulate_until (skipped in STRIP_ALL build)...\n");
-#endif
+#endif /* !defined(STRIP_ALL) */
}
int main() {