MCPcopy Create free account
hub / github.com/EngoEngine/ecs / TestCreateEntity

Function TestCreateEntity

entity_test.go:188–196  ·  view source on GitHub ↗

TestCreateEntity ensures IDs which are created, are unique

(t *testing.T)

Source from the content-addressed store, hash-verified

186
187// TestCreateEntity ensures IDs which are created, are unique
188func TestCreateEntity(t *testing.T) {
189 e1 := MyEntity1{}
190 e1.BasicEntity = NewBasic()
191
192 e2 := MyEntity1{}
193 e2.BasicEntity = NewBasic()
194
195 assert.NotEqual(t, e1.id, e2.id, "BasicEntity IDs should be unique")
196}
197
198// TestChangeableComponents ensures that Components which are being referenced, are changeable
199func TestChangeableComponents(t *testing.T) {

Callers

nothing calls this directly

Calls 1

NewBasicFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…