src_legacy/2018/test/test_AnimationHandler.cpp
// separate next test not required, since we simply count steps for next
separate next test not required, since we simply count steps for next
separate next test not required since we simply count steps for next
TEST(AnimationHandler_tests, testFinished){
  ImageCache ic(3*N_FRAMES*N_PIXELS, MUTE);
  AnimationHandler aniHandler(ic);
  aniHandler.init(ANIMATIONTYPE_WORM, 20, 2, RED, 100);
  for (int i=0; i<19; i++) {
    aniHandler.next();
    EXPECT_EQ(aniHandler.__getCurrentLoop(), 0);
  }
  for (int i=0; i<19; i++) {
    aniHandler.next();
    EXPECT_EQ(aniHandler.__getCurrentLoop(), 1);
   }
  aniHandler.next();
  EXPECT_TRUE(aniHandler.isActive());
  aniHandler.next();
  EXPECT_FALSE(aniHandler.isActive());
}
TEST ( AnimationHandler_tests , testFinished ) { ImageCache ic ( 3 * N_FRAMES * N_PIXELS , MUTE ) ; AnimationHandler aniHandler ( ic ) ; aniHandler . init ( ANIMATIONTYPE_WORM , 20 , 2 , RED , 100 ) ; for ( int i = 0 ; i < 19 ; i ++ ) { aniHandler . next ( ) ; EXPECT_EQ ( aniHandler . __getCurrentLoop ( ) , 0 ) ; } for ( int i = 0 ; i < 19 ; i ++ ) { aniHandler . next ( ) ; EXPECT_EQ ( aniHandler . __getCurrentLoop ( ) , 1 ) ; } aniHandler . next ( ) ; EXPECT_TRUE ( aniHandler . isActive ( ) ) ; aniHandler . next ( ) ; EXPECT_FALSE ( aniHandler . isActive ( ) ) ; }
separate next test not required, since we simply count steps for next
separate next test not required since we simply count steps for next
// last step