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

Function TestIdentifierInterface

entity_test.go:244–252  ·  view source on GitHub ↗

TestIdentifierInterface makes sure that my entity can be stored as an Identifier interface

(t *testing.T)

Source from the content-addressed store, hash-verified

242
243// TestIdentifierInterface makes sure that my entity can be stored as an Identifier interface
244func TestIdentifierInterface(t *testing.T) {
245 e1 := MyEntity1{}
246 e1.BasicEntity = NewBasic()
247
248 var slice []Identifier = []Identifier{e1}
249
250 _, ok := slice[0].(MyEntity1)
251 assert.True(t, ok, "MyEntity1 should have been recoverable from the Identifier interface")
252}
253
254func TestSortableIdentifierSlice(t *testing.T) {
255 e1 := MyEntity1{}

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…