scenario_simulator_v2 C++ API
Classes | Functions | Variables
test_vector3.cpp File Reference
#include <gtest/gtest.h>
#include <cmath>
#include <geometry/vector3/hypot.hpp>
#include <geometry/vector3/inner_product.hpp>
#include <geometry/vector3/internal_angle.hpp>
#include <geometry/vector3/norm.hpp>
#include <geometry/vector3/normalize.hpp>
#include <geometry/vector3/operator.hpp>
#include "../expect_eq_macros.hpp"
#include "../test_utils.hpp"
Include dependency graph for test_vector3.cpp:

Classes

struct  CustomVector3< T >
 Custom Vector3 struct using T type with multiplication and division operators. More...
 

Functions

 TEST (Vector3, hypot_msgVector)
 
 TEST (Vector3, hypot_customVector)
 
 TEST (Vector3, norm_msgVector)
 
 TEST (Vector3, norm_customVector)
 
 TEST (Vector3, normalize_msgVector)
 
 TEST (Vector3, normalize_customVector)
 
 TEST (Vector3, addition_msgVector)
 
 TEST (Vector3, addition_customVector)
 
 TEST (Vector3, subtraction_msgVector)
 
 TEST (Vector3, subtraction_CustomVector)
 
 TEST (Vector3, multiplication_msgVector)
 
 TEST (Vector3, multiplication_CustomVector)
 
 TEST (Vector3, division_msgVector)
 
 TEST (Vector3, division_CustomVector)
 
 TEST (Vector3, additionAssignment_msgVector)
 
 TEST (Vector3, additionAssignment_customVector)
 
 TEST (Vector3, normalize_zeroLength)
 
 TEST (Vector3, normalize)
 
 TEST (Vector3, innerProduct_getInnerProduct)
 
 TEST (Vector3, innerProduct_identical)
 
 TEST (Vector3, innerProduct_zero)
 
 TEST (Vector3, innerAngle_getInnerAngle)
 
 TEST (Vector3, innerAngle_angleIdentical)
 
 TEST (Vector3, innerAngle_angleZero)
 
int main (int argc, char **argv)
 

Variables

constexpr double EPS = 1e-6
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

◆ TEST() [1/24]

TEST ( Vector3  ,
addition_customVector   
)

◆ TEST() [2/24]

TEST ( Vector3  ,
addition_msgVector   
)

◆ TEST() [3/24]

TEST ( Vector3  ,
additionAssignment_customVector   
)

◆ TEST() [4/24]

TEST ( Vector3  ,
additionAssignment_msgVector   
)

◆ TEST() [5/24]

TEST ( Vector3  ,
division_CustomVector   
)

◆ TEST() [6/24]

TEST ( Vector3  ,
division_msgVector   
)

◆ TEST() [7/24]

TEST ( Vector3  ,
hypot_customVector   
)

◆ TEST() [8/24]

TEST ( Vector3  ,
hypot_msgVector   
)

◆ TEST() [9/24]

TEST ( Vector3  ,
innerAngle_angleIdentical   
)

◆ TEST() [10/24]

TEST ( Vector3  ,
innerAngle_angleZero   
)

◆ TEST() [11/24]

TEST ( Vector3  ,
innerAngle_getInnerAngle   
)

◆ TEST() [12/24]

TEST ( Vector3  ,
innerProduct_getInnerProduct   
)

◆ TEST() [13/24]

TEST ( Vector3  ,
innerProduct_identical   
)

◆ TEST() [14/24]

TEST ( Vector3  ,
innerProduct_zero   
)

◆ TEST() [15/24]

TEST ( Vector3  ,
multiplication_CustomVector   
)

◆ TEST() [16/24]

TEST ( Vector3  ,
multiplication_msgVector   
)

◆ TEST() [17/24]

TEST ( Vector3  ,
norm_customVector   
)

◆ TEST() [18/24]

TEST ( Vector3  ,
norm_msgVector   
)
Note
Test function correctness with parameter that is ros message vector.

◆ TEST() [19/24]

TEST ( Vector3  ,
normalize   
)

◆ TEST() [20/24]

TEST ( Vector3  ,
normalize_customVector   
)

◆ TEST() [21/24]

TEST ( Vector3  ,
normalize_msgVector   
)

◆ TEST() [22/24]

TEST ( Vector3  ,
normalize_zeroLength   
)
Note
Test function correctness when one of the vectors has length of 0.

◆ TEST() [23/24]

TEST ( Vector3  ,
subtraction_CustomVector   
)

◆ TEST() [24/24]

TEST ( Vector3  ,
subtraction_msgVector   
)

Variable Documentation

◆ EPS

constexpr double EPS = 1e-6
constexpr