diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2011-10-10 18:02:17 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-11 06:42:53 +0200 |
commit | ef85e164c6f5039744d74cfcd54e589461ea012e (patch) | |
tree | a8ea2f4d4a59085e80d15548559d75027a9e5415 /tests/auto/particles/qsggravity | |
parent | 991c3ec5a3eb2ef2a0a8e52d066995d5470f7447 (diff) |
Stabilize Particles tests
One potential problem is that in certain circumstances the recycling
data list is so efficient that it doesn't need to use all particle data
in the list. In those cases, the uninitialized members were causing test
failures but these slight differences are acceptable for the simulation.
The ParticleSystem test is extended to check that it's only small edge
cases.
Change-Id: I5e2f133dc4b96dd05d49e7e983ae630e379fa66a
Reviewed-on: http://codereview.qt-project.org/6312
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'tests/auto/particles/qsggravity')
-rw-r--r-- | tests/auto/particles/qsggravity/tst_qsggravity.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/particles/qsggravity/tst_qsggravity.cpp b/tests/auto/particles/qsggravity/tst_qsggravity.cpp index e99aa1e3c9..e30d261e18 100644 --- a/tests/auto/particles/qsggravity/tst_qsggravity.cpp +++ b/tests/auto/particles/qsggravity/tst_qsggravity.cpp @@ -64,6 +64,9 @@ void tst_qsggravity::test_basic() QCOMPARE(system->groupData[0]->size(), 500); foreach (QSGParticleData *d, system->groupData[0]->data) { + if (d->t == -1) + continue; //Particle data unused + QCOMPARE(d->ax, 707.10678f); QCOMPARE(d->ay, 707.10678f); QCOMPARE(d->lifeSpan, 0.5f); |