present.c

v22.2b14/testsuite/single/tests/efuns/present.c · 350 B

From the archive beta.tar.gz

Download the archive   « Back to the archive contents

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
}

Site Stats

Snippets: 1791
Codebases: 571