14 #include <gtest/gtest.h> 25 ptr1.
reset(
new int());
29 EXPECT_TRUE(*ptr1==123);
33 EXPECT_TRUE(*ptr1 == *ptr2);
36 EXPECT_FALSE(*ptr1 == *ptr2);
41 EXPECT_TRUE(*ptr1 == *ptr2);
44 EXPECT_FALSE(*ptr1 == *ptr2);
55 std::vector<str2d_ptr>
v;
56 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++) {
107 v.push_back(str2d_ptr(
new str2d_ptr::value_type));
112 EXPECT_NEAR(
v3->x(), 3.0, 1e-9);
115 EXPECT_NEAR(
v3->x(), 4.0, 1e-9);
116 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.
Smart pointer for non-polymorphic classes.
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...
Smart pointer for polymorphic classes with a clone() method.