PointCloudLibrary/pcl — pull request #499 by taketwo (2014-02-10 13:18:40+00:00)
Title: Add test macros for equality/nearness checks

This pull request adds a family of macros that mimic the style of native google test macros for floats, but act on PCL points:

* `EXPECT_XYZ_EQ(expected, actual)`
* `ASSERT_RGB_EQ(expected, actual)`
* `EXPECT_NORMAL_NEAR(expected, actual, abs_error)`
* ...

These macros are meant to replace checks like:

```cpp
EXPECT_FLOAT_EQ(p1.normal_x, p2.normal_x);
EXPECT_FLOAT_EQ(p1.normal_y, p2.normal_y);
EXPECT_FLOAT_EQ(p1.normal_z, p2.normal_z);
```

or

```cpp
EXPECT_EQ_VECTOR(p1.getNormalVector3fMap (), p2.getNormalVector3fMap ());
```

with a single less convoluted statement:

```cpp
EXPECT_NORMAL_EQ(p1, p2);
```

When such an assertion fails it provides output similar to that of google test macros:

```
Value of: (p2).getNormalVector3fMap ()
Actual: 1.1000000238418579 2 3
Expected: (p1).getNormalVector3fMap ()
Which is: 1 2 3
```