From 71939be5fa2bf22fb7a118c79f9145232e79ae7a Mon Sep 17 00:00:00 2001 From: John Ralls Date: Tue, 27 May 2025 16:29:16 -0700 Subject: [PATCH] [test gnc-quotes] Allow quote time and now time to differ slightly. Prevents the occasional spurious test failure. --- libgnucash/app-utils/test/gtest-gnc-quotes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgnucash/app-utils/test/gtest-gnc-quotes.cpp b/libgnucash/app-utils/test/gtest-gnc-quotes.cpp index 08b79c96b8..d6f1ff1831 100644 --- a/libgnucash/app-utils/test/gtest-gnc-quotes.cpp +++ b/libgnucash/app-utils/test/gtest-gnc-quotes.cpp @@ -378,7 +378,7 @@ TEST_F(GncQuotesTest, no_date) auto datetime{static_cast(GncDateTime())}; EXPECT_EQ(usd, gnc_price_get_currency(price)); - EXPECT_EQ(datetime, gnc_price_get_time64(price)); + EXPECT_TRUE (abs(datetime - gnc_price_get_time64(price)) <= 1); EXPECT_EQ(PRICE_SOURCE_FQ, gnc_price_get_source(price)); EXPECT_TRUE(gnc_numeric_equal(GncNumeric{1337, 100}, gnc_price_get_value(price)));