diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2016-02-25 15:54:36 +0100 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2016-02-29 14:51:33 +0000 |
commit | c3f21b4e2834fd257157728e306aef11f06e01d8 (patch) | |
tree | 77eb89e5906a8a076345a7b4825cd1ee0c8c852a /tests | |
parent | 7994e86c0e6fd14954cc4a6092509132251cb006 (diff) |
QAttribute API changes
- rename dataType to vertexBaseType
- rename dataSize to vertexSize
Change-Id: I0eca7054dd69e8aac69bc1d7d5023a7ca6ca9da2
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/render/attribute/tst_attribute.cpp | 20 | ||||
-rw-r--r-- | tests/auto/render/qattribute/tst_qattribute.cpp | 8 |
2 files changed, 14 insertions, 14 deletions
diff --git a/tests/auto/render/attribute/tst_attribute.cpp b/tests/auto/render/attribute/tst_attribute.cpp index 2a7874b44..cce07bd55 100644 --- a/tests/auto/render/attribute/tst_attribute.cpp +++ b/tests/auto/render/attribute/tst_attribute.cpp @@ -63,8 +63,8 @@ private Q_SLOTS: // THEN QCOMPARE(renderAttribute.peerUuid(), attribute.id()); QCOMPARE(renderAttribute.isDirty(), true); - QCOMPARE(renderAttribute.dataType(), attribute.dataType()); - QCOMPARE(renderAttribute.dataSize(), attribute.dataSize()); + QCOMPARE(renderAttribute.vertexBaseType(), attribute.vertexBaseType()); + QCOMPARE(renderAttribute.vertexSize(), attribute.vertexSize()); QCOMPARE(renderAttribute.attributeType(), attribute.attributeType()); QCOMPARE(renderAttribute.byteOffset(), attribute.byteOffset()); QCOMPARE(renderAttribute.byteStride(), attribute.byteStride()); @@ -86,8 +86,8 @@ private Q_SLOTS: QVERIFY(renderAttribute.bufferId().isNull()); QVERIFY(renderAttribute.name().isEmpty()); QCOMPARE(renderAttribute.isDirty(), false); - QCOMPARE(renderAttribute.dataType(), Qt3DRender::QAttribute::Float); - QCOMPARE(renderAttribute.dataSize(), 1U); + QCOMPARE(renderAttribute.vertexBaseType(), Qt3DRender::QAttribute::Float); + QCOMPARE(renderAttribute.vertexSize(), 1U); QCOMPARE(renderAttribute.attributeType(), Qt3DRender::QAttribute::VertexAttribute); QCOMPARE(renderAttribute.byteOffset(), 0U); QCOMPARE(renderAttribute.byteStride(), 0U); @@ -118,8 +118,8 @@ private Q_SLOTS: QVERIFY(renderAttribute.bufferId().isNull()); QVERIFY(renderAttribute.name().isEmpty()); QCOMPARE(renderAttribute.isDirty(), false); - QCOMPARE(renderAttribute.dataType(), Qt3DRender::QAttribute::Float); - QCOMPARE(renderAttribute.dataSize(), 1U); + QCOMPARE(renderAttribute.vertexBaseType(), Qt3DRender::QAttribute::Float); + QCOMPARE(renderAttribute.vertexSize(), 1U); QCOMPARE(renderAttribute.attributeType(), Qt3DRender::QAttribute::VertexAttribute); QCOMPARE(renderAttribute.byteOffset(), 0U); QCOMPARE(renderAttribute.byteStride(), 0U); @@ -139,11 +139,11 @@ private Q_SLOTS: // WHEN Qt3DCore::QScenePropertyChangePtr updateChange(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId())); updateChange->setValue(static_cast<int>(Qt3DRender::QAttribute::Int)); - updateChange->setPropertyName("dataType"); + updateChange->setPropertyName("vertexBaseType"); renderAttribute.sceneChangeEvent(updateChange); // THEN - QCOMPARE(renderAttribute.dataType(), Qt3DRender::QAttribute::Int); + QCOMPARE(renderAttribute.vertexBaseType(), Qt3DRender::QAttribute::Int); QVERIFY(renderAttribute.isDirty()); QVERIFY(renderer.dirtyBits() != 0); @@ -155,11 +155,11 @@ private Q_SLOTS: // WHEN updateChange.reset(new Qt3DCore::QScenePropertyChange(Qt3DCore::NodeUpdated, Qt3DCore::QSceneChange::Node, Qt3DCore::QNodeId())); updateChange->setValue(3); - updateChange->setPropertyName("dataSize"); + updateChange->setPropertyName("vertexSize"); renderAttribute.sceneChangeEvent(updateChange); // THEN - QCOMPARE(renderAttribute.dataSize(), 3U); + QCOMPARE(renderAttribute.vertexSize(), 3U); QVERIFY(renderAttribute.isDirty()); QVERIFY(renderer.dirtyBits() != 0); diff --git a/tests/auto/render/qattribute/tst_qattribute.cpp b/tests/auto/render/qattribute/tst_qattribute.cpp index 7230334ee..ba7371e0d 100644 --- a/tests/auto/render/qattribute/tst_qattribute.cpp +++ b/tests/auto/render/qattribute/tst_qattribute.cpp @@ -105,8 +105,8 @@ private Q_SLOTS: QCOMPARE(attribute->byteStride(), clone->byteStride()); QCOMPARE(attribute->byteOffset(), clone->byteOffset()); QCOMPARE(attribute->divisor(), clone->divisor()); - QCOMPARE(attribute->dataType(), clone->dataType()); - QCOMPARE(attribute->dataSize(), clone->dataSize()); + QCOMPARE(attribute->vertexBaseType(), clone->vertexBaseType()); + QCOMPARE(attribute->vertexSize(), clone->vertexSize()); QVERIFY(attribute->attributeType() == clone->attributeType()); if (attribute->buffer() != Q_NULLPTR) { @@ -129,7 +129,7 @@ private Q_SLOTS: // THEN QCOMPARE(arbiter.events.size(), 1); Qt3DCore::QScenePropertyChangePtr change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>(); - QCOMPARE(change->propertyName(), "dataType"); + QCOMPARE(change->propertyName(), "vertexBaseType"); QCOMPARE(change->value().value<int>(), static_cast<int>(Qt3DRender::QAttribute::Double)); QCOMPARE(change->type(), Qt3DCore::NodeUpdated); @@ -142,7 +142,7 @@ private Q_SLOTS: // THEN QCOMPARE(arbiter.events.size(), 1); change = arbiter.events.first().staticCast<Qt3DCore::QScenePropertyChange>(); - QCOMPARE(change->propertyName(), "dataSize"); + QCOMPARE(change->propertyName(), "vertexSize"); QCOMPARE(change->value().value<uint>(), 4U); QCOMPARE(change->type(), Qt3DCore::NodeUpdated); |