MCPcopy Index your code
hub / github.com/EngoEngine/engo / TestAnimationComponentAddDefaultAnimation

Function TestAnimationComponentAddDefaultAnimation

common/animation_test.go:117–132  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

115}
116
117func TestAnimationComponentAddDefaultAnimation(t *testing.T) {
118 drawables := []Drawable{
119 &TestDrawable{0},
120 &TestDrawable{1},
121 &TestDrawable{2},
122 }
123 ac := NewAnimationComponent(drawables, 0.1)
124 def := &Animation{
125 Name: "default",
126 Frames: []int{0, 1, 2},
127 }
128 ac.AddDefaultAnimation(def)
129 if ac.def.Name != def.Name {
130 t.Error("Default animation was not set by AddDefaultAnimation")
131 }
132}
133
134func TestAnimationComponentIntegration(t *testing.T) {
135 drawables := []Drawable{

Callers

nothing calls this directly

Calls 3

AddDefaultAnimationMethod · 0.95
NewAnimationComponentFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected