diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2011-10-20 20:28:22 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-01 08:14:08 +0100 |
commit | 1cb5f20f17ea08b2cc7cd7bcd28b7c658b6dbb66 (patch) | |
tree | 8ad4f91d87b91a2e8610dc8f189142d1669528f2 /tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp | |
parent | 2147b43b811100240103b002d767452e966f6eae (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.cpp | 8 |
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))); } } |