From 3c88728b5367f9705a8ff6f62fa66d9f46880084 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 7 Dec 2020 09:14:17 -0800 Subject: tst_QCborValue: adjust the size of the minimum string that won't fit I don't know which of the previous commits caused this: as far as I can tell, this test should never have passed. Pick-to: 5.15 6.0 Change-Id: I55083c2909f64a1f8868fffd164e7e8c24eec1f8 Reviewed-by: Volker Hilsheimer --- tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp') diff --git a/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp b/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp index 4ec5095f1c..f258ca74f7 100644 --- a/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp +++ b/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp @@ -2166,7 +2166,9 @@ void tst_QCborValue::extendedTypeValidation() void tst_QCborValue::hugeDeviceValidation_data() { - addValidationHugeDevice(MaxByteArraySize + 1, MaxStringSize + 1); + // because QCborValue will attempt to retain the original string in UTF-8, + // the size which it can't store is actually the byte array size + addValidationHugeDevice(MaxByteArraySize + 1, MaxByteArraySize + 1); } void tst_QCborValue::hugeDeviceValidation() -- cgit v1.2.3