13 #include <gtest/gtest.h> 24 ptr1.
reset(
new int());
28 EXPECT_TRUE(*ptr1 == 123);
32 EXPECT_TRUE(*ptr1 == *ptr2);
35 EXPECT_FALSE(*ptr1 == *ptr2);
40 EXPECT_TRUE(*ptr1 == *ptr2);
43 EXPECT_FALSE(*ptr1 == *ptr2);
54 std::vector<str2d_ptr>
v;
55 for (
int i = 0; i < 10; i++)
57 v.push_back(str2d_ptr(
new str2d_ptr::value_type));
63 EXPECT_TRUE(
v3->second == 3);
66 EXPECT_TRUE(
v3->second == 4);
67 EXPECT_TRUE(
v[3]->second == 3);
79 EXPECT_NEAR(ptr1->
x(), 123.0, 1e-9);
83 EXPECT_TRUE(*ptr1 == *ptr2);
86 EXPECT_FALSE(*ptr1 == *ptr2);
91 EXPECT_TRUE(*ptr1 == *ptr2);
94 EXPECT_FALSE(*ptr1 == *ptr2);
105 std::vector<str2d_ptr>
v;
106 for (
int i = 0; i < 10; i++)
108 v.push_back(str2d_ptr(
new str2d_ptr::value_type));
113 EXPECT_NEAR(
v3->x(), 3.0, 1e-9);
116 EXPECT_NEAR(
v3->x(), 4.0, 1e-9);
117 EXPECT_NEAR(
v[3]->
x(), 3.0, 1e-9);
double x() const
Common members of all points & poses classes.
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
void x_incr(const double v)
GLfloat GLfloat GLfloat GLfloat v3
TEST(copy_ptr, SimpleOps)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle...
void reset(T *ptr=nullptr)