Ported tests.scm to dbstruct