1 #ifndef GMOCK_QOFBOOK_H 2 #define GMOCK_QOFBOOK_H 4 #include <gmock/gmock.h> 10 #include "gmock-gobject.h" 13 GType qof_mockbook_get_type(
void);
15 #define QOF_TYPE_MOCKBOOK (qof_mockbook_get_type ()) 16 #define QOF_IS_MOCKBOOK(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), QOF_TYPE_MOCKBOOK)) 25 hash_of_collections =
nullptr;
26 data_tables =
nullptr;
27 data_table_finalizers =
nullptr;
31 session_dirty = FALSE;
35 cached_num_field_source_isvalid = FALSE;
36 cached_num_days_autoreadonly_isvalid = FALSE;
38 void*
operator new(
size_t size)
40 return mock_g_object_new (QOF_TYPE_MOCKBOOK, NULL, size);
48 void operator delete(
void* book,
size_t size)
50 mock_g_object_unref(book, size);
53 MOCK_METHOD0(malloc_split, Split *());
54 MOCK_CONST_METHOD0(use_split_action_for_num_field, gboolean());
65 qof_mockbook (QofBook *book)
67 if (QOF_IS_MOCKBOOK(book))
69 ADD_FAILURE() <<
"Expected 'book' to be of type 'QofMockBook'";
74 qof_mockbook (
const QofBook *book)
76 if (QOF_IS_MOCKBOOK(book))
78 ADD_FAILURE() <<
"Expected 'book' to be of type 'QofMockBook'";
API for Transactions and Splits (journal entries)
Encapsulate all the information about a dataset.