diff options
Diffstat (limited to 'tests/auto/particles/shared/particlestestsshared.h')
-rw-r--r-- | tests/auto/particles/shared/particlestestsshared.h | 14 |
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); |