diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2015-11-04 17:54:27 +0100 |
---|---|---|
committer | Andy Nichols <andy.nichols@theqtcompany.com> | 2015-11-16 09:18:26 +0000 |
commit | 926852fbe0ac9a76e5d10c473142f42cd0c07da4 (patch) | |
tree | 39847e08866299e77d27a12ca15c3a15975fbe2b /tests | |
parent | 6e11c44a5d2de76a6a2d8e96d3918f822ce86374 (diff) |
Entity unit tests updated
Change-Id: I3f3ecc220d5a6ae57e40bb8a3db8cd71f84aa5a9
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/render/entity/tst_entity.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/auto/render/entity/tst_entity.cpp b/tests/auto/render/entity/tst_entity.cpp index 3141ad8eb..7a44df40b 100644 --- a/tests/auto/render/entity/tst_entity.cpp +++ b/tests/auto/render/entity/tst_entity.cpp @@ -47,6 +47,7 @@ #include <Qt3DRender/QShaderData> #include <Qt3DRender/QGeometryRenderer> #include <Qt3DRender/QObjectPicker> +#include <Qt3DRender/QBoundingVolumeDebug> typedef Qt3DCore::QNodeId (*UuidMethod)(Qt3DRender::Render::Entity *); typedef QList<Qt3DCore::QNodeId> (*UuidListMethod)(Qt3DRender::Render::Entity *); @@ -63,6 +64,7 @@ QNodeId cameraLensUuid(Entity *entity) { return entity->componentUuid<CameraLens QNodeId materialUuid(Entity *entity) { return entity->componentUuid<Material>(); } QNodeId geometryRendererUuid(Entity *entity) { return entity->componentUuid<GeometryRenderer>(); } QNodeId objectPickerUuid(Entity *entity) { return entity->componentUuid<ObjectPicker>(); } +QNodeId boundingVolumeDebugUuid(Entity *entity) { return entity->componentUuid<BoundingVolumeDebug>(); } QList<QNodeId> layersUuid(Entity *entity) { return entity->componentsUuid<Layer>(); } QList<QNodeId> shadersUuid(Entity *entity) { return entity->componentsUuid<ShaderData>(); } @@ -87,7 +89,8 @@ private slots: << new QMaterial << new QObjectPicker << new QLayer - << new QShaderData; + << new QShaderData + << new QBoundingVolumeDebug; QTest::newRow("all components") << components; } @@ -104,6 +107,7 @@ private slots: QVERIFY(entity.componentUuid<Material>().isNull()); QVERIFY(entity.componentUuid<GeometryRenderer>().isNull()); QVERIFY(entity.componentUuid<ObjectPicker>().isNull()); + QVERIFY(entity.componentUuid<BoundingVolumeDebug>().isNull()); QVERIFY(entity.componentsUuid<Layer>().isEmpty()); QVERIFY(entity.componentsUuid<ShaderData>().isEmpty()); @@ -121,6 +125,7 @@ private slots: QVERIFY(!entity.componentUuid<Material>().isNull()); QVERIFY(!entity.componentUuid<GeometryRenderer>().isNull()); QVERIFY(!entity.componentUuid<ObjectPicker>().isNull()); + QVERIFY(!entity.componentUuid<BoundingVolumeDebug>().isNull()); QVERIFY(!entity.componentsUuid<Layer>().isEmpty()); QVERIFY(!entity.componentsUuid<ShaderData>().isEmpty()); @@ -133,6 +138,7 @@ private slots: QVERIFY(entity.componentUuid<Material>().isNull()); QVERIFY(entity.componentUuid<GeometryRenderer>().isNull()); QVERIFY(entity.componentUuid<ObjectPicker>().isNull()); + QVERIFY(entity.componentUuid<BoundingVolumeDebug>().isNull()); QVERIFY(entity.componentsUuid<Layer>().isEmpty()); QVERIFY(entity.componentsUuid<ShaderData>().isEmpty()); } @@ -156,6 +162,9 @@ private slots: component = new QObjectPicker; QTest::newRow("objectPicker") << component << reinterpret_cast<void*>(objectPickerUuid); + + component = new QBoundingVolumeDebug; + QTest::newRow("boundingVolumeDebug") << component << reinterpret_cast<void*>(boundingVolumeDebugUuid); } void shouldHandleSingleComponentEvents() |