Lines Matching full:0
28 #if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)
75 uint32_t v = 0x7fc00000; in myNaNf()
84 uint32_t v = 0x7f800000; in myInff()
93 uint32_t v = 0xff800000; in myNInff()
102 uint64_t v = UINT64_C(0x7ff8000000000000); in myNaN()
111 uint64_t v = UINT64_C(0x7ff0000000000000); in myInf()
120 uint64_t v = UINT64_C(0xfff0000000000000); in myNInf()
219 #if QT_VERSION < QT_VERSION_CHECK(5, 9, 0) in encodeVariant()
281 cbor_encoder_init(&encoder, bufptr, buffer.length(), 0); in compare()
285 QCOMPARE(cbor_encoder_get_extra_bytes_needed(&encoder), size_t(0)); in compare()
300 QTest::newRow("0U") << raw("\x00") << QVariant(0U); in addFixedData()
308 QTest::newRow("65536U") << raw("\x1a\0\1\x00\x00") << QVariant(65536U); in addFixedData()
310 QTest::newRow("4294967296U") << raw("\x1b\0\0\0\1\0\0\0\0") << QVariant(Q_UINT64_C(4294967296)); in addFixedData()
315 QTest::newRow("0") << raw("\x00") << QVariant(0); in addFixedData()
323 QTest::newRow("65536") << raw("\x1a\0\1\x00\x00") << QVariant(65536); in addFixedData()
325 QTest::newRow("4294967296") << raw("\x1b\0\0\0\1\0\0\0\0") << QVariant(Q_INT64_C(4294967296)); in addFixedData()
335 QTest::newRow("-UINT16_MAX-1") << raw("\x3a\0\1\x00\x00") << QVariant(-65537); in addFixedData()
337 … QTest::newRow("-UINT32_MAX-1") << raw("\x3b\0\0\0\1\0\0\0\0") << QVariant(Q_INT64_C(-4294967297)); in addFixedData()
348 QTest::newRow("negativeUINT16_MAX-1") << raw("\x3a\0\1\x00\x00") << neg(65537); in addFixedData()
350 …QTest::newRow("negativeUINT32_MAX-1") << raw("\x3b\0\0\0\1\0\0\0\0") << neg(Q_UINT64_C(4294967297)… in addFixedData()
353 …est::newRow("negativeUINT64_MAX+1") << raw("\x3b" "\xff\xff\xff\xff" "\xff\xff\xff\xff") << neg(0); in addFixedData()
355 QTest::newRow("simple0") << raw("\xe0") << QVariant::fromValue(SimpleType{0}); in addFixedData()
365 #if QT_VERSION < QT_VERSION_CHECK(5, 9, 0) in addFixedData()
366 QTest::newRow("0.f16") << raw("\xf9\0\0") << QVariant::fromValue(Float16Standin{0x0000}); in addFixedData()
368 QTest::newRow("0.f16") << raw("\xf9\0\0") << QVariant::fromValue(qfloat16(0)); in addFixedData()
369 QTest::newRow("-1.f16") << raw("\xf9\xbc\0") << QVariant::fromValue(qfloat16(-1)); in addFixedData()
370 QTest::newRow("1.5f16") << raw("\xf9\x3e\0") << QVariant::fromValue(qfloat16(1.5)); in addFixedData()
371 QTest::newRow("nan_f16") << raw("\xf9\x7e\0") << QVariant::fromValue<qfloat16>(myNaNf()); in addFixedData()
372 QTest::newRow("-inf_f16") << raw("\xf9\xfc\0") << QVariant::fromValue<qfloat16>(myNInff()); in addFixedData()
373 QTest::newRow("+inf_f16") << raw("\xf9\x7c\0") << QVariant::fromValue<qfloat16>(myInff()); in addFixedData()
376 QTest::newRow("0.f") << raw("\xfa\0\0\0\0") << QVariant::fromValue(0.f); in addFixedData()
377 QTest::newRow("0.") << raw("\xfb\0\0\0\0\0\0\0\0") << QVariant(0.); in addFixedData()
378 QTest::newRow("-1.f") << raw("\xfa\xbf\x80\0\0") << QVariant::fromValue(-1.f); in addFixedData()
379 QTest::newRow("-1.") << raw("\xfb\xbf\xf0\0\0\0\0\0\0") << QVariant(-1.); in addFixedData()
381 …QTest::newRow("16777215.") << raw("\xfb\x41\x6f\xff\xff\xe0\0\0\0") << QVariant::fromValue(1677721… in addFixedData()
383 …QTest::newRow("-16777215.") << raw("\xfb\xc1\x6f\xff\xff\xe0\0\0\0") << QVariant::fromValue(-16777… in addFixedData()
385 QTest::newRow("nan_f") << raw("\xfa\x7f\xc0\0\0") << QVariant::fromValue<float>(myNaNf()); in addFixedData()
386 QTest::newRow("nan") << raw("\xfb\x7f\xf8\0\0\0\0\0\0") << QVariant(myNaN()); in addFixedData()
387 QTest::newRow("-inf_f") << raw("\xfa\xff\x80\0\0") << QVariant::fromValue<float>(myNInff()); in addFixedData()
388 QTest::newRow("-inf") << raw("\xfb\xff\xf0\0\0\0\0\0\0") << QVariant(myNInf()); in addFixedData()
389 QTest::newRow("+inf_f") << raw("\xfa\x7f\x80\0\0") << QVariant::fromValue<float>(myInff()); in addFixedData()
390 QTest::newRow("+inf") << raw("\xfb\x7f\xf0\0\0\0\0\0\0") << QVariant(myInf()); in addFixedData()
398 QTest::newRow("bytestring1-nul") << raw("\x41\0") << QVariant(QByteArray("", 1)); in addStringsData()
402 QTest::newRow("bytestring256") << raw("\x59\1\0") + QByteArray(256, '3') in addStringsData()
408 QTest::newRow("textstring1-nul") << raw("\x61\0") << QVariant(QString::fromLatin1("", 1)); in addStringsData()
412 QTest::newRow("textstring256") << raw("\x79\1\0") + QByteArray(256, '3') in addStringsData()
421 QTest::newRow("array-0") << raw("\x81\0") << make_list(0); in addArraysAndMaps()
422 QTest::newRow("array-{0-0}") << raw("\x82\0\0") << make_list(0, 0); in addArraysAndMaps()
424 QTest::newRow("array-array-0") << raw("\x81\x81\0") << make_list(make_list(0)); in addArraysAndMaps()
425 QTest::newRow("array-array-{0-0}") << raw("\x81\x82\0\0") << make_list(make_list(0, 0)); in addArraysAndMaps()
426 QTest::newRow("array-array-0-0") << raw("\x82\x81\0\0") << make_list(make_list(0),0); in addArraysAndMaps()
429 QTest::newRow("map-0:0") << raw("\xa1\0\0") << make_map({{0,0}}); in addArraysAndMaps()
430 QTest::newRow("map-0:0-1:1") << raw("\xa2\0\0\1\1") << make_map({{0,0}, {1,1}}); in addArraysAndMaps()
431 …QTest::newRow("map-0:{map-0:0-1:1}") << raw("\xa1\0\xa2\0\0\1\1") << make_map({{0, make_map({{0,0}… in addArraysAndMaps()
433 QTest::newRow("array-map1") << raw("\x81\xa1\0\0") << make_list(make_map({{0,0}})); in addArraysAndMaps()
434 …QTest::newRow("array-map2") << raw("\x82\xa1\0\0\xa1\1\1") << make_list(make_map({{0,0}}), make_ma… in addArraysAndMaps()
436 QTest::newRow("map-array1") << raw("\xa1\x62oc\x81\0") << make_map({{"oc", make_list(0)}}); in addArraysAndMaps()
437 …QTest::newRow("map-array2") << raw("\xa1\x62oc\x84\0\1\2\3") << make_map({{"oc", make_list(0, 1, 2… in addArraysAndMaps()
438 …QTest::newRow("map-array3") << raw("\xa2\x62oc\x82\0\1\2\3") << make_map({{"oc", make_list(0, 1)},… in addArraysAndMaps()
444 QTest::newRow("_array-0") << raw("\x9f\0\xff") << make_ilarray({0}); in addArraysAndMaps()
445 QTest::newRow("_array-{0-0}") << raw("\x9f\0\0\xff") << make_ilarray({0, 0}); in addArraysAndMaps()
447 QTest::newRow("_array-array-0") << raw("\x9f\x81\0\xff") << make_ilarray({make_list(0)}); in addArraysAndMaps()
448 …QTest::newRow("_array-_array-0") << raw("\x9f\x9f\0\xff\xff") << make_ilarray({make_ilarray({0})}); in addArraysAndMaps()
449 …QTest::newRow("_array-_array-{0-0}") << raw("\x9f\x9f\0\0\xff\xff") << make_ilarray({make_ilarray(… in addArraysAndMaps()
450 …QTest::newRow("_array-_array-0-0") << raw("\x9f\x9f\0\xff\0\xff") << make_ilarray({make_ilarray({0… in addArraysAndMaps()
453 QTest::newRow("_map-0:0") << raw("\xbf\0\0\xff") << make_ilmap({{0,0}}); in addArraysAndMaps()
454 QTest::newRow("_map-0:0-1:1") << raw("\xbf\0\0\1\1\xff") << make_ilmap({{0,0}, {1,1}}); in addArraysAndMaps()
455 …QTest::newRow("_map-0:{map-0:0-1:1}") << raw("\xbf\0\xa2\0\0\1\1\xff") << make_ilmap({{0, make_map… in addArraysAndMaps()
456 …QTest::newRow("_map-0:{_map-0:0-1:1}") << raw("\xbf\0\xbf\0\0\1\1\xff\xff") << make_ilmap({{0, mak… in addArraysAndMaps()
458 QTest::newRow("_array-map1") << raw("\x9f\xa1\0\0\xff") << make_ilarray({make_map({{0,0}})}); in addArraysAndMaps()
459 …QTest::newRow("_array-_map1") << raw("\x9f\xbf\0\0\xff\xff") << make_ilarray({make_ilmap({{0,0}})}… in addArraysAndMaps()
460 …QTest::newRow("_array-map2") << raw("\x9f\xa1\0\0\xa1\1\1\xff") << make_ilarray({make_map({{0,0}})… in addArraysAndMaps()
461 …QTest::newRow("_array-_map2") << raw("\x9f\xbf\0\0\xff\xbf\1\1\xff\xff") << make_ilarray({make_ilm… in addArraysAndMaps()
463 … QTest::newRow("_map-array1") << raw("\xbf\x62oc\x81\0\xff") << make_ilmap({{"oc", make_list(0)}}); in addArraysAndMaps()
464 …Test::newRow("_map-_array1") << raw("\xbf\x62oc\x9f\0\xff\xff") << make_ilmap({{"oc", make_ilarray… in addArraysAndMaps()
465 …QTest::newRow("_map-array2") << raw("\xbf\x62oc\x84\0\1\2\3\xff") << make_ilmap({{"oc", make_list(… in addArraysAndMaps()
466 …t::newRow("_map-_array2") << raw("\xbf\x62oc\x9f\0\1\2\3\xff\xff") << make_ilmap({{"oc", make_ilar… in addArraysAndMaps()
467 …QTest::newRow("_map-array3") << raw("\xbf\x62oc\x82\0\1\2\3\xff") << make_ilmap({{"oc", make_list(… in addArraysAndMaps()
468 …t::newRow("_map-_array3") << raw("\xbf\x62oc\x9f\0\1\xff\2\3\xff") << make_ilmap({{"oc", make_ilar… in addArraysAndMaps()
471 QTest::newRow("array-1(0)") << raw("\x81\xc1\0") << make_list(QVariant::fromValue(Tag{1, 0})); in addArraysAndMaps()
523 compare(QVariant::fromValue(Tag{256, input}), raw("\xd9\1\0") + output); in tags()
532 compare(QVariant::fromValue(Tag{65536, input}), raw("\xda\0\1\0\0") + output); in tags()
538 …compare(QVariant::fromValue(Tag{UINT32_MAX + Q_UINT64_C(1), input}), raw("\xdb\0\0\0\1\0\0\0\0") +… in tags()
564 for (int i = 0; i < 5; ++i) { in arrays()
572 for (int i = 0; i < 3; ++i) { in arrays()
576 compare(list, raw("\x99\1\0") + longoutput); in arrays()
612 for (int i = 0; i < 5; ++i) { in maps()
620 for (int i = 0; i < 3; ++i) { in maps()
624 compare(QVariant::fromValue(map), raw("\xb9\1\0") + longoutput); in maps()
645 for (int len = 0; len < output.length(); ++len) { in shortBuffer()
647 cbor_encoder_init(&encoder, reinterpret_cast<quint8 *>(buffer.data()), len, 0); in shortBuffer()
649 QVERIFY(cbor_encoder_get_extra_bytes_needed(&encoder) != 0); in shortBuffer()
661 cbor_encoder_init(&encoder, reinterpret_cast<quint8 *>(buffer.data()), buffer.length(), 0); in tooShortArrays()
675 cbor_encoder_init(&encoder, reinterpret_cast<quint8 *>(buffer.data()), buffer.length(), 0); in tooShortMaps()
689 cbor_encoder_init(&encoder, reinterpret_cast<quint8 *>(buffer.data()), buffer.length(), 0); in tooBigArrays()
693 QCOMPARE(container.remaining, size_t(0)); in tooBigArrays()
704 cbor_encoder_init(&encoder, reinterpret_cast<quint8 *>(buffer.data()), buffer.length(), 0); in tooBigMaps()
709 QCOMPARE(container.remaining, size_t(0)); in tooBigMaps()
731 cbor_encoder_init(&encoder, buf, sizeof(buf), 0); in illegalSimpleType()