APM:Libraries
Classes | Macros | Functions | Variables
test_matrix3.cpp File Reference
#include "math_test.h"
Include dependency graph for test_matrix3.cpp:

Go to the source code of this file.

Classes

class  TestParam
 
class  Matrix3fTest
 

Macros

#define AP_EXPECT_IDENTITY_MATRIX(m_)
 

Functions

 AP_GTEST_PRINTATBLE_PARAM_MEMBER (TestParam, m)
 
 TEST_P (Matrix3fTest, Determinants)
 
 TEST_P (Matrix3fTest, Inverses)
 
 INSTANTIATE_TEST_CASE_P (InvertibleMatrices, Matrix3fTest, ::testing::ValuesIn(invertible))
 
 INSTANTIATE_TEST_CASE_P (NonInvertibleMatrices, Matrix3fTest, ::testing::ValuesIn(non_invertible))
 

Variables

static TestParam invertible []
 
static TestParam non_invertible []
 

Macro Definition Documentation

◆ AP_EXPECT_IDENTITY_MATRIX

#define AP_EXPECT_IDENTITY_MATRIX (   m_)
Value:
{\
EXPECT_NEAR(1.0f, m_.a.x, 1.0e-6); \
EXPECT_NEAR(0.0f, m_.a.y, 1.0e-6); \
EXPECT_NEAR(0.0f, m_.a.z, 1.0e-6); \
EXPECT_NEAR(0.0f, m_.b.x, 1.0e-6); \
EXPECT_NEAR(1.0f, m_.b.y, 1.0e-6); \
EXPECT_NEAR(0.0f, m_.b.z, 1.0e-6); \
EXPECT_NEAR(0.0f, m_.c.x, 1.0e-6); \
EXPECT_NEAR(0.0f, m_.c.y, 1.0e-6); \
EXPECT_NEAR(1.0f, m_.c.z, 1.0e-6); \
}
#define f(i)

Definition at line 20 of file test_matrix3.cpp.

Referenced by TEST_P().

Function Documentation

◆ AP_GTEST_PRINTATBLE_PARAM_MEMBER()

AP_GTEST_PRINTATBLE_PARAM_MEMBER ( TestParam  ,
 
)

◆ INSTANTIATE_TEST_CASE_P() [1/2]

INSTANTIATE_TEST_CASE_P ( InvertibleMatrices  ,
Matrix3fTest  ,
::testing::ValuesIn(invertible  
)

Referenced by TEST_P().

Here is the caller graph for this function:

◆ INSTANTIATE_TEST_CASE_P() [2/2]

INSTANTIATE_TEST_CASE_P ( NonInvertibleMatrices  ,
Matrix3fTest  ,
::testing::ValuesIn(non_invertible  
)

◆ TEST_P() [1/2]

TEST_P ( Matrix3fTest  ,
Determinants   
)

Definition at line 78 of file test_matrix3.cpp.

◆ TEST_P() [2/2]

TEST_P ( Matrix3fTest  ,
Inverses   
)

Definition at line 84 of file test_matrix3.cpp.

Here is the call graph for this function:

Variable Documentation

◆ invertible

TestParam invertible[]
static
Initial value:
= {
{
.m = {
{1.0f, 2.0f, 3.0f},
{4.0f, 6.0f, 2.0f},
{9.0f, 18.0f, 27.0f}
},
.det = 0.0f,
},
}

Definition at line 48 of file test_matrix3.cpp.

◆ non_invertible

TestParam non_invertible[]
static
Initial value:
= {
{
.m = {
{ 6.0f, 2.0f, 20.0f},
{ 1.0f, -9.0f, 4.0f},
{-4.0f, 7.0f, -27.0f}
},
.det = 732.0f,
},
{
.m = {
{-6.0f, -2.0f, -20.0f},
{-1.0f, 9.0f, -4.0f},
{ 4.0f, -7.0f, 27.0f}
},
.det = -732.0f,
},
}

Definition at line 59 of file test_matrix3.cpp.