member_array.c

v22.2b14/testsuite/single/tests/efuns/member_array.c · 307 B

From the archive beta.tar.gz

Download the archive   « Back to the archive contents

void do_tests() {
    ASSERT(member_array('c', "foo") == -1);
    ASSERT(member_array('b', "abar") == 1);
    ASSERT(member_array('y', "xyzzy") == 1);
    ASSERT(member_array('y', "xyzzy", 2) == 4);
    ASSERT(member_array(2, ({ 1, 2, 3 })) == 1);
    ASSERT(member_array("foo", ({ 1, "foo", 3 })) == 1);
}

Site Stats

Snippets: 1791
Codebases: 571