mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
bugfix: the object needs to have a valid book passed to it to pass
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9577 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
732190da37
commit
2afc11fd9a
@ -1,3 +1,6 @@
|
||||
/*
|
||||
* Lightly test the QofObject infrastructure.
|
||||
*/
|
||||
#include <glib.h>
|
||||
#include <libguile.h>
|
||||
|
||||
@ -30,8 +33,13 @@ static QofObject bus_obj = {
|
||||
printable,
|
||||
};
|
||||
|
||||
static void test_object (void)
|
||||
static void
|
||||
test_object (void)
|
||||
{
|
||||
QofBook *book = qof_book_new();
|
||||
|
||||
do_test ((NULL != book), "book null");
|
||||
|
||||
/* Test the global registration and lookup functions */
|
||||
{
|
||||
do_test (!qof_object_register (NULL), "register NULL");
|
||||
@ -47,7 +55,7 @@ static void test_object (void)
|
||||
"test description return");
|
||||
}
|
||||
|
||||
test_foreach ((QofBook*)1, TEST_MODULE_NAME);
|
||||
test_foreach (book, TEST_MODULE_NAME);
|
||||
test_printable (TEST_MODULE_NAME, (gpointer)1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user