summaryrefslogtreecommitdiffstats
path: root/tests/auto/other/toolsupport/tst_toolsupport.cpp
diff options
context:
space:
mode:
authorSami Nurmenniemi <sami.nurmenniemi@qt.io>2017-04-05 17:35:09 +0300
committerSami Nurmenniemi <sami.nurmenniemi@qt.io>2017-04-12 08:36:27 +0000
commita89033743316c3f0a5b81e2634bf16958ec84f03 (patch)
treea546a1c0c2081916d831d8e4deda1922f7739f95 /tests/auto/other/toolsupport/tst_toolsupport.cpp
parent59d4cbca0b232814b736b7543ddecd5e5db40c29 (diff)
Fix tst_toolsupport on 32-bit arm platform
On 32-bit arm platform, qint64 gets aligned differently than on 32-bit x86. First difference between the platforms on QFilePrivate member offset happens in QFileDevicePrivate::cachedSize: - On 32-bit x86 it's offset is 148 (4-aligned) - On 32-bit arm it's offset is 152 (8-aligned) and offsets of all the remaining members are +4 compared to x86 - On 64-bit architectures the offsets are the same Change-Id: If110da27ea08504e78b167c0a21599420eaa9630 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/other/toolsupport/tst_toolsupport.cpp')
-rw-r--r--tests/auto/other/toolsupport/tst_toolsupport.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/other/toolsupport/tst_toolsupport.cpp b/tests/auto/other/toolsupport/tst_toolsupport.cpp
index f93c8f825b..a78bdc34f1 100644
--- a/tests/auto/other/toolsupport/tst_toolsupport.cpp
+++ b/tests/auto/other/toolsupport/tst_toolsupport.cpp
@@ -124,7 +124,13 @@ void tst_toolsupport::offsets_data()
{
QTestData &data = QTest::newRow("QFilePrivate::fileName")
<< pmm_to_offsetof(&QFilePrivate::fileName);
+#ifdef Q_PROCESSOR_X86
+ // x86 32-bit has weird alignment rules. Refer to QtPrivate::AlignOf in
+ // qglobal.h for more details.
data << 168 << 248;
+#else
+ data << 172 << 248;
+#endif
}
#endif