forked from pool/cxxtools
- Add upstream changes to fix build and tests: * 0001-add-missing-header-time.h-to-src-timer.cpp.patch * 0001-remove-timespan-unittest-which-is-prone-to-rounding-.patch * 0001-fix-reading-time-zones-on-32-bit-systems.patch * 0001-remove-range-check-in-serializationinfo.patch OBS-URL: https://build.opensuse.org/request/show/994506 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cxxtools?expand=0&rev=18
45 lines
1.5 KiB
Diff
45 lines
1.5 KiB
Diff
From daacbe49c4f2494b23b30318feb4baf0e5dd9ae4 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Tommi=20M=C3=A4kitalo?= <tommi@tntnet.org>
|
|
Date: Tue, 2 Feb 2021 18:57:16 +0100
|
|
Subject: [PATCH] remove timespan unittest which is prone to rounding errors
|
|
due to binary arithmentic
|
|
|
|
---
|
|
test/timespan-test.cpp | 20 --------------------
|
|
1 file changed, 20 deletions(-)
|
|
|
|
diff --git a/test/timespan-test.cpp b/test/timespan-test.cpp
|
|
index ee553b7..ffbc951 100644
|
|
--- a/test/timespan-test.cpp
|
|
+++ b/test/timespan-test.cpp
|
|
@@ -225,26 +225,6 @@ class TimespanTest : public cxxtools::unit::TestSuite
|
|
CXXTOOLS_UNIT_ASSERT_EQUALS(number, 17.875);
|
|
}
|
|
|
|
- {
|
|
- cxxtools::Seconds t(cxxtools::Timespan(14999999));
|
|
- cxxtools::SerializationInfo si;
|
|
- si <<= t;
|
|
- cxxtools::Timespan t2;
|
|
- si >>= t2;
|
|
- CXXTOOLS_UNIT_ASSERT_EQUALS(t.totalUSecs(), t2.totalUSecs());
|
|
- CXXTOOLS_UNIT_ASSERT_EQUALS(si.typeName(), "seconds");
|
|
- }
|
|
-
|
|
- {
|
|
- cxxtools::Seconds t(cxxtools::Timespan(14999998));
|
|
- cxxtools::SerializationInfo si;
|
|
- si <<= t;
|
|
- cxxtools::Timespan t2;
|
|
- si >>= t2;
|
|
- CXXTOOLS_UNIT_ASSERT_EQUALS(t, t2);
|
|
- CXXTOOLS_UNIT_ASSERT_EQUALS(si.typeName(), "seconds");
|
|
- }
|
|
-
|
|
{
|
|
cxxtools::Minutes t(17.875);
|
|
cxxtools::SerializationInfo si;
|
|
--
|
|
2.37.1
|
|
|