function_exists.c

ds2.10/fluffos-2.16-ds05/testsuite/single/tests/efuns/function_exists.c · 467 B

From the archive ds2.10.zip

Download the archive   « Back to the archive contents

#ifndef __SENSIBLE_MODIFIERS__
static
#else
protected
#endif
int stat() {
}

private int priv() {
}

void do_tests() {
    ASSERT(function_exists("stat", this_object(), 1));
    ASSERT(function_exists("priv", this_object(), 1));

    ASSERT(!function_exists("stat", this_object()));
    ASSERT(!function_exists("priv", this_object()));

    ASSERT(!function_exists("bar", this_object()));
    ASSERT(function_exists("do_tests", this_object()) + ".c" == __FILE__);
}

Site Stats

Snippets: 1791
Codebases: 571