// // Copyright 2018 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // MatrixBuiltinsTest.cpp: Tests basic usage of builtin matrix operations. #include "test_utils/ANGLETest.h" #include "test_utils/gl_raii.h" #include "common/matrix_utils.h" #include "util/random_utils.h" #include <stdint.h> usingnamespaceangle; class MatrixBuiltinsTest : public ANGLETest<> { … }; // Test rotation and check the matrix for closeness to a rotation matrix. TEST_P(MatrixBuiltinsTest, Rotate) { … } // Test that rotation of a (0, 0, 0) Vector doesn't result in NaN values. TEST_P(MatrixBuiltinsTest, RotateAxisZero) { … } // Test translation and check the matrix for closeness to a translation matrix. TEST_P(MatrixBuiltinsTest, Translate) { … } // Test scale and check the matrix for closeness to a scale matrix. TEST_P(MatrixBuiltinsTest, Scale) { … } // Test frustum projection and check the matrix values. TEST_P(MatrixBuiltinsTest, Frustum) { … } // Test orthographic projection and check the matrix values. TEST_P(MatrixBuiltinsTest, Ortho) { … } // Test that GL_INVALID_VALUE is issued if potential divide by zero situations happen for // glFrustumf. TEST_P(MatrixBuiltinsTest, FrustumNegative) { … } // Test that GL_INVALID_VALUE is issued if potential divide by zero situations happen for glOrthof. TEST_P(MatrixBuiltinsTest, OrthoNegative) { … } // Test that glOrtho{fx} don't issue error result if near or far is negative. TEST_P(MatrixBuiltinsTest, OrthoNegativeNearFar) { … } ANGLE_INSTANTIATE_TEST_ES1(…);