| 44 | { |
| 45 | |
| 46 | TEST(DimensionTest, test_sanitization) |
| 47 | { |
| 48 | std::string with_space("Pulse width"); |
| 49 | EXPECT_EQ(Dimension::fixName(with_space), with_space); |
| 50 | |
| 51 | std::string with_a_number("DimensionName42"); |
| 52 | EXPECT_EQ(Dimension::fixName(with_a_number), with_a_number); |
| 53 | |
| 54 | std::string with_punctuation("with#punctuation."); |
| 55 | EXPECT_EQ(Dimension::fixName(with_punctuation), "with_punctuation_"); |
| 56 | |
| 57 | std::string begin_with_a_number("42DimensionName42"); |
| 58 | EXPECT_EQ(Dimension::fixName(begin_with_a_number), "_2DimensionName42"); |
| 59 | |
| 60 | } |
| 61 | |
| 62 | |
| 63 | } // namespace pdal |