diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2014-10-01 12:03:59 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-02-17 15:04:49 +0000 |
commit | 4c4940a744558fc8faa713439d7e27e26b52774d (patch) | |
tree | ec1407bcbb43245b61f1220c1b3e93cc9359fcd7 /src/corelib | |
parent | 647ad3fe2510d49299ee496a4d8db2058d832db1 (diff) |
tst_QList: test all memory layouts
The Movable type, surprisingly, was as large as sizeof(void*), so on
32-bit platforms, we were not testing the QList memory layout where
items are placed directly into the void*-slots, but are too small,
leaving gaps.
Fixed by making sure that Movable is smaller than void* and adding
a variant of Movable, Optimal, that is guaranteed to be the same
size as void*, and replacing the int tests with tests of Optimal.
Had to demote the State variable to uchar, since MSVC will apparently
not make a collection of bit-fields smaller than the largest type used
in any of the consituent bitfields, so State s : 8 wouldn't work.
Change-Id: I4f0e24bd6928f076b4ce60e8d977d5d98a724161
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
0 files changed, 0 insertions, 0 deletions