[GSOC] Data model unit testing
Christian Stimming
stimming at tuhh.de
Sat Apr 2 16:12:53 EDT 2011
Am Samstag, 2. April 2011 schrieb John Ralls:
> >> Groups with no outside users are QofGobject
> >
> > That's a header that contains only macros, and those macros are indeed in
> > use throughout gnucash, e.g. QOF_GOBJECT_IMPL.
>
> That would be qof-gobject.h. There's also qofgobj.[ch], which exports four
> functions, qof_gobject_init(), qof_gobject_shutdown(),
> qof_gobject_register(QofType, GobjectClass*), and
> qof_gobject_register_instance (QofBook*, QofType, GObject*). There aren't
> any references to those functions outside of those two files.
Oh, right. In fact, also in this case the C file isn't being compiled. I'll
remove it in a minute.
> As for qof-gobject.h, exactly one of its macros (QOF_GOBJECT_IMPL) is used
> 6 times in engine (and 4 of those are in tests) and once in qofbook.h.
> QOF_GOBJECT_GET_TYPE and QOF_GOBJECT_FINALIZE are used once each in
> qofinstance.c. The remainder are unused anywhere. In any case they're not
> candidates for unit tests regardless.
>
> (QOF_GOBJECT_IMPL might be be useful to slightly reduce the drudgery of
> refactoring all of the modules to be proper Qof-derived GObject objects.
Yes, and yes.
> As I've said before, I think that it would be more productive to refactor
> them into a proper OO language,
I agree with that statement as well.
> but that proposal hasn't received the
> general acclamation that I'd hoped for.)
Yes, that is true as well.
Regards,
Christian
More information about the gnucash-devel
mailing list