Lines Matching full:1
129 return QByteArray::fromRawData(data, N - 1); in raw()
284 QCOMPARE(encoder.remaining, size_t(1)); in compare()
301 QTest::newRow("1U") << raw("\x01") << QVariant(1U); 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()
316 QTest::newRow("1") << raw("\x01") << QVariant(1); 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()
328 QTest::newRow("-1") << raw("\x20") << QVariant(-1); in addFixedData()
333 QTest::newRow("-UINT8_MAX-1") << raw("\x39\x01\x00") << QVariant(-257); 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()
341 QTest::newRow("negative1") << raw("\x20") << neg(1); in addFixedData()
346 QTest::newRow("negativeUINT8_MAX-1") << raw("\x39\x01\x00") << neg(257); 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 …QTest::newRow("negativeUINT64_MAX+1") << raw("\x3b" "\xff\xff\xff\xff" "\xff\xff\xff\xff") << neg(… in addFixedData()
369 QTest::newRow("-1.f16") << raw("\xf9\xbc\0") << QVariant::fromValue(qfloat16(-1)); 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()
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()
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()
434 …st::newRow("array-map2") << raw("\x82\xa1\0\0\xa1\1\1") << make_list(make_map({{0,0}}), make_map({… 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()
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()
460 …ewRow("_array-map2") << raw("\x9f\xa1\0\0\xa1\1\1\xff") << make_ilarray({make_map({{0,0}}), make_m… in addArraysAndMaps()
461 …rray-_map2") << raw("\x9f\xbf\0\0\xff\xbf\1\1\xff\xff") << make_ilarray({make_ilmap({{0,0}}), make… in addArraysAndMaps()
465 …est::newRow("_map-array2") << raw("\xbf\x62oc\x84\0\1\2\3\xff") << make_ilmap({{"oc", make_list(0,… in addArraysAndMaps()
466 …newRow("_map-_array2") << raw("\xbf\x62oc\x9f\0\1\2\3\xff\xff") << make_ilmap({{"oc", make_ilarray… in addArraysAndMaps()
467 …est::newRow("_map-array3") << raw("\xbf\x62oc\x82\0\1\2\3\xff") << make_ilmap({{"oc", make_list(0,… in addArraysAndMaps()
468 …newRow("_map-_array3") << raw("\xbf\x62oc\x9f\0\1\xff\2\3\xff") << make_ilmap({{"oc", make_ilarray… in addArraysAndMaps()
471 QTest::newRow("array-1(0)") << raw("\x81\xc1\0") << make_list(QVariant::fromValue(Tag{1, 0})); in addArraysAndMaps()
472 …QTest::newRow("array-1(map)") << raw("\x81\xc1\xa0") << make_list(QVariant::fromValue(Tag{1, make_… in addArraysAndMaps()
473 …QTest::newRow("map-1(2):3(4)") << raw("\xa1\xc1\2\xc3\4") << make_map({{QVariant::fromValue(Tag{1,… in addArraysAndMaps()
514 compare(QVariant::fromValue(Tag{1, input}), "\xc1" + output); in tags()
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()
545 compare(QVariant::fromValue(Tag{1, QVariant::fromValue(Tag{1, input})}), "\xc1\xc1" + output); in tags()
563 // make a list with 32 elements (1 << 5) in arrays()
576 compare(list, raw("\x99\1\0") + longoutput); in arrays()
598 compare(make_map({{1, input}}), "\xa1\1" + output); in maps()
601 compare(make_map({{1, input}, {input, 24}}), "\xa2\1" + output + output + "\x18\x18"); in maps()
608 Map map{{1, input}}; in maps()
609 QByteArray longoutput = "\1" + output; in maps()
611 // make a map with 32 elements (1 << 5) in maps()
624 compare(QVariant::fromValue(map), raw("\xb9\1\0") + longoutput); in maps()
629 compare(make_map({{1, make_map({{2, input}})}}), "\xa1\1\xa1\2" + output); in maps()
632 …compare(make_map({{1, make_map({{2, input}, {input, false}})}}), "\xa1\1\xa2\2" + output + output … in maps()
635 …compare(make_map({{1, make_map({{2, input}})}, {input, false}}), "\xa2\1\xa1\2" + output + output … in maps()
658 QByteArray buffer(output.length() + 1, Qt::Uninitialized); in tooShortArrays()
672 QByteArray buffer(output.length() + 1, Qt::Uninitialized); in tooShortMaps()
686 QByteArray buffer(output.length() * 2 + 1, Qt::Uninitialized); in tooBigArrays()
690 QCOMPARE(cbor_encoder_create_array(&encoder, &container, 1), CborNoError); in tooBigArrays()
701 QByteArray buffer(output.length() * 3 + 1, Qt::Uninitialized); in tooBigMaps()
705 QCOMPARE(cbor_encoder_create_map(&encoder, &container, 1), CborNoError); in tooBigMaps()