mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fail the test if still using 32bit time_t in 2038
gtest-gnc-option.cpp and gtest-gnc-optiondb.cpp need to call time() for g_date_set_time_t()
This commit is contained in:
parent
d63248dad2
commit
7d26b8c05f
@ -941,6 +941,13 @@ TEST(GncOptionDate, test_gnc_relative_date_from_storage_string)
|
||||
EXPECT_EQ(RelativeDatePeriod::END_ACCOUNTING_PERIOD, gnc_relative_date_from_storage_string("end-prev-fin-year"));
|
||||
}
|
||||
|
||||
TEST(GncOptionDate, test_not_using_32bit_time_t_in_2038)
|
||||
{
|
||||
// tests below call time() to initialize GDate.
|
||||
// make sure the tests fail if that could cause a problem
|
||||
EXPECT_FALSE(sizeof (time_t) == 4 && time(nullptr) <= 0) << "Time to upgrade 32bit time_t!";
|
||||
}
|
||||
|
||||
TEST(GncOptionDate, test_gnc_relative_date_to_time64)
|
||||
{
|
||||
GDate date;
|
||||
|
Loading…
Reference in New Issue
Block a user