aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/particles/qquickcustomaffector
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/particles/qquickcustomaffector')
-rw-r--r--tests/auto/particles/qquickcustomaffector/data/basic.qml7
-rw-r--r--tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp8
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/particles/qquickcustomaffector/data/basic.qml b/tests/auto/particles/qquickcustomaffector/data/basic.qml
index 7371698026..253c566c66 100644
--- a/tests/auto/particles/qquickcustomaffector/data/basic.qml
+++ b/tests/auto/particles/qquickcustomaffector/data/basic.qml
@@ -54,6 +54,7 @@ Rectangle {
ImageParticle {
source: "../../shared/star.png"
+ rotation: 90
}
Emitter{
@@ -75,6 +76,12 @@ Rectangle {
particles[i].initialAY = 100;
particles[i].startSize = 100;
particles[i].endSize = 100;
+ particles[i].autoRotate = true;
+ particles[i].update = true;
+ particles[i].red = 0;
+ particles[i].green = 1.0;
+ particles[i].blue = 0;
+ particles[i].alpha = 0;
}
}
}
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)));
}
}