19 lines
589 B
C
19 lines
589 B
C
|
#include <state.h>
|
||
|
#include <entity.h>
|
||
|
|
||
|
#include <stdio.h>
|
||
|
|
||
|
int main(int argc, char **argv)
|
||
|
{
|
||
|
MtState *state = mt_initialize("Interface Test");;
|
||
|
MtEntity *entity = mt_summon(state);
|
||
|
MtEntity *looked_up_entity = mt_get_entity(state, entity->identifier);
|
||
|
|
||
|
if(entity != looked_up_entity)
|
||
|
printf("Failed looking up entity; the pointers don't match:\nOriginal: %p\nLooked Up: %p\n", entity, looked_up_entity);
|
||
|
else
|
||
|
puts("The entity which was looked up from the identifier does match the original. SUCCESS!");
|
||
|
|
||
|
mt_drop(entity);
|
||
|
mt_cleanup(state);
|
||
|
}
|