| 39 | using namespace pdal; |
| 40 | |
| 41 | TEST(UuidTest, test) |
| 42 | { |
| 43 | std::string s("5CE0E9A5-6015-FEC5-AADF-A328AE398115"); |
| 44 | unsigned char id[16] = {0x5c, 0xe0, 0xe9, 0xa5, 0x60, 0x15, 0xfe, 0xc5, |
| 45 | 0xaa, 0xdf, 0xa3, 0x28, 0xae, 0x39, 0x81, 0x15 }; |
| 46 | Uuid uuid((char *)id); |
| 47 | EXPECT_EQ(uuid.toString(), s); |
| 48 | |
| 49 | Uuid uuid2(s); |
| 50 | unsigned char buf[16]; |
| 51 | uuid2.pack((char *)buf); |
| 52 | for (size_t i = 0; i < 16; ++i) |
| 53 | EXPECT_EQ(id[i], buf[i]); |
| 54 | } |
| 55 | |
| 56 | TEST(UuidTest, initialization) |
| 57 | { |