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/animatedsprite.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/animatedsprite.h') diff --git a/src/animatedsprite.h b/src/animatedsprite.h index 5a7dbde56..60df2f6e4 100644 --- a/src/animatedsprite.h +++ b/src/animatedsprite.h @@ -107,6 +107,23 @@ class AnimatedSprite final : public Sprite static void setEnableCache(const bool b) { mEnableCache = b; } +#ifdef UNITTESTS + SpriteDef *getSprite() + { return mSprite; } + + Frame *getFrame() + { return mFrame; } + + Animation *getAnimation() + { return mAnimation; } + + unsigned int getFrameIndex() + { return mFrameIndex; } + + unsigned int getFrameTime() + { return mFrameTime; } +#endif + private: bool updateCurrentAnimation(const unsigned int dt); -- cgit v1.2.3-70-g09d2