Browse Source

Make use of QTest fuzzy compare instead of that wtf.

vectorfields
Vladimír Vondruš 16 years ago
parent
commit
b58fad0c63
  1. 4
      src/Math/Test/VectorTest.cpp

4
src/Math/Test/VectorTest.cpp

@ -15,11 +15,9 @@
#include "VectorTest.h"
#include <cmath>
#include <QtTest/QTest>
#include "Vector.h"
#include "constants.h"
QTEST_APPLESS_MAIN(Magnum::Math::Test::VectorTest)
@ -109,7 +107,7 @@ void VectorTest::addSubstract() {
void VectorTest::length() {
float vec[] = { 1.0f, 2.0f, 3.0f, 4.0f };
QVERIFY(abs(Vector4(vec).length() - 5.4772256f) < EPSILON);
QCOMPARE(Vector4(vec).length(), 5.4772256f);
}
void VectorTest::normalized() {

Loading…
Cancel
Save