From 261a744010b0cd05172584a46e1d7de8fd5c8c9e Mon Sep 17 00:00:00 2001 From: Paul Lemire Date: Wed, 9 Dec 2015 12:21:53 +0100 Subject: Updated Entity unit tests Change-Id: I4de1a5662b50781e06bcfc8474c895e77cbd8851 Reviewed-by: Paul Lemire --- tests/auto/render/entity/tst_entity.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/auto/render/entity/tst_entity.cpp b/tests/auto/render/entity/tst_entity.cpp index 0d828c5e2..a6e713bc8 100644 --- a/tests/auto/render/entity/tst_entity.cpp +++ b/tests/auto/render/entity/tst_entity.cpp @@ -48,6 +48,7 @@ #include #include #include +#include typedef Qt3DCore::QNodeId (*UuidMethod)(Qt3DRender::Render::Entity *); typedef QList (*UuidListMethod)(Qt3DRender::Render::Entity *); @@ -65,6 +66,7 @@ QNodeId materialUuid(Entity *entity) { return entity->componentUuid(); QNodeId geometryRendererUuid(Entity *entity) { return entity->componentUuid(); } QNodeId objectPickerUuid(Entity *entity) { return entity->componentUuid(); } QNodeId boundingVolumeDebugUuid(Entity *entity) { return entity->componentUuid(); } +QNodeId computeJobUuid(Entity *entity) { return entity->componentUuid(); } QList layersUuid(Entity *entity) { return entity->componentsUuid(); } QList shadersUuid(Entity *entity) { return entity->componentsUuid(); } @@ -90,7 +92,8 @@ private slots: << new QObjectPicker << new QLayer << new QShaderData - << new QBoundingVolumeDebug; + << new QBoundingVolumeDebug + << new QComputeJob; QTest::newRow("all components") << components; } @@ -108,6 +111,7 @@ private slots: QVERIFY(entity.componentUuid().isNull()); QVERIFY(entity.componentUuid().isNull()); QVERIFY(entity.componentUuid().isNull()); + QVERIFY(entity.componentUuid().isNull()); QVERIFY(entity.componentsUuid().isEmpty()); QVERIFY(entity.componentsUuid().isEmpty()); QVERIFY(!entity.isBoundingVolumeDirty()); @@ -128,6 +132,7 @@ private slots: QVERIFY(!entity.componentUuid().isNull()); QVERIFY(!entity.componentUuid().isNull()); QVERIFY(!entity.componentsUuid().isEmpty()); + QVERIFY(!entity.componentsUuid().isEmpty()); QVERIFY(!entity.componentsUuid().isEmpty()); QVERIFY(entity.isBoundingVolumeDirty()); @@ -142,6 +147,7 @@ private slots: QVERIFY(entity.componentUuid().isNull()); QVERIFY(entity.componentUuid().isNull()); QVERIFY(entity.componentsUuid().isEmpty()); + QVERIFY(entity.componentsUuid().isEmpty()); QVERIFY(entity.componentsUuid().isEmpty()); QVERIFY(!entity.isBoundingVolumeDirty()); } @@ -168,6 +174,9 @@ private slots: component = new QBoundingVolumeDebug; QTest::newRow("boundingVolumeDebug") << component << reinterpret_cast(boundingVolumeDebugUuid); + + component = new QComputeJob; + QTest::newRow("computeJob") << component << reinterpret_cast(computeJobUuid); } void shouldHandleSingleComponentEvents() -- cgit v1.2.3