#include #include #include int main() { MtState *state = mt_initialize("Internal 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\nERROR!", (void *) entity, (void *) looked_up_entity); mt_drop(entity); mt_cleanup(state); return -1; } puts("The entity which was looked up from the identifier does match the original. SUCCESS!"); mt_drop(entity); mt_cleanup(state); return 0; }