Richard Cohen
3360a6d13b
Remove extra semicolons
...
Courtesy of gcc -pedantic
3 years ago
Richard Cohen
1cec0cb3f3
Use internal extern "C" { ... } for C++
...
- removes warnings compiling swig engine
...
[ 10%] Generating swig-engine.cpp
.../libgnucash/engine/engine-helpers.h:31: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gnc-date.h:83: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/qofquery.h:90: Warning 302: Identifier 'QofQuery' redefined (ignored),
.../libgnucash/engine/gnc-option.hpp:55: Warning 302: previous definition of 'QofQuery'.
.../libgnucash/engine/gnc-commodity.h:56: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gncBusiness.h:40: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gncEntry.h:37: Warning 313: Unrecognized extern type "C++".
3 years ago
Marco Scardovi
6fe2028bca
Fix test
...
Signed-off-by: Marco Scardovi <mscardovi@icloud.com>
3 years ago
Christopher Lam
d82bb7b8a2
[Transaction.c] use is_unset static to denote uncached readonly_reason
...
tests in 128c8d6f88
5 years ago
jean
4e9fe0a4d1
Add missing function to mock account
5 years ago
Dong Lin
75209c024f
Update price database for imported transactions
...
When a transaction is added from the ledger, price database is updated properly.
But if the transaction is imported, there is no price db update.
This change adds the proper pricedb update in the import path (qfx/ofx/qif).
Tested with make check
5 years ago
John Ralls
2ff3bf5877
Echo into CMakeLists.txt rename of gmock-qofqury to fake-qofquery.
5 years ago
John Ralls
e09a26ba3a
Merge Christian Gruber's 'test_import_backend' into maint.
6 years ago
Christian Gruber
6394b6491b
fixup! Simplify type checking for GObject mockups
6 years ago
Christian Gruber
feba64624c
Fix xaccTransSetNotes()
...
This is a bugfix for commit 954ce9577f
6 years ago
Christian Gruber
e44cf9c61f
Add missing C linkage statements
6 years ago
Christian Gruber
63969e8628
Remove unecessary include
6 years ago
Christian Gruber
d673c32e35
Mock methods should not neccessarily return mock objects
6 years ago
Christian Gruber
0e634c5446
Relax runtime type checks
...
Runtime type checks should only check for the mock up type, if
neccessary. If objects of another class than the mocked object itself
are processed, runtime type check should only check for the base-class
type. It should be possible to use mockup objects and non-mockup objects
within the same application.
The included headers are adapted accordingly.
6 years ago
Christian Gruber
99256c385b
Add missing _get_type() functions of all mocked GObject classes
...
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.
6 years ago
Christian Gruber
833edd0b29
Add missing comment
6 years ago
Christian Gruber
bc80bbb325
Simplify type checking for GObject mockups
...
A type conversion function is introduced for each GObject mockup. This
function does a runtime type check and generates a GoogleTest failure in
case of any type error. This avoids checking GObject type twice.
6 years ago
Christian Gruber
b0906b5e2a
Use MOCK_CONST_METHODn() macro instead of MOCK_METHODn() macro if necessary
6 years ago
Christian Gruber
5408854c28
Rename GObject type names of mock classes
...
According to a remark in PR #738 the lower case type name is changed.
Underscores should only be used between namespace and type name and
between type name and suffixes.
6 years ago
Christian Gruber
41c147a918
Use /* ... */ for multi-line comments
6 years ago
Christian Gruber
df6621f2b5
Add doxygen documentation to QofFakeQuery and QofFakeQueryPool
6 years ago
jean
a9f79cf79c
Add a flag to the account structure to defer balance computation
6 years ago
Christian Gruber
861a2482fe
Add a comment on using empty ctor for mock classes derived from GObjects
6 years ago
Christian Gruber
3d92d53917
Rename all class methods using snake_case instead of camelCase
6 years ago
Christian Gruber
1fa90a5429
Cleanup some comments
6 years ago
Christian Gruber
1e2236afdc
Use typed queries
6 years ago
Christian Gruber
fa82a8bcce
Replace query factory by a query pool
...
Query factory was implemented using a public global variable
qof_query_factory.
Furthermore a query pool is easier to handle than a factory, since the
whole management can be hidden from the user.
6 years ago
Christian Gruber
2639cdefdf
Remove unnecessary inclusion of qofquery-p.h
6 years ago
Christian Gruber
841111e37e
Rename class QofMockQuery to QofFakeQuery
6 years ago
Christian Gruber
bbfc30d70b
Rename gmock-qofquery to fake-qofquery
6 years ago
Christian Gruber
8ac640d5fa
Fix typo
6 years ago
Christian Gruber
610bbda23f
Add glib-object.h to includes
6 years ago
Christian Gruber
53c294f9e8
Remove unnecessary type check
6 years ago
Christian Gruber
bb0088c43c
Replace g_return_if_fail() and g_return_val_if_fail() by ASSERT_TRUE and EXPECT_TRUE
6 years ago
Christian Gruber
967cf0b430
Pass std::vector arguments by reference instead of by value
6 years ago
Christian Gruber
d084279891
State comment on unused GObject instance init function more precisely
6 years ago
Christian Gruber
67f63053fb
Remove todo comments on replacement of std::vector by std::list
...
Replacing std::vector by std::list wouldn't have any advantage
6 years ago
Christian Gruber
a9d85e8f8e
Use std::vector of const char* instead of std::string where meaningful
...
This avoids additional string allocation
6 years ago
Geert Janssens
a124e647db
Add files omitted in previous commit
6 years ago
John Ralls
f2a13ecac7
Merge Christian Gruber's 'test_import_backend' into master.
6 years ago