present.c

ds2.10/fluffos-2.16-ds05/testsuite/single/tests/efuns/present.c · 364 B

From the archive ds2.10.zip

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