Mercurial > hg > svcore
diff base/test/TestOurRealTime.h @ 1268:b7b84ae5f0a7 3.0-integration
Fix fairly obscure mis-canonicalisation in RealTime (leading to non-canonical but still correct values)
author | Chris Cannam |
---|---|
date | Fri, 18 Nov 2016 12:53:21 +0000 |
parents | abfc498c52bc |
children | 980afe3f1a76 |
line wrap: on
line diff
--- a/base/test/TestOurRealTime.h Thu Nov 17 14:46:03 2016 +0000 +++ b/base/test/TestOurRealTime.h Fri Nov 18 12:53:21 2016 +0000 @@ -62,6 +62,9 @@ QCOMPARE(RealTime(-1, ONE_BILLION), RealTime(0, 0)); QCOMPARE(RealTime(-1, -ONE_BILLION), RealTime(-2, 0)); + QCOMPARE(RealTime(1, -ONE_BILLION-ONE_BILLION/2), RealTime(0, -ONE_BILLION/2)); + QCOMPARE(RealTime(-1, ONE_BILLION+ONE_BILLION/2), RealTime(0, ONE_BILLION/2)); + QCOMPARE(RealTime(2, -ONE_BILLION*2), RealTime(0, 0)); QCOMPARE(RealTime(2, -ONE_BILLION/2), RealTime(1, ONE_BILLION/2));