From eb3d8f05e57918b557a47e3511f05ba1c5a40683 Mon Sep 17 00:00:00 2001 From: obligaron Date: Sat, 17 Apr 2021 06:36:51 +0200 Subject: [PATCH] add more comments to unittest --- test/animationinformation_test.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/animationinformation_test.cpp b/test/animationinformation_test.cpp index 94472d386..6bbae0d55 100644 --- a/test/animationinformation_test.cpp +++ b/test/animationinformation_test.cpp @@ -32,7 +32,9 @@ struct GameTickData : TestData { * This happens directly after the game_logic (_fProgressToNextGameTick = 0) or if no GameTick is due between two GameTicks (_fProgressToNextGameTick != 0). */ struct RenderingData : TestData { - + /* + * @brief the progress as a fraction (0.0f to 1.0f) in time to the next game tick + */ float _fProgressToNextGameTick; int _ExpectedRenderingFrame; RenderingData(float fProgressToNextGameTick, int expectedRenderingFrame) @@ -42,6 +44,12 @@ struct RenderingData : TestData { } }; +/* +* @brief +* This UnitTest tries to simulate the GameLoop (GameTickData) and the Rendering that can happen (RenderingData). +* Rendering can happen more often then GameTicks and at any time between two GameTicks. +* The Animation Distribution Logic must adjust to the Rendering that happens at any give point in time. +*/ void RunAnimationTest(int numFrames, int delay, AnimationFlags flags, int numSkippedFrames, int distributeFramesBeforeFrame, const std::vector &vecTestData) { const int pnum = 0;