Stefan Koch
113af56272
fixup: Review comments about style of code.
3 months ago
Stefan Koch
7f0d66d439
fixup: Add the new test-qofid.cpp file the the source distribution.
3 months ago
Stefan Koch
be5933a1ec
fixup: Remove memory leaks in the test code.
3 months ago
Stefan Koch
6e9a20dfeb
Implement full test coverage of libgnucash/engine/qofid
...
NOTE: This does not have full coverage because the "if (!target || !ent)" body in the
collection_compare_cp function cannot be reached. There is too much safety in the rest of
the system to test this error.
NOTE: I made this a separate test from the test-engine so that I was able to check that it
by itself could test the full coverage of the qofid.cpp file. If it was part of the larger
test, I could have missed some parts that were covered incidentally elsewhere.
3 months ago
Christopher Lam
c3e4f374a9
[account.cpp] gnc_account_child_index non-child acct should return -1
...
bugfix from 6cac9d0ebb
4 months ago
Christopher Lam
722a455593
[guid.cpp] string->guid should disallow 'g' char
...
off-by-1 error in alpha test. only 'a'-'f' should be allowed.
5 months ago
Christopher Lam
1cfda5a71a
[test-gnc-guid.cpp] use EXPECT_THROW
...
instead of try..catch
5 months ago
John Ralls
dcb7a8c242
Fix GncDateTime tests on Windows.
7 months ago
John Ralls
6fab138647
Adjust tests to accommodate Win32 special cases.
7 months ago
Sherlock
048dfa1232
Bug 343711 - Splits to Imbalance-USD do not disappear when zero-valued.
...
To mitigate potential impact, the Imbalance split is only removed when the split transitions to zero value during the commit of the transaction and the split's memo and action have no value.
8 months ago
Christopher Lam
ab04715c91
[Transaction.cpp] use qof_instance kvp API for Time64, with bugfix
...
fixes bug whereby xaccTransRetDateDue returns 0 if the kvp time64
stored is 0.
10 months ago
Christopher Lam
985f591830
[Transaction.cpp] small modification to xaccTransSetNotes
10 months ago
Christopher Lam
7e740babdf
[Transaction.cpp] small modification to xaccTransSetReadOnly
...
if reason is "" then remove the kvp
10 months ago
Christopher Lam
754a1eb42f
[utest-Account.cpp] use qof_instance kvp API for const char*
10 months ago
Christopher Lam
e7f05b9baa
[gnc-commodities.cpp] expose auto_quote_control kvp to test them
10 months ago
Christopher Lam
7f82098c11
[utest-Transaction.cpp] add test_xaccTransGetDateDue tests
...
including currently (arguably) buggy behaviour if kvp time64 is 0...
10 months ago
Christopher Lam
584bc61192
[utest-Transaction.cpp] test actual kvp slots
10 months ago
Christopher Lam
c5a6341ab2
[utest-Transaction] add trans->notes tests
10 months ago
Christopher Lam
4e2189db53
[utest-Transaction.cpp] xaccTransGetDocLink with NULL doclink is NOP
10 months ago
John Ralls
10d519544b
Merge Bill Sommerfeld's 'gnc-date-fix' into stable.
12 months ago
John Ralls
3770cb8131
Wrap include of gtest.h and gmock.h with a warning-silencing pragma.
...
See https://github.com/google/googletest/issues/4701
The warnings cause the Arch Linux CI to fail because of -Werror.
12 months ago
Bill Sommerfeld
76254e050f
Fix build of test-gnc-date on systems without HAVE_STRUCT_TM_GMTOFF
12 months ago
John Ralls
b5b2221e72
Test gnc-option-date variable fy start days.
...
Leverages the FakePrefsBackend from the previous commit to change the
fiscal year for testing.
Makes now_t a defaulted parameter of gnc_relative_date_to_time64 so
that we can inject different reference dates for testing.
1 year ago
John Ralls
cf369fb270
Add and use a fake preferences backend to set the fiscal year.
...
This restores the expected precondition for the quarter tests of the
Accounting Period being the current calendar year, replacing the
today-relative quarter begin and end dates.
1 year ago
Sherlock
4e4dcf1758
Use the fiscal start day of the month for relative quarter reports
...
Only the quarter's start month in reports is adjusted when Absolute is selected in the Start Date on the Accounting Period preferences. This branch adjusts both the quarter's start day and month when Absolute is selected or when Relative and Today, Start of this month, or Start of previous month are selected.
1 year ago
John Ralls
0e15e12ea9
Improve GncNumeric(std::string) to handle unicode spaces.
1 year ago
John Ralls
1fa4f71f59
Fix gnc-numeric test failure on macOS 15.4 beta.
...
Caused by Apple suddenly fixing ostreams to put the thousands
separator in numbers when it's set in the locale.
1 year ago
John Ralls
058e2a196b
Bug 799564 - Decimal point confusions when getting stock quotes from aex
...
Add parsing thousands-grouped numbers to GncNumeric(const std::string&).
1 year ago
John Ralls
579eed1fac
Bug 799480 - Fails to build with ICU 76
...
Use CMake find_package instead of pkg-config.
1 year ago
David Seifert
c06bc18dc4
Add missing `#include <cstdint>`
...
* GCC 15 has reduced transitive dependencies between headers.
Bug: https://bugs.gentoo.org/939856
1 year ago
Christopher Lam
ecabcef084
[Account.cpp] small modification xaccAccountSetLastNum
...
if last-num is empty-string, remove the slot. this makes the behaviour
consistent with other slots.
2 years ago
Christopher Lam
ab641b31f8
[gnc-datetime] improve CSV date parser with ICU and boost
...
1. Add dateformat "Locale" with ICU; uses current locale for date
parsing. ICU's locale date parser may parse "3 May 2023" or
"2024年9月13日" (LC_TIME=zh_TW.utf8) and maybe others.
2. Augment d-m-y m-d-y and y-m-d with boost UK/US/ISO parsers. This allows
CSV import of dates with months as words as "30 Sep 2023" or
"May 4, 1978" or "2023-Dec-25". Note boost parser cannot recognise
2-digit years, therefore "30 Sep 24" is invalid.
2 years ago
Christopher Lam
dc84e4d10c
[gnc-pricedb.h] remove unused gnc_pricedb_substitute_commodity
2 years ago
Christopher Lam
1718fa0b6e
[gnc-pricedb.h] remove unused gnc_pricedb_lookup_at_time64
2 years ago
John Ralls
ad7a51a6ef
Merge Chris Lam's 'acc-children-vector' into stable.
2 years ago
Christopher Lam
a6463f9814
[utest-Account] add more balance limit tests
2 years ago
Christopher Lam
119e257146
[Transaction|Split.cpp] Remove Reg2 unused functions
2 years ago
Christopher Lam
6cac9d0ebb
[Account.cpp] priv->children is a vector<Account*>
2 years ago
Geert Janssens
6cd8e4e458
Doxygen - drop obvious cases of deprecated code
2 years ago
Christopher Lam
2817ca195f
[test-commodities.cpp] test stability of c_str names
2 years ago
Christopher Lam
d867a9d18a
Merge branch 'TransactionP-hpp' into stable #1928
2 years ago
Christopher Lam
9e4b03f71b
[SplitP.hpp] rename to .hpp
2 years ago
Christopher Lam
1e1d21b716
[Transaction.hpp] rename to .hpp
2 years ago
Christopher Lam
80997ee5b4
[gtest-gnc-euro] add rounding test
2 years ago
John Ralls
9c18bc889c
Don't use Googletest internal API for unused decls.
2 years ago
Christopher Lam
606da28d25
use xaccAccountGetSplitsSize
2 years ago
Christopher Lam
3f7a5a8267
[Account.hpp][API] xaccAccountGetSplits and gnc_account_find_split
2 years ago
Christopher Lam
d100df7ef7
[AccountP.hpp] .h -> .hpp, remove extern "C" {} wrapper
2 years ago
Christopher Lam
dab32807ef
[engine/*.cpp] NULL -> nullptr changes
...
It's the done thing
2 years ago
Christopher Lam
11da03bc67
[gtest-gnc-numeric.cpp] test int64 limits for GncNumeric
2 years ago