Mercurial > hg > svcore
comparison 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 |
comparison
equal
deleted
inserted
replaced
1267:1d8418cca63a | 1268:b7b84ae5f0a7 |
---|---|
60 QCOMPARE(RealTime(1, ONE_BILLION), RealTime(2, 0)); | 60 QCOMPARE(RealTime(1, ONE_BILLION), RealTime(2, 0)); |
61 QCOMPARE(RealTime(1, -ONE_BILLION), RealTime(0, 0)); | 61 QCOMPARE(RealTime(1, -ONE_BILLION), RealTime(0, 0)); |
62 QCOMPARE(RealTime(-1, ONE_BILLION), RealTime(0, 0)); | 62 QCOMPARE(RealTime(-1, ONE_BILLION), RealTime(0, 0)); |
63 QCOMPARE(RealTime(-1, -ONE_BILLION), RealTime(-2, 0)); | 63 QCOMPARE(RealTime(-1, -ONE_BILLION), RealTime(-2, 0)); |
64 | 64 |
65 QCOMPARE(RealTime(1, -ONE_BILLION-ONE_BILLION/2), RealTime(0, -ONE_BILLION/2)); | |
66 QCOMPARE(RealTime(-1, ONE_BILLION+ONE_BILLION/2), RealTime(0, ONE_BILLION/2)); | |
67 | |
65 QCOMPARE(RealTime(2, -ONE_BILLION*2), RealTime(0, 0)); | 68 QCOMPARE(RealTime(2, -ONE_BILLION*2), RealTime(0, 0)); |
66 QCOMPARE(RealTime(2, -ONE_BILLION/2), RealTime(1, ONE_BILLION/2)); | 69 QCOMPARE(RealTime(2, -ONE_BILLION/2), RealTime(1, ONE_BILLION/2)); |
67 | 70 |
68 QCOMPARE(RealTime(-2, ONE_BILLION*2), RealTime(0, 0)); | 71 QCOMPARE(RealTime(-2, ONE_BILLION*2), RealTime(0, 0)); |
69 QCOMPARE(RealTime(-2, ONE_BILLION/2), RealTime(-1, -ONE_BILLION/2)); | 72 QCOMPARE(RealTime(-2, ONE_BILLION/2), RealTime(-1, -ONE_BILLION/2)); |