|
@@ -82,8 +82,10 @@ TEST_F(QtTypesQtGuiTest, QMatrix4x4Test)
|
|
qtprotobufnamespace::qttypes::tests::QMatrix4x4Message msg;
|
|
qtprotobufnamespace::qttypes::tests::QMatrix4x4Message msg;
|
|
msg.setTestField({0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15});
|
|
msg.setTestField({0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15});
|
|
auto result = msg.serialize(serializer.get());
|
|
auto result = msg.serialize(serializer.get());
|
|
- EXPECT_TRUE(QByteArray::fromHex("0a518501000070417d0000604175000050416d0000404165000030415d0000204155000010414d00000041450000e0403d0000c040350000a0402d0000804025000040401d00000040150000803f0d00000000") ==
|
|
|
|
- result || QByteArray::fromHex("0a4c150000803f1d0000004025000040402d00008040350000a0403d0000c040450000e0404d0000004155000010415d0000204165000030416d0000404175000050417d00006041850100007041") == result);
|
|
|
|
|
|
+
|
|
|
|
+ EXPECT_TRUE(QByteArray::fromHex("0a518501000070417d0000604175000050416d0000404165000030415d0000204155000010414d00000041450000e0403d0000c040350000a0402d0000804025000040401d00000040150000803f0d00000000") == result
|
|
|
|
+ || QByteArray::fromHex("0a4c150000803f1d0000004025000040402d00008040350000a0403d0000c040450000e0404d0000004155000010415d0000204165000030416d0000404175000050417d00006041850100007041") == result
|
|
|
|
+ || QByteArray::fromHex("0a514d000000410d00000000150000803f1d0000004025000040402d00008040350000a0403d0000c040450000e04055000010415d0000204165000030416d0000404175000050417d00006041850100007041") == result);
|
|
|
|
|
|
msg.setTestField({});
|
|
msg.setTestField({});
|
|
msg.deserialize(serializer.get(), QByteArray::fromHex("0a4c150000803f1d0000004025000040402d00008040350000a0403d0000c040450000e0404d0000004155000010415d0000204165000030416d0000404175000050417d00006041850100007041"));
|
|
msg.deserialize(serializer.get(), QByteArray::fromHex("0a4c150000803f1d0000004025000040402d00008040350000a0403d0000c040450000e0404d0000004155000010415d0000204165000030416d0000404175000050417d00006041850100007041"));
|
|
@@ -98,8 +100,9 @@ TEST_F(QtTypesQtGuiTest, QVector2DTest)
|
|
qtprotobufnamespace::qttypes::tests::QVector2DMessage msg;
|
|
qtprotobufnamespace::qttypes::tests::QVector2DMessage msg;
|
|
msg.setTestField(QVector2D(42, 24));
|
|
msg.setTestField(QVector2D(42, 24));
|
|
auto result = msg.serialize(serializer.get());
|
|
auto result = msg.serialize(serializer.get());
|
|
- EXPECT_TRUE(QByteArray::fromHex("0a0a150000c0410d00002842") ==
|
|
|
|
- result);
|
|
|
|
|
|
+
|
|
|
|
+ EXPECT_TRUE(QByteArray::fromHex("0a0a150000c0410d00002842") == result
|
|
|
|
+ || QByteArray::fromHex("0a0a0d00002842150000c041") == result);
|
|
|
|
|
|
msg.setTestField({});
|
|
msg.setTestField({});
|
|
msg.deserialize(serializer.get(), QByteArray::fromHex("0a0a0d0000c0411500002842"));
|
|
msg.deserialize(serializer.get(), QByteArray::fromHex("0a0a0d0000c0411500002842"));
|
|
@@ -114,8 +117,9 @@ TEST_F(QtTypesQtGuiTest, QVector3DTest)
|
|
qtprotobufnamespace::qttypes::tests::QVector3DMessage msg;
|
|
qtprotobufnamespace::qttypes::tests::QVector3DMessage msg;
|
|
msg.setTestField(QVector3D(42, 24, 11));
|
|
msg.setTestField(QVector3D(42, 24, 11));
|
|
auto result = msg.serialize(serializer.get());
|
|
auto result = msg.serialize(serializer.get());
|
|
- EXPECT_TRUE(QByteArray::fromHex("0a0f1d00003041150000c0410d00002842") ==
|
|
|
|
- result);
|
|
|
|
|
|
+
|
|
|
|
+ EXPECT_TRUE(QByteArray::fromHex("0a0f1d00003041150000c0410d00002842") == result
|
|
|
|
+ || QByteArray::fromHex("0a0f0d00002842150000c0411d00003041") == result);
|
|
|
|
|
|
msg.setTestField({});
|
|
msg.setTestField({});
|
|
msg.deserialize(serializer.get(), QByteArray::fromHex("0a0f0d0000c04115000030411d00002842"));
|
|
msg.deserialize(serializer.get(), QByteArray::fromHex("0a0f0d0000c04115000030411d00002842"));
|
|
@@ -130,8 +134,10 @@ TEST_F(QtTypesQtGuiTest, QVector4DTest)
|
|
qtprotobufnamespace::qttypes::tests::QVector4DMessage msg;
|
|
qtprotobufnamespace::qttypes::tests::QVector4DMessage msg;
|
|
msg.setTestField({24, 11, 42, 0});
|
|
msg.setTestField({24, 11, 42, 0});
|
|
auto result = msg.serialize(serializer.get());
|
|
auto result = msg.serialize(serializer.get());
|
|
- EXPECT_TRUE(QByteArray::fromHex("0a1425000000001d0000284215000030410d0000c041") ==
|
|
|
|
- result || QByteArray::fromHex("0a0f0d0000c04115000030411d00002842") == result);
|
|
|
|
|
|
+
|
|
|
|
+ EXPECT_TRUE(QByteArray::fromHex("0a1425000000001d0000284215000030410d0000c041") == result
|
|
|
|
+ || QByteArray::fromHex("0a0f0d0000c04115000030411d00002842") == result
|
|
|
|
+ || QByteArray::fromHex("0a140d0000c04115000030411d000028422500000000") == result);
|
|
|
|
|
|
msg.setTestField({});
|
|
msg.setTestField({});
|
|
msg.deserialize(serializer.get(), QByteArray::fromHex("0a0f0d0000c04115000030411d00002842"));
|
|
msg.deserialize(serializer.get(), QByteArray::fromHex("0a0f0d0000c04115000030411d00002842"));
|
|
@@ -146,8 +152,10 @@ TEST_F(QtTypesQtGuiTest, QTransformTest)
|
|
qtprotobufnamespace::qttypes::tests::QTransformMessage msg;
|
|
qtprotobufnamespace::qttypes::tests::QTransformMessage msg;
|
|
msg.setTestField(QTransform(0, 1, 2, 3, 4, 5, 6, 7, 8));
|
|
msg.setTestField(QTransform(0, 1, 2, 3, 4, 5, 6, 7, 8));
|
|
auto result = msg.serialize(serializer.get());
|
|
auto result = msg.serialize(serializer.get());
|
|
- EXPECT_TRUE(QByteArray::fromHex("0a51490000000000002040410000000000001c4039000000000000184031000000000000144029000000000000104021000000000000084019000000000000004011000000000000f03f090000000000000000") ==
|
|
|
|
- result || QByteArray::fromHex("0a4811000000000000f03f190000000000000040210000000000000840290000000000001040310000000000001440390000000000001840410000000000001c40490000000000002040") == result);
|
|
|
|
|
|
+
|
|
|
|
+ EXPECT_TRUE(QByteArray::fromHex("0a51490000000000002040410000000000001c4039000000000000184031000000000000144029000000000000104021000000000000084019000000000000004011000000000000f03f090000000000000000") == result
|
|
|
|
+ || QByteArray::fromHex("0a4811000000000000f03f190000000000000040210000000000000840290000000000001040310000000000001440390000000000001840410000000000001c40490000000000002040") == result
|
|
|
|
+ || QByteArray::fromHex("0a5149000000000000204009000000000000000011000000000000f03f190000000000000040210000000000000840290000000000001040310000000000001440390000000000001840410000000000001c40") == result);
|
|
|
|
|
|
msg.setTestField({});
|
|
msg.setTestField({});
|
|
msg.deserialize(serializer.get(), QByteArray::fromHex("0a48090000000000002040110000000000001c4019000000000000184021000000000000144029000000000000104031000000000000084039000000000000004041000000000000f03f"));
|
|
msg.deserialize(serializer.get(), QByteArray::fromHex("0a48090000000000002040110000000000001c4019000000000000184021000000000000144029000000000000104031000000000000084039000000000000004041000000000000f03f"));
|