call_stack.c

ds2.10/fluffos-2.16-ds05/testsuite/single/tests/efuns/call_stack.c · 590 B

From the archive ds2.10.zip

Download the archive   « Back to the archive contents

void do_tests() {
    mixed stack, entry;
    int n = sizeof(call_stack(0));

    stack = call_stack(0);
    ASSERT(stack[0] == __FILE__);
    ASSERT(sizeof(filter(stack, (: stringp :))) == n);
    stack = call_stack(1);
    ASSERT(stack[0] == this_object());
    ASSERT(sizeof(filter(stack, (: objectp :))) == n);
    stack = call_stack(2);
    ASSERT(stack[0] == "do_tests");
    ASSERT(sizeof(filter(stack, (: stringp :))) == n);
    stack = call_stack(3);
    ASSERT(sizeof(filter(stack, (: stringp :))) == n);
    ASSERT(catch(call_stack(-100)));
    ASSERT(catch(call_stack(4)));
}


Site Stats

Snippets: 1791
Codebases: 571