aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2011-10-20 20:28:22 +1000
committerQt by Nokia <qt-info@nokia.com>2011-11-01 08:14:08 +0100
commit1cb5f20f17ea08b2cc7cd7bcd28b7c658b6dbb66 (patch)
tree8ad4f91d87b91a2e8610dc8f189142d1669528f2 /tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp
parent2147b43b811100240103b002d767452e966f6eae (diff)
Add non-floats to particle type
booleans exposed for the 1.0 or 0.0 floats, and color exposed as 0.0-1.0 even though it's 0-255 internally. Change-Id: Idc7ab2527fef150fddb077fc73ac1c7cf122cfdd Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp')
-rw-r--r--tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp b/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp
index 4fd23db238..1b2c431191 100644
--- a/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp
+++ b/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp
@@ -70,6 +70,9 @@ void tst_qquickcustomaffector::test_basic()
foreach (QQuickParticleData *d, system->groupData[0]->data) {
if (d->t == -1)
continue; //Particle data unused
+ //in CI the whole simulation often happens at once, so dead particles end up missing out
+ if (!d->stillAlive())
+ continue; //parameters no longer get set once you die
QCOMPARE(d->x, 100.f);
QCOMPARE(d->y, 100.f);
@@ -80,6 +83,11 @@ void tst_qquickcustomaffector::test_basic()
QCOMPARE(d->lifeSpan, 0.5f);
QCOMPARE(d->size, 100.f);
QCOMPARE(d->endSize, 100.f);
+ QCOMPARE(d->autoRotate, 1.f);
+ QCOMPARE(d->color.r, (uchar)0);
+ QCOMPARE(d->color.g, (uchar)255);
+ QCOMPARE(d->color.b, (uchar)0);
+ QCOMPARE(d->color.a, (uchar)0);
QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0)));
}
}