gnucash maint: Work around strange struct tm initializer failure.
John Ralls
jralls at code.gnucash.org
Fri Nov 2 16:44:19 EDT 2018
Updated via https://github.com/Gnucash/gnucash/commit/4b5ee845 (commit)
from https://github.com/Gnucash/gnucash/commit/1c6fca9f (commit)
commit 4b5ee84575ee908c8e7c53e21310052ba238747e
Author: John Ralls <jralls at ceridwen.us>
Date: Fri Nov 2 13:44:09 2018 -0700
Work around strange struct tm initializer failure.
diff --git a/libgnucash/engine/test/gtest-gnc-datetime.cpp b/libgnucash/engine/test/gtest-gnc-datetime.cpp
index 1d25933..108bcf4 100644
--- a/libgnucash/engine/test/gtest-gnc-datetime.cpp
+++ b/libgnucash/engine/test/gtest-gnc-datetime.cpp
@@ -23,10 +23,10 @@
\********************************************************************/
#include "../gnc-datetime.hpp"
-#include "../gnc-timezone.hpp"
#include <gtest/gtest.h>
/* Backdoor to enable unittests to temporarily override the timezone: */
+class TimeZoneProvider;
void _set_tzp(TimeZoneProvider& tz);
void _reset_tzp();
@@ -346,6 +346,12 @@ TEST(gnc_datetime_constructors, test_gncdate_start_constructor)
EXPECT_EQ(atime.format("%d-%m-%Y %H:%M:%S"), "20-04-2017 00:00:00");
}
+/* Putting this here is a bit weird but it includes
+ * boost/date_time/local_time/local_time.hpp and that redefines struct
+ * tm in a way that breaks initializing the tm in
+ * test_struct_tm_constructor on Linux.
+ */
+#include "../gnc-timezone.hpp"
/* Summertime transitions have been a recurring problem. At the time of adding
* this test the GncDateEditor was refusing to set the date to 28 October 2018
* in the Europe/London timezone.
Summary of changes:
libgnucash/engine/test/gtest-gnc-datetime.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
More information about the gnucash-changes
mailing list