summaryrefslogtreecommitdiff
path: root/src/resources/animation.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-06-10 00:51:35 +0300
committerAndrei Karas <akaras@inbox.ru>2013-06-26 23:35:59 +0300
commit5fe07db8992b924069c4c358e557e88d2493f85f (patch)
tree8d959a23a5f8dde22e4f208d1bbf5665ee5068f7 /src/resources/animation.h
parent1cf2a378e64315d4ddf7e10f115e96d86365c3f8 (diff)
downloadplus-5fe07db8992b924069c4c358e557e88d2493f85f.tar.gz
plus-5fe07db8992b924069c4c358e557e88d2493f85f.tar.bz2
plus-5fe07db8992b924069c4c358e557e88d2493f85f.tar.xz
plus-5fe07db8992b924069c4c358e557e88d2493f85f.zip
add basic animation unit tests.
Diffstat (limited to 'src/resources/animation.h')
-rw-r--r--src/resources/animation.h13
1 files changed, 9 insertions, 4 deletions
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<Frame> 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<Frame> Frames;
- typedef Frames::iterator FramesIter;
- typedef Frames::reverse_iterator FramesRevIter;
-
Frames mFrames;
int mDuration;
};