When comparing sys_info in test...

only compare whether the saves are equal to 0
and not their actual values.

This allows one to compare against the binary database
which does not contain actual values of save.
This commit is contained in:
Howard Hinnant 2021-05-18 16:17:37 -04:00
parent b49a7575eb
commit 052eebaf00

View File

@ -29,10 +29,11 @@
bool bool
is_equal(date::sys_info const& x, date::sys_info const& y) is_equal(date::sys_info const& x, date::sys_info const& y)
{ {
using namespace std::chrono;
return x.begin == y.begin && return x.begin == y.begin &&
x.end == y.end && x.end == y.end &&
x.offset == y.offset && x.offset == y.offset &&
x.save == y.save && (x.save == minutes{0}) == (y.save == minutes{0}) &&
x.abbrev == y.abbrev; x.abbrev == y.abbrev;
} }