From 5fe07db8992b924069c4c358e557e88d2493f85f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 10 Jun 2013 00:51:35 +0300 Subject: add basic animation unit tests. --- src/resources/animation.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/resources/animation.h') diff --git a/src/resources/animation.h b/src/resources/animation.h index 09738620c..9851e1c24 100644 --- a/src/resources/animation.h +++ b/src/resources/animation.h @@ -95,16 +95,21 @@ class Animation final void setLastFrameDelay(const int delay); + typedef std::vector Frames; + typedef Frames::iterator FramesIter; + typedef Frames::reverse_iterator FramesRevIter; + +#ifdef UNITTESTS + Frames &getFrames() + { return mFrames; } +#endif + /** * Determines whether the given animation frame is a terminator. */ static bool isTerminator(const Frame &phase) A_WARN_UNUSED; protected: - typedef std::vector Frames; - typedef Frames::iterator FramesIter; - typedef Frames::reverse_iterator FramesRevIter; - Frames mFrames; int mDuration; }; -- cgit v1.2.3-70-g09d2