fluffos-1.22/
fluffos-1.22/Win32/
fluffos-1.22/compat/
fluffos-1.22/testsuite/
fluffos-1.22/testsuite/clone/
fluffos-1.22/testsuite/command/
fluffos-1.22/testsuite/data/
fluffos-1.22/testsuite/etc/
fluffos-1.22/testsuite/include/
fluffos-1.22/testsuite/inherit/
fluffos-1.22/testsuite/inherit/master/
fluffos-1.22/testsuite/log/
fluffos-1.22/testsuite/single/
fluffos-1.22/testsuite/single/tests/compiler/
fluffos-1.22/testsuite/single/tests/efuns/
fluffos-1.22/testsuite/single/tests/operators/
fluffos-1.22/testsuite/u/
fluffos-1.22/tmp/
object prev;

void create() {
    prev = previous_object();
}

nomask void i_am_bad() {
}

void do_tests() {
    object ob;
#ifndef __NO_SHADOWS__
    ASSERT(catch(shadow(this_object())));
    ASSERT(catch(shadow(master())));
    new(__DIR__ "badshad", 1);

    ASSERT(shadow(this_object(), 0) == 0);
    ASSERT((object)this_object()->foo() == this_object());

    ob = new(__DIR__ "goodshad", 1);
    ASSERT(shadow(this_object(), 0) == ob);
    ASSERT((object)this_object()->foo() == ob);
    ASSERT((object)new(__FILE__)->bar() == ob);

    ASSERT(catch(shadow(ob)));
    ASSERT(catch(shadow(new(__FILE__))));

#endif
}

object foo() {
    printf("%O\n", file_name());
    return this_object();
}

object bar() {
    return (object)prev->foo();
}