mud/fluffos-2.23-ds03/testsuite/single/tests/efuns/present.c
2020-09-06 05:43:07 -07:00

22 lines
350 B
C

string id;
int id(string name) { return name == id; }
void create(string arg) {
#ifndef __NO_ENVIRONMENT__
id = arg;
if (!arg) {
new(__FILE__, "foo");
} else {
move_object(previous_object());
}
#endif
}
void do_tests() {
#ifndef __NO_ENVIRONMENT__
ASSERT(present("foo", this_object()));
ASSERT(present("foo"));
#endif
}