summaryrefslogtreecommitdiffstats
path: root/tests/auto/render/entity/tst_entity.cpp
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-05-24 12:09:44 +0100
committerSean Harmer <sean.harmer@kdab.com>2017-05-24 12:10:02 +0100
commit77d294db076dac19e8b549b445ffede9f7260c84 (patch)
tree828ee7a6862ec5c0bd24f97cb540625a2c647376 /tests/auto/render/entity/tst_entity.cpp
parent59f8fec8a41606b3185fe3a4e276978e3e1ed5ef (diff)
parent939b9b4b7591e8a421cf048a0a84ed3e75d81d21 (diff)
Merge branch 'dev' into wip/animationwip/animation
Diffstat (limited to 'tests/auto/render/entity/tst_entity.cpp')
-rw-r--r--tests/auto/render/entity/tst_entity.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/auto/render/entity/tst_entity.cpp b/tests/auto/render/entity/tst_entity.cpp
index 0bd3a6054..d1a222c92 100644
--- a/tests/auto/render/entity/tst_entity.cpp
+++ b/tests/auto/render/entity/tst_entity.cpp
@@ -38,6 +38,7 @@
#include <Qt3DCore/QComponentRemovedChange>
#include <Qt3DCore/QTransform>
+#include <Qt3DRender/QEnvironmentLight>
#include <Qt3DRender/QMesh>
#include <Qt3DRender/QMaterial>
#include <Qt3DRender/QLayer>
@@ -64,6 +65,7 @@ QNodeId computeJobUuid(Entity *entity) { return entity->componentUuid<ComputeCom
QVector<QNodeId> layersUuid(Entity *entity) { return entity->componentsUuid<Layer>(); }
QVector<QNodeId> shadersUuid(Entity *entity) { return entity->componentsUuid<ShaderData>(); }
+QVector<QNodeId> environmentLightsUuid(Entity *entity) { return entity->componentsUuid<EnvironmentLight>(); }
class tst_RenderEntity : public QObject
{
@@ -86,7 +88,8 @@ private slots:
<< new QObjectPicker
<< new QLayer
<< new QShaderData
- << new QComputeCommand;
+ << new QComputeCommand
+ << new QEnvironmentLight;
QTest::newRow("all components") << components;
}
@@ -112,6 +115,7 @@ private slots:
QVERIFY(entity.componentUuid<ComputeCommand>().isNull());
QVERIFY(entity.componentsUuid<Layer>().isEmpty());
QVERIFY(entity.componentsUuid<ShaderData>().isEmpty());
+ QVERIFY(entity.componentsUuid<EnvironmentLight>().isEmpty());
QVERIFY(!entity.isBoundingVolumeDirty());
QVERIFY(entity.childrenHandles().isEmpty());
@@ -139,6 +143,7 @@ private slots:
QVERIFY(!entity.componentUuid<ComputeCommand>().isNull());
QVERIFY(!entity.componentsUuid<Layer>().isEmpty());
QVERIFY(!entity.componentsUuid<ShaderData>().isEmpty());
+ QVERIFY(!entity.componentsUuid<EnvironmentLight>().isEmpty());
QVERIFY(entity.isBoundingVolumeDirty());
QVERIFY(!entity.childrenHandles().isEmpty());
QVERIFY(renderer.dirtyBits() != 0);
@@ -157,6 +162,7 @@ private slots:
QVERIFY(entity.componentUuid<QComputeCommand>().isNull());
QVERIFY(entity.componentsUuid<Layer>().isEmpty());
QVERIFY(entity.componentsUuid<ShaderData>().isEmpty());
+ QVERIFY(entity.componentsUuid<EnvironmentLight>().isEmpty());
QVERIFY(!entity.isBoundingVolumeDirty());
QVERIFY(entity.childrenHandles().isEmpty());
containsAll = entity.containsComponentsOfType<Transform, CameraLens, Material, GeometryRenderer, ObjectPicker, ComputeCommand>();
@@ -236,6 +242,10 @@ private slots:
components.clear();
components << new QShaderData << new QShaderData << new QShaderData;
QTest::newRow("shader data") << components << reinterpret_cast<void*>(shadersUuid);
+
+ components.clear();
+ components << new QEnvironmentLight << new QEnvironmentLight << new QEnvironmentLight;
+ QTest::newRow("environmentLights") << components << reinterpret_cast<void*>(environmentLightsUuid);
}
void shouldHandleComponentsEvents()