From 62af8d46b2d1b0bb1ef79e5a119bd05e5a83aad6 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Wed, 2 Nov 2011 13:44:06 +1000 Subject: [PATCH] Delete view at end of test Change-Id: I290536bd975e7e6f6f65cf964604664faf7d3056 Reviewed-by: Martin Jones --- tests/auto/particles/qquickage/tst_qquickage.cpp | 4 ++++ .../particles/qquickangleddirection/tst_qquickangleddirection.cpp | 1 + .../qquickcumulativedirection/tst_qquickcumulativedirection.cpp | 1 + .../auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp | 2 ++ .../auto/particles/qquickcustomparticle/tst_qquickcustomparticle.cpp | 1 + .../particles/qquickellipseextruder/tst_qquickellipseextruder.cpp | 2 ++ tests/auto/particles/qquickfriction/tst_qquickfriction.cpp | 2 ++ tests/auto/particles/qquickgravity/tst_qquickgravity.cpp | 1 + tests/auto/particles/qquickgroupgoal/tst_qquickgroupgoal.cpp | 1 + tests/auto/particles/qquickimageparticle/tst_qquickimageparticle.cpp | 5 +++++ tests/auto/particles/qquickitemparticle/tst_qquickitemparticle.cpp | 1 + tests/auto/particles/qquicklineextruder/tst_qquicklineextruder.cpp | 1 + tests/auto/particles/qquickmaskextruder/tst_qquickmaskextruder.cpp | 1 + tests/auto/particles/qquickparticlegroup/tst_qquickparticlegroup.cpp | 1 + .../auto/particles/qquickparticlesystem/tst_qquickparticlesystem.cpp | 1 + .../auto/particles/qquickpointattractor/tst_qquickpointattractor.cpp | 1 + .../auto/particles/qquickpointdirection/tst_qquickpointdirection.cpp | 1 + .../qquickrectangleextruder/tst_qquickrectangleextruder.cpp | 1 + tests/auto/particles/qquickspritegoal/tst_qquickspritegoal.cpp | 1 + .../particles/qquicktargetdirection/tst_qquicktargetdirection.cpp | 1 + tests/auto/particles/qquicktrailemitter/tst_qquicktrailemitter.cpp | 1 + tests/auto/particles/qquickturbulence/tst_qquickturbulence.cpp | 1 + tests/auto/particles/qquickwander/tst_qquickwander.cpp | 1 + 23 files changed, 33 insertions(+) diff --git a/tests/auto/particles/qquickage/tst_qquickage.cpp b/tests/auto/particles/qquickage/tst_qquickage.cpp index 74cd297..b787a73 100644 --- a/tests/auto/particles/qquickage/tst_qquickage.cpp +++ b/tests/auto/particles/qquickage/tst_qquickage.cpp @@ -84,6 +84,7 @@ void tst_qquickage::test_kill() QCOMPARE(d->endSize, 32.f); QVERIFY(d->t <= ((qreal)system->timeInt/1000.0) - 0.5f + EPSILON); } + delete view; } void tst_qquickage::test_jump() @@ -109,6 +110,7 @@ void tst_qquickage::test_jump() QCOMPARE(d->endSize, 32.f); QVERIFY(d->t <= ((qreal)system->timeInt/1000.0) - 0.4f + EPSILON); } + delete view; } void tst_qquickage::test_onceOff() @@ -133,6 +135,7 @@ void tst_qquickage::test_onceOff() QCOMPARE(d->endSize, 32.f); QVERIFY(d->t <= ((qreal)system->timeInt/1000.0) - 0.4f + EPSILON); } + delete view; } void tst_qquickage::test_sustained() @@ -158,6 +161,7 @@ void tst_qquickage::test_sustained() QCOMPARE(d->endSize, 32.f); QVERIFY(myFuzzyCompare(d->t, ((qreal)system->timeInt/1000.0) - 0.4f)); } + delete view; } QTEST_MAIN(tst_qquickage); diff --git a/tests/auto/particles/qquickangleddirection/tst_qquickangleddirection.cpp b/tests/auto/particles/qquickangleddirection/tst_qquickangleddirection.cpp index 5310d14..4e3fda3 100644 --- a/tests/auto/particles/qquickangleddirection/tst_qquickangleddirection.cpp +++ b/tests/auto/particles/qquickangleddirection/tst_qquickangleddirection.cpp @@ -85,6 +85,7 @@ void tst_qquickangleddirection::test_basic() QCOMPARE(d->endSize, 32.f); QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0))); } + delete view; } QTEST_MAIN(tst_qquickangleddirection); diff --git a/tests/auto/particles/qquickcumulativedirection/tst_qquickcumulativedirection.cpp b/tests/auto/particles/qquickcumulativedirection/tst_qquickcumulativedirection.cpp index eeecbe4..22c2d5e 100644 --- a/tests/auto/particles/qquickcumulativedirection/tst_qquickcumulativedirection.cpp +++ b/tests/auto/particles/qquickcumulativedirection/tst_qquickcumulativedirection.cpp @@ -81,6 +81,7 @@ void tst_qquickcumulativedirection::test_basic() QCOMPARE(d->endSize, 32.f); QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0))); } + delete view; } QTEST_MAIN(tst_qquickcumulativedirection); diff --git a/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp b/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp index 1b2c431..c33895e 100644 --- a/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp +++ b/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp @@ -90,6 +90,7 @@ void tst_qquickcustomaffector::test_basic() QCOMPARE(d->color.a, (uchar)0); QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0))); } + delete view; } void tst_qquickcustomaffector::test_move() @@ -116,6 +117,7 @@ void tst_qquickcustomaffector::test_move() QCOMPARE(d->endSize, 32.f); QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0))); } + delete view; } QTEST_MAIN(tst_qquickcustomaffector); diff --git a/tests/auto/particles/qquickcustomparticle/tst_qquickcustomparticle.cpp b/tests/auto/particles/qquickcustomparticle/tst_qquickcustomparticle.cpp index 9333ac4..60977b2 100644 --- a/tests/auto/particles/qquickcustomparticle/tst_qquickcustomparticle.cpp +++ b/tests/auto/particles/qquickcustomparticle/tst_qquickcustomparticle.cpp @@ -86,6 +86,7 @@ void tst_qquickcustomparticle::test_basic() if (d->r != 0.0 ) oneNonZero = true; } + delete view; QVERIFY(oneNonZero);//Zero is a valid value, but it also needs to be set to a random number } diff --git a/tests/auto/particles/qquickellipseextruder/tst_qquickellipseextruder.cpp b/tests/auto/particles/qquickellipseextruder/tst_qquickellipseextruder.cpp index ea2139c..683eb49 100644 --- a/tests/auto/particles/qquickellipseextruder/tst_qquickellipseextruder.cpp +++ b/tests/auto/particles/qquickellipseextruder/tst_qquickellipseextruder.cpp @@ -97,6 +97,7 @@ void tst_qquickellipseextruder::test_basic() QCOMPARE(d->endSize, 32.f); QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0))); } + //Just border QCOMPARE(system->groupData[1]->size(), 500); foreach (QQuickParticleData *d, system->groupData[1]->data) { @@ -113,6 +114,7 @@ void tst_qquickellipseextruder::test_basic() QCOMPARE(d->endSize, 32.f); QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0))); } + delete view; } QTEST_MAIN(tst_qquickellipseextruder); diff --git a/tests/auto/particles/qquickfriction/tst_qquickfriction.cpp b/tests/auto/particles/qquickfriction/tst_qquickfriction.cpp index c9070cf..bea3e18 100644 --- a/tests/auto/particles/qquickfriction/tst_qquickfriction.cpp +++ b/tests/auto/particles/qquickfriction/tst_qquickfriction.cpp @@ -101,6 +101,7 @@ void tst_qquickfriction::test_basic() QCOMPARE(d->endSize, 32.f); QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0))); } + delete view; } void tst_qquickfriction::test_threshold() @@ -127,6 +128,7 @@ void tst_qquickfriction::test_threshold() QCOMPARE(d->endSize, 32.f); QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0))); } + delete view; } QTEST_MAIN(tst_qquickfriction); diff --git a/tests/auto/particles/qquickgravity/tst_qquickgravity.cpp b/tests/auto/particles/qquickgravity/tst_qquickgravity.cpp index 41c63de..a80c5c5 100644 --- a/tests/auto/particles/qquickgravity/tst_qquickgravity.cpp +++ b/tests/auto/particles/qquickgravity/tst_qquickgravity.cpp @@ -77,6 +77,7 @@ void tst_qquickgravity::test_basic() QCOMPARE(d->endSize, 32.f); QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0))); } + delete view; } QTEST_MAIN(tst_qquickgravity); diff --git a/tests/auto/particles/qquickgroupgoal/tst_qquickgroupgoal.cpp b/tests/auto/particles/qquickgroupgoal/tst_qquickgroupgoal.cpp index 80a5689..92f30d9 100644 --- a/tests/auto/particles/qquickgroupgoal/tst_qquickgroupgoal.cpp +++ b/tests/auto/particles/qquickgroupgoal/tst_qquickgroupgoal.cpp @@ -82,6 +82,7 @@ void tst_qquickgroupgoal::test_instantTransition() QCOMPARE(d->endSize, 32.f); QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0))); } + delete view; } QTEST_MAIN(tst_qquickgroupgoal); diff --git a/tests/auto/particles/qquickimageparticle/tst_qquickimageparticle.cpp b/tests/auto/particles/qquickimageparticle/tst_qquickimageparticle.cpp index 45f7123..27b386d 100644 --- a/tests/auto/particles/qquickimageparticle/tst_qquickimageparticle.cpp +++ b/tests/auto/particles/qquickimageparticle/tst_qquickimageparticle.cpp @@ -105,6 +105,7 @@ void tst_qquickimageparticle::test_basic() QCOMPARE(d->frameCount, 1.0f); QCOMPARE(d->animT, -1.0f); } + delete view; } @@ -148,6 +149,7 @@ void tst_qquickimageparticle::test_colored() QCOMPARE(d->frameCount, 1.0f); QCOMPARE(d->animT, -1.0f); } + delete view; } @@ -191,6 +193,7 @@ void tst_qquickimageparticle::test_deformed() QCOMPARE(d->frameCount, 1.0f); QCOMPARE(d->animT, -1.0f); } + delete view; } @@ -235,6 +238,7 @@ void tst_qquickimageparticle::test_tabled() QCOMPARE(d->animT, -1.0f); //TODO: This performance level doesn't alter particleData, but goes straight to shaders. Find something to test } + delete view; } @@ -278,6 +282,7 @@ void tst_qquickimageparticle::test_sprite() QCOMPARE(d->animWidth, 31.0f); QCOMPARE(d->animHeight, 30.0f); } + delete view; } QTEST_MAIN(tst_qquickimageparticle); diff --git a/tests/auto/particles/qquickitemparticle/tst_qquickitemparticle.cpp b/tests/auto/particles/qquickitemparticle/tst_qquickitemparticle.cpp index c681e2c..6cfb6c5 100644 --- a/tests/auto/particles/qquickitemparticle/tst_qquickitemparticle.cpp +++ b/tests/auto/particles/qquickitemparticle/tst_qquickitemparticle.cpp @@ -88,6 +88,7 @@ void tst_qquickitemparticle::test_basic() QVERIFY(d->delegate); QVERIFY(qobject_cast(d->delegate)); } + delete view; } QTEST_MAIN(tst_qquickitemparticle); diff --git a/tests/auto/particles/qquicklineextruder/tst_qquicklineextruder.cpp b/tests/auto/particles/qquicklineextruder/tst_qquicklineextruder.cpp index 4929d02..69d87ac 100644 --- a/tests/auto/particles/qquicklineextruder/tst_qquicklineextruder.cpp +++ b/tests/auto/particles/qquicklineextruder/tst_qquicklineextruder.cpp @@ -96,6 +96,7 @@ void tst_qquicklineextruder::test_basic() QCOMPARE(d->endSize, 32.f); QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0))); } + delete view; } QTEST_MAIN(tst_qquicklineextruder); diff --git a/tests/auto/particles/qquickmaskextruder/tst_qquickmaskextruder.cpp b/tests/auto/particles/qquickmaskextruder/tst_qquickmaskextruder.cpp index 5d154d7..c13a776 100644 --- a/tests/auto/particles/qquickmaskextruder/tst_qquickmaskextruder.cpp +++ b/tests/auto/particles/qquickmaskextruder/tst_qquickmaskextruder.cpp @@ -81,6 +81,7 @@ void tst_qquickmaskextruder::test_basic() QCOMPARE(d->endSize, 32.f); QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0))); } + delete view; } QTEST_MAIN(tst_qquickmaskextruder); diff --git a/tests/auto/particles/qquickparticlegroup/tst_qquickparticlegroup.cpp b/tests/auto/particles/qquickparticlegroup/tst_qquickparticlegroup.cpp index c3b155a..2548d87 100644 --- a/tests/auto/particles/qquickparticlegroup/tst_qquickparticlegroup.cpp +++ b/tests/auto/particles/qquickparticlegroup/tst_qquickparticlegroup.cpp @@ -82,6 +82,7 @@ void tst_qquickparticlegroup::test_instantTransition() QCOMPARE(d->endSize, 32.f); QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0))); } + delete view; } QTEST_MAIN(tst_qquickparticlegroup); diff --git a/tests/auto/particles/qquickparticlesystem/tst_qquickparticlesystem.cpp b/tests/auto/particles/qquickparticlesystem/tst_qquickparticlesystem.cpp index d0e4727..f9bb971 100644 --- a/tests/auto/particles/qquickparticlesystem/tst_qquickparticlesystem.cpp +++ b/tests/auto/particles/qquickparticlesystem/tst_qquickparticlesystem.cpp @@ -84,6 +84,7 @@ void tst_qquickparticlesystem::test_basic() QCOMPARE(d->endSize, 32.f); QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0))); } + delete view; QVERIFY(extremelyFuzzyCompare(stillAlive, 500, 5));//Small simulation variance is permissible. } diff --git a/tests/auto/particles/qquickpointattractor/tst_qquickpointattractor.cpp b/tests/auto/particles/qquickpointattractor/tst_qquickpointattractor.cpp index a0c1b65..e6b1b6e 100644 --- a/tests/auto/particles/qquickpointattractor/tst_qquickpointattractor.cpp +++ b/tests/auto/particles/qquickpointattractor/tst_qquickpointattractor.cpp @@ -82,6 +82,7 @@ void tst_qquickpointattractor::test_basic() QCOMPARE(d->endSize, 32.f); QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0))); } + delete view; } QTEST_MAIN(tst_qquickpointattractor); diff --git a/tests/auto/particles/qquickpointdirection/tst_qquickpointdirection.cpp b/tests/auto/particles/qquickpointdirection/tst_qquickpointdirection.cpp index 0b83a41..b554ba7 100644 --- a/tests/auto/particles/qquickpointdirection/tst_qquickpointdirection.cpp +++ b/tests/auto/particles/qquickpointdirection/tst_qquickpointdirection.cpp @@ -83,6 +83,7 @@ void tst_qquickpointdirection::test_basic() QCOMPARE(d->endSize, 32.f); QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0))); } + delete view; } QTEST_MAIN(tst_qquickpointdirection); diff --git a/tests/auto/particles/qquickrectangleextruder/tst_qquickrectangleextruder.cpp b/tests/auto/particles/qquickrectangleextruder/tst_qquickrectangleextruder.cpp index 8e92e8e..d8c17ef 100644 --- a/tests/auto/particles/qquickrectangleextruder/tst_qquickrectangleextruder.cpp +++ b/tests/auto/particles/qquickrectangleextruder/tst_qquickrectangleextruder.cpp @@ -106,6 +106,7 @@ void tst_qquickrectangleextruder::test_basic() QCOMPARE(d->endSize, 32.f); QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0))); } + delete view; } QTEST_MAIN(tst_qquickrectangleextruder); diff --git a/tests/auto/particles/qquickspritegoal/tst_qquickspritegoal.cpp b/tests/auto/particles/qquickspritegoal/tst_qquickspritegoal.cpp index e8b42e6..9bb19d2 100644 --- a/tests/auto/particles/qquickspritegoal/tst_qquickspritegoal.cpp +++ b/tests/auto/particles/qquickspritegoal/tst_qquickspritegoal.cpp @@ -73,6 +73,7 @@ void tst_qquickspritegoal::test_instantTransition() QCOMPARE(d->animIdx, 1.f);//Spawns at 0, affector moves it. QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0))); } + delete view; } QTEST_MAIN(tst_qquickspritegoal); diff --git a/tests/auto/particles/qquicktargetdirection/tst_qquicktargetdirection.cpp b/tests/auto/particles/qquicktargetdirection/tst_qquicktargetdirection.cpp index 6e21aef..789334e 100644 --- a/tests/auto/particles/qquicktargetdirection/tst_qquicktargetdirection.cpp +++ b/tests/auto/particles/qquicktargetdirection/tst_qquicktargetdirection.cpp @@ -81,6 +81,7 @@ void tst_qquicktargetdirection::test_basic() QCOMPARE(d->endSize, 32.f); QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0))); } + delete view; } QTEST_MAIN(tst_qquicktargetdirection); diff --git a/tests/auto/particles/qquicktrailemitter/tst_qquicktrailemitter.cpp b/tests/auto/particles/qquicktrailemitter/tst_qquicktrailemitter.cpp index d5e01a6..89463b6 100644 --- a/tests/auto/particles/qquicktrailemitter/tst_qquicktrailemitter.cpp +++ b/tests/auto/particles/qquicktrailemitter/tst_qquicktrailemitter.cpp @@ -98,6 +98,7 @@ void tst_qquicktrailemitter::test_basic() QCOMPARE(d->endSize, 32.f); QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0))); } + delete view; } QTEST_MAIN(tst_qquicktrailemitter); diff --git a/tests/auto/particles/qquickturbulence/tst_qquickturbulence.cpp b/tests/auto/particles/qquickturbulence/tst_qquickturbulence.cpp index 519307e..9f4d50c 100644 --- a/tests/auto/particles/qquickturbulence/tst_qquickturbulence.cpp +++ b/tests/auto/particles/qquickturbulence/tst_qquickturbulence.cpp @@ -79,6 +79,7 @@ void tst_qquickturbulence::test_basic() QCOMPARE(d->endSize, 32.f); QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0))); } + delete view; } QTEST_MAIN(tst_qquickturbulence); diff --git a/tests/auto/particles/qquickwander/tst_qquickwander.cpp b/tests/auto/particles/qquickwander/tst_qquickwander.cpp index 54aded8..ac88b58 100644 --- a/tests/auto/particles/qquickwander/tst_qquickwander.cpp +++ b/tests/auto/particles/qquickwander/tst_qquickwander.cpp @@ -85,6 +85,7 @@ void tst_qquickwander::test_basic() if (d->vy != 0.0f) vyChanged = true; } + delete view; QVERIFY(vxChanged); QVERIFY(vyChanged); } -- 2.7.4