function_exists.c

v22.2b14/testsuite/single/tests/efuns/function_exists.c · 472 B

From the archive beta.tar.gz

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