- Aldebaran documentation |
- C++ Libraries |
- index

libalaudio 2.8.7.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
alacousticalspace_test.cpp
Go to the documentation of this file.
1
6 #include "gtest/gtest.h"
7 #include "../alacousticalspace.h"
8
9 #include <almath/alrandom.h>
10 #include <alvalue/alvalue.h>
11 using boost::shared_ptr;
12
13 TEST(test_space, Init) {
14
15 boost::shared_ptr<ALAcousticalSpace> space = boost::shared_ptr<ALAcousticalSpace>( new ALAcousticalSpace() );
16
17 std::vector<AL::Math::Position3D> vector;
18 std::vector<AL::Math::Position3D> vectorCalib;
19
20 space->getVertexMesh(vector);
21 space->getVertexMeshCalibration(vectorCalib);
22
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";
25
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";
29
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";
33
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";
37
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";
41
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";
45
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";
49 }
TEST
TEST(test_space, Init)
Definition: alacousticalspace_test.cpp:13