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/qsgpointattractor/tst_qsgpointattractor.cpp | |
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/qsgpointattractor/tst_qsgpointattractor.cpp')
-rw-r--r-- | tests/auto/particles/qsgpointattractor/tst_qsgpointattractor.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/particles/qsgpointattractor/tst_qsgpointattractor.cpp b/tests/auto/particles/qsgpointattractor/tst_qsgpointattractor.cpp index 40877c4aa5..ef3b06a738 100644 --- a/tests/auto/particles/qsgpointattractor/tst_qsgpointattractor.cpp +++ b/tests/auto/particles/qsgpointattractor/tst_qsgpointattractor.cpp @@ -64,6 +64,9 @@ void tst_qsgpointattractor::test_basic() QCOMPARE(system->groupData[0]->size(), 500); foreach (QSGParticleData *d, system->groupData[0]->data) { + if (d->t == -1) + continue; //Particle data unused + QVERIFY(d->x != 0.f); QVERIFY(d->y != 0.f); QVERIFY(d->x == d->y); |