// TestCountLoop checks that that it loops a certain number of times
// before returning an animation completion error.
TestCountLoop checks that that it loops a certain number of times
before returning an animation completion error.
// TestCountLoop checks that that it loops a certain number of times // before returning an animation completion error .
func TestCountLoop(t *testing.T) {
	var l looper = &countLoop{5}
	for i := 0; i <= 4; i++ {
		if err := l.nextLoop(); err != nil {
			t.Fatalf(`err = %v, want nil`, err)
		}
	}
	if err := l.nextLoop(); err != ErrAnimationComplete {
		t.Fatalf(`err = %v, want %v`, err, ErrAnimationComplete)
	}
}
func TestCountLoop ( t * testing . T ) { var l looper = & countLoop { 5 } for i := 0 ; i <= 4 ; i ++ { if err := l . nextLoop ( ) ; err != nil { t . Fatalf ( `err = %v, want nil` , err ) } } if err := l . nextLoop ( ) ; err != ErrAnimationComplete { t . Fatalf ( `err = %v, want %v` , err , ErrAnimationComplete ) } }
TestCountLoop checks that that it loops a certain number of times
before returning an animation completion error.
TestCountLoop checks that that it loops a certain number of times before returning an animation completion error .