Add .pro file to auto test dir
authorAlan Alpert <alan.alpert@nokia.com>
Tue, 4 Oct 2011 07:27:39 +0000 (17:27 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 5 Oct 2011 08:41:32 +0000 (10:41 +0200)
Also stabilize some tests

Change-Id: I1b508756ffca6a05d495c52d84f46fcaeafe879a
Reviewed-on: http://codereview.qt-project.org/5952
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
tests/auto/auto.pro
tests/auto/particles/particles.pro [new file with mode: 0644]
tests/auto/particles/qsgage/tst_qsgage.cpp
tests/auto/particles/qsgcustomaffector/tst_qsgcustomaffector.cpp

index b831ece..44ed571 100644 (file)
@@ -1,6 +1,7 @@
 TEMPLATE=subdirs
 SUBDIRS=\
-    declarative
+    declarative \
+    particles
 
 # ### refactor: port properly
 # contains(QT_CONFIG, qmltest): SUBDIRS += qmltest
diff --git a/tests/auto/particles/particles.pro b/tests/auto/particles/particles.pro
new file mode 100644 (file)
index 0000000..2c793a9
--- /dev/null
@@ -0,0 +1,28 @@
+TEMPLATE = subdirs
+
+PRIVATETESTS += \
+    qsgage \
+    qsgangleddirection \
+    qsgcumulativedirection \
+    qsgcustomaffector \
+    qsgcustomparticle \
+    qsgellipseextruder \
+    qsgfriction \
+    qsggravity \
+    qsgimageparticle \
+    qsgitemparticle \
+    qsglineextruder \
+    qsgmaskextruder \
+    qsgparticlegroup \
+    qsgparticlesystem \
+    qsgpointattractor \
+    qsgpointdirection \
+    qsgrectangleextruder \
+    qsgtargetdirection \
+    qsgtrailemitter \
+    qsgturbulence \
+    qsgwander
+
+contains(QT_CONFIG, private_tests) {
+    SUBDIRS += $$PRIVATETESTS
+}
index d595e6e..45267e5 100644 (file)
@@ -67,6 +67,8 @@ void tst_qsgage::test_kill()
 
     QCOMPARE(system->groupData[0]->size(), 500);
     foreach (QSGParticleData *d, system->groupData[0]->data) {
+        if (d->t == -1) //Recycler out-smarted me and never needed to init this datum
+            continue;
         QCOMPARE(d->x, 0.f);
         QCOMPARE(d->y, 0.f);
         QCOMPARE(d->vx, 1000.f);
index ec86fc7..2a7e978 100644 (file)
@@ -64,6 +64,8 @@ void tst_qsgcustomaffector::test_basic()
 
     QCOMPARE(system->groupData[0]->size(), 500);
     foreach (QSGParticleData *d, system->groupData[0]->data) {
+        if (d->t == -1) //Recycler out-smarted me and never needed to init this datum
+            continue;
         QCOMPARE(d->x, 100.f);
         QCOMPARE(d->y, 100.f);
         QCOMPARE(d->vx, 100.f);