39 void UAVObjectsPlugin::testEnumFields()
42 {0, 1}, QString(), QStringLiteral(
"Test some stuff"), {
"No",
"Yes"});
43 quint8 testData[255] = {};
46 QCOMPARE(field->getName(), QStringLiteral(
"TestEnum"));
47 QCOMPARE(field->getValue(0).toString(), QStringLiteral(
"Yes"));
48 QCOMPARE(field->getValue(1).toString(), QStringLiteral(
"Yes"));
49 QVERIFY(!field->isDefaultValue(0));
50 QVERIFY(field->isDefaultValue(1));
53 void UAVObjectsPlugin::testIntFields()
56 {}, QString(), QStringLiteral(
"Test some stuff"), {254, 0}));
57 quint8 testData[255] = {};
59 field->initialize(testData, 0,
nullptr);
60 QCOMPARE(field->getName(), QStringLiteral(
"TestUInt8"));
61 QVERIFY(field->getValue(0).toUInt() == 0);
62 QVERIFY(field->getValue(1).toUInt() == 0);
63 QVERIFY(!field->isDefaultValue(0));
64 QVERIFY(field->isDefaultValue(1));
void initialize(quint8 *data, quint32 dataOffset, UAVObject *obj)