class foo {
    int x;
    string y;
}

void do_tests() {
  // classes() returns every class in scope, which includes classes defined
  // in (or copied in from) the simul_efun via copy_structures.  Filter to
  // the class defined in this file so the test isn't coupled to whatever
  // the simul_efun happens to declare.
  string *names = filter(classes(find_object(__FILE__)), (: $1 == "foo" :));
  ASSERT_EQ(({ "foo" }), names);
  mixed *full = filter(classes(find_object(__FILE__), 1), (: $1[0] == "foo" :));
  ASSERT_EQ(({ ({ "foo", ({ "x", "int"}), ({ "y", "string"}) }) }), full);
}
