summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qpropertytesthelper_p.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/testlib/qpropertytesthelper_p.h b/src/testlib/qpropertytesthelper_p.h
index 7b22e15784..a6cc9a52d8 100644
--- a/src/testlib/qpropertytesthelper_p.h
+++ b/src/testlib/qpropertytesthelper_p.h
@@ -140,10 +140,13 @@ void testReadWritePropertyBasics(
const QMetaObject *metaObject = instance.metaObject();
QMetaProperty metaProperty = metaObject->property(metaObject->indexOfProperty(propertyName));
QVERIFY2(metaProperty.metaType() == QMetaType::fromType<PropertyType>(),
- QByteArray("Preconditions not met for") + propertyName + '\n' +
- "The type of initial and changed value does not match the type of the property."
- "Please ensure that the types match exactly (convertability is not enough)."
- "You can provide the template types to the function explicitly to force a certain type");
+ QByteArray("Preconditions not met for ") + propertyName + '\n' +
+ "The type of initial and changed value does not match the type of the property.\n"
+ "Please ensure that the types match exactly (convertability is not enough).\n"
+ "You can provide the template types to the "
+ "function explicitly to force a certain type.\n"
+ "Expected was a " + metaProperty.metaType().name()
+ + " but " + QMetaType::fromType<PropertyType>().name() + " was provided.");
// in case the TestedClass has setProperty()/property() methods.
QObject &testedObj = static_cast<QObject &>(instance);
@@ -274,10 +277,13 @@ void testReadOnlyPropertyBasics(
QObject &testedObj = static_cast<QObject &>(instance);
QVERIFY2(metaProperty.metaType() == QMetaType::fromType<PropertyType>(),
- QByteArray("Preconditions not met for") + propertyName + '\n' +
- "The type of initial and changed value does not match the type of the property."
- "Please ensure that the types match exactly (convertability is not enough)."
- "You can provide the template types to the function explicitly to force a certain type");
+ QByteArray("Preconditions not met for ") + propertyName + '\n' +
+ "The type of initial and changed value does not match the type of the property.\n"
+ "Please ensure that the types match exactly (convertability is not enough).\n"
+ "You can provide the template types to the "
+ "function explicitly to force a certain type.\n"
+ "Expected was a " + metaProperty.metaType().name()
+ + " but " + QMetaType::fromType<PropertyType>().name() + " was provided.");
QVERIFY2(metaProperty.isBindable(), "Preconditions not met for " + QByteArray(propertyName));