Narrow some #if-ery on QT_BUILD_INTERNAL to test more normally
Only a small early part of tst_QTimeZone::utcTest() actually needed access to internal APIs, so only apply the #if-ery to that part. Pick-to: 6.9 6.8 6.5 5.15 Change-Id: Ifebd70005f87bbef5d03fa24fe33134fd802e2e5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
0b67d44656
commit
92ec27e461
@ -1326,6 +1326,7 @@ void tst_QTimeZone::utcTest()
|
|||||||
QCOMPARE(tzp.daylightTimeOffset(0), 0);
|
QCOMPARE(tzp.daylightTimeOffset(0), 0);
|
||||||
QCOMPARE(tzp.hasDaylightTime(), false);
|
QCOMPARE(tzp.hasDaylightTime(), false);
|
||||||
QCOMPARE(tzp.hasTransitions(), false);
|
QCOMPARE(tzp.hasTransitions(), false);
|
||||||
|
#endif // QT_BUILD_INTERNAL
|
||||||
|
|
||||||
// Test UTC accessor
|
// Test UTC accessor
|
||||||
const QDateTime now = QDateTime::currentDateTime();
|
const QDateTime now = QDateTime::currentDateTime();
|
||||||
@ -1386,7 +1387,6 @@ void tst_QTimeZone::utcTest()
|
|||||||
QCOMPARE(tz.offsetFromUtc(now), 123456);
|
QCOMPARE(tz.offsetFromUtc(now), 123456);
|
||||||
QCOMPARE(tz.standardTimeOffset(now), 123456);
|
QCOMPARE(tz.standardTimeOffset(now), 123456);
|
||||||
QCOMPARE(tz.daylightTimeOffset(now), 0);
|
QCOMPARE(tz.daylightTimeOffset(now), 0);
|
||||||
#endif // QT_BUILD_INTERNAL
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Relies on local variable names: zone tzp and locale enUS.
|
// Relies on local variable names: zone tzp and locale enUS.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user