aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/particles/shared/particlestestsshared.h
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2011-10-14 13:06:41 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-17 05:46:06 +0200
commitcec7b67ec38934560c19a4e4361d684c25143fa8 (patch)
treea9e7da0c6fdf813fc804c58e8806c88e853e7e9d /tests/auto/particles/shared/particlestestsshared.h
parent9470ce517d466606db0317f6af0800890c2c874d (diff)
Initial particle system benchmark
Exposed another function on ParticleSystem in order to work. Change-Id: I62acf524eb2c6491bc88fd687a0065866d7ce852 Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'tests/auto/particles/shared/particlestestsshared.h')
-rw-r--r--tests/auto/particles/shared/particlestestsshared.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/auto/particles/shared/particlestestsshared.h b/tests/auto/particles/shared/particlestestsshared.h
index f4c44c1ace..66e880fc5b 100644
--- a/tests/auto/particles/shared/particlestestsshared.h
+++ b/tests/auto/particles/shared/particlestestsshared.h
@@ -47,7 +47,7 @@ const qreal EPSILON = 0.0001;
bool extremelyFuzzyCompare(qreal a, qreal b, qreal e)//For cases which can have larger variances
{
- return (a + e > b) && (a - e < b);
+ return (a + e >= b) && (a - e <= b);
}
bool myFuzzyCompare(qreal a, qreal b)//For cases which might be near 0 so qFuzzyCompare fails
@@ -55,7 +55,17 @@ bool myFuzzyCompare(qreal a, qreal b)//For cases which might be near 0 so qFuzzy
return (a + EPSILON > b) && (a - EPSILON < b);
}
-QSGView* createView(const QString &filename, int additionalWait)
+bool myFuzzyLEQ(qreal a, qreal b)
+{
+ return (a - EPSILON < b);
+}
+
+bool myFuzzyGEQ(qreal a, qreal b)
+{
+ return (a + EPSILON > b);
+}
+
+QSGView* createView(const QString &filename, int additionalWait=0)
{
QSGView *canvas = new QSGView(0);