diff --git a/src/Math/Test/GeometryUtilsTest.cpp b/src/Math/Test/GeometryUtilsTest.cpp index 757656e72..e5624fc86 100644 --- a/src/Math/Test/GeometryUtilsTest.cpp +++ b/src/Math/Test/GeometryUtilsTest.cpp @@ -42,15 +42,13 @@ void GeometryUtilsTest::intersection_data() { QTest::addColumn("b"); QTest::addColumn("expected"); - float plane[] = { - 0, 0, 0, - 1, 0, 0, - 0, 1, 0 - }; - QTest::newRow("inside") << Matrix3(plane) << Vector3(0, 0, -1) << Vector3(0, 0, 1) << 0.5f; - QTest::newRow("outside") << Matrix3(plane) << Vector3(0, 0, 1) << Vector3(0, 0, 2) << -1.0f; - QTest::newRow("NaN") << Matrix3(plane) << Vector3(1, 0, 0) << Vector3(0, 1, 0) << numeric_limits::quiet_NaN(); - QTest::newRow("inf") << Matrix3(plane) << Vector3(1, 0, 1) << Vector3(0, 0, 1) << numeric_limits::infinity(); + Matrix3 plane(0.0f, 0.0f, 0.0f, + 1.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f); + QTest::newRow("inside") << plane << Vector3(0, 0, -1) << Vector3(0, 0, 1) << 0.5f; + QTest::newRow("outside") << plane << Vector3(0, 0, 1) << Vector3(0, 0, 2) << -1.0f; + QTest::newRow("NaN") << plane << Vector3(1, 0, 0) << Vector3(0, 1, 0) << numeric_limits::quiet_NaN(); + QTest::newRow("inf") << plane << Vector3(1, 0, 1) << Vector3(0, 0, 1) << numeric_limits::infinity(); } void GeometryUtilsTest::intersection() { diff --git a/src/Test/CameraTest.cpp b/src/Test/CameraTest.cpp index 19e6bc623..3da94250f 100644 --- a/src/Test/CameraTest.cpp +++ b/src/Test/CameraTest.cpp @@ -28,12 +28,10 @@ void CameraTest::orthographic() { Camera camera; camera.setOrthographic(5, 1, 9); - GLfloat a[] = { - 0.4f, 0, 0, 0, - 0, 0.4f, 0, 0, - 0, 0, -0.25f, 0, - 0, 0, -1.25f, 1 - }; + Matrix4 a(0.4f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.4f, 0.0f, 0.0f, + 0.0f, 0.0f, -0.25f, 0.0f, + 0.0f, 0.0f, -1.25f, 1.0f); QVERIFY(camera.projectionMatrix() == a); } @@ -42,14 +40,12 @@ void CameraTest::perspective() { Camera camera; camera.setPerspective(deg(27.0f), 32.0f, 100); - GLfloat a[] = { - 4.1652994f, 0, 0, 0, - 0, 4.1652994f, 0, 0, - 0, 0, -1.9411764f, -1, - 0, 0, -94.1176452f, 0 - }; + Matrix4 a(4.1652994f, 0.0f, 0.0f, 0.0f, + 0.0f, 4.1652994f, 0.0f, 0.0f, + 0.0f, 0.0f, -1.9411764f, -1.0f, + 0.0f, 0.0f, -94.1176452f, 0.0f); - QVERIFY(camera.projectionMatrix() == Matrix4(a)); + QVERIFY(camera.projectionMatrix() == a); } }}