Skip to content

Commit

Permalink
When comparing sys_info in test...
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
HowardHinnant committed May 18, 2021
1 parent b49a757 commit 052eeba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/posix/ptz.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@
bool
is_equal(date::sys_info const& x, date::sys_info const& y)
{
using namespace std::chrono;
return x.begin == y.begin &&
x.end == y.end &&
x.offset == y.offset &&
x.save == y.save &&
(x.save == minutes{0}) == (y.save == minutes{0}) &&
x.abbrev == y.abbrev;
}

Expand Down

0 comments on commit 052eeba

Please sign in to comment.