46void QTestData::append(
int type,
const void *data)
48 QTEST_ASSERT(d->dataCount < d->parent->elementCount());
49 int expectedType = d->parent->elementTypeId(d->dataCount);
51 if constexpr (
sizeof(qsizetype) == 8) {
55 if (type == QMetaType::LongLong && expectedType == QMetaType::Int) {
56 qlonglong d = *
static_cast<
const qlonglong *>(data);
57 if (d >= std::numeric_limits<
int>::min() && d <= std::numeric_limits<
int>::max()) {
60 type = QMetaType::Int;
64 if (expectedType != type) {
65 qDebug(
"expected data of type '%s', got '%s' for element %d of data with tag '%s'",
66 QMetaType(expectedType).name(),
67 QMetaType(type).name(),
68 d->dataCount, d->tag);
71 d->data[d->dataCount] = QMetaType(type).create(data);