6 #include "gtest/gtest.h"
7 #include "../alacousticalspace.h"
9 #include <almath/alrandom.h>
10 #include <alvalue/alvalue.h>
11 using boost::shared_ptr;
15 boost::shared_ptr<ALAcousticalSpace> space = boost::shared_ptr<ALAcousticalSpace>(
new ALAcousticalSpace() );
17 std::vector<AL::Math::Position3D> vector;
18 std::vector<AL::Math::Position3D> vectorCalib;
20 space->getVertexMesh(vector);
21 space->getVertexMeshCalibration(vectorCalib);
23 EXPECT_EQ((
int)vector.size(), 258 ) <<
"size of mesh vector not good";
24 EXPECT_EQ((
int)vectorCalib.size(), 6 ) <<
"size of mesh vectorCalib not good";
26 EXPECT_EQ(vectorCalib[0].x, 1 ) <<
"vector for calibration not good : [0], x";
27 EXPECT_EQ(vectorCalib[0].y, 0 ) <<
"vector for calibration not good : [0], y";
28 EXPECT_EQ(vectorCalib[0].z, 0 ) <<
"vector for calibration not good : [0], z";
30 EXPECT_EQ(vectorCalib[1].x, 0 ) <<
"vector for calibration not good : [1], x";
31 EXPECT_EQ(vectorCalib[1].y, 1 ) <<
"vector for calibration not good : [1], y";
32 EXPECT_EQ(vectorCalib[1].z, 0 ) <<
"vector for calibration not good : [1], z";
34 EXPECT_EQ(vectorCalib[2].x,-1 ) <<
"vector for calibration not good : [2], x";
35 EXPECT_EQ(vectorCalib[2].y, 0 ) <<
"vector for calibration not good : [2], y";
36 EXPECT_EQ(vectorCalib[2].z, 0 ) <<
"vector for calibration not good : [2], z";
38 EXPECT_EQ(vectorCalib[3].x, 0 ) <<
"vector for calibration not good : [3], x";
39 EXPECT_EQ(vectorCalib[3].y,-1 ) <<
"vector for calibration not good : [3], y";
40 EXPECT_EQ(vectorCalib[3].z, 0 ) <<
"vector for calibration not good : [3], z";
42 EXPECT_EQ(vectorCalib[4].x, 0 ) <<
"vector for calibration not good : [4], x";
43 EXPECT_EQ(vectorCalib[4].y, 0 ) <<
"vector for calibration not good : [4], y";
44 EXPECT_EQ(vectorCalib[4].z, 1 ) <<
"vector for calibration not good : [4], z";
46 EXPECT_EQ(vectorCalib[5].x, 0 ) <<
"vector for calibration not good : [5], x";
47 EXPECT_EQ(vectorCalib[5].y, 0 ) <<
"vector for calibration not good : [5], y";
48 EXPECT_EQ(vectorCalib[5].z,-1 ) <<
"vector for calibration not good : [5], z";