Skip to content

Commit

Permalink
Add missing _get_type() functions of all mocked GObject classes
Browse files Browse the repository at this point in the history
If a GObject is replaced by a mock up, its _get_type() function has to
be replaced as well. The replaced _get_type() functions have to return
the type of the mock up now.
  • Loading branch information
Christian Gruber committed Sep 22, 2020
1 parent 833edd0 commit 99256c3
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libgnucash/engine/mocks/gmock-Account.cpp
Expand Up @@ -23,6 +23,12 @@ gnc_mockaccount_class_init(MockAccountClass *klass)
// function is unused, class functions are defined in C++ code
}


GType gnc_account_get_type(void)
{
return gnc_mockaccount_get_type();
}

void
xaccAccountBeginEdit (Account *account)
{
Expand Down
5 changes: 5 additions & 0 deletions libgnucash/engine/mocks/gmock-Split.cpp
Expand Up @@ -27,6 +27,11 @@ gnc_mocksplit_class_init (MockSplitClass *klass)
}


GType gnc_split_get_type(void)
{
return gnc_mocksplit_get_type();
}

Split *
xaccMallocSplit (QofBook *book)
{
Expand Down
5 changes: 5 additions & 0 deletions libgnucash/engine/mocks/gmock-Transaction.cpp
Expand Up @@ -25,6 +25,11 @@ gnc_mocktransaction_class_init(MockTransactionClass *klass)
}


GType gnc_transaction_get_type(void)
{
return gnc_mocktransaction_get_type();
}

void
xaccTransBeginEdit (Transaction *trans)
{
Expand Down
6 changes: 6 additions & 0 deletions libgnucash/engine/mocks/gmock-qofbook.cpp
Expand Up @@ -20,6 +20,12 @@ qof_mockbook_class_init(QofMockBookClass *klass)
// function is unused, class functions are defined in C++ code
}


GType qof_book_get_type(void)
{
return qof_mockbook_get_type();
}

gboolean
qof_book_use_split_action_for_num_field (const QofBook *book)
{
Expand Down

0 comments on commit 99256c3

Please sign in to comment.