| 43 | using namespace pdal; |
| 44 | |
| 45 | TEST(Ilvis2ReaderWithMDReaderTest, testInvalidMetadataFile) |
| 46 | { |
| 47 | Option filename("filename", |
| 48 | Support::datapath("ilvis2/ILVIS2_TEST_FILE.TXT")); |
| 49 | Options options(filename); |
| 50 | options.add("metadata", "invalidfile"); |
| 51 | std::shared_ptr<Ilvis2Reader> reader(new Ilvis2Reader); |
| 52 | reader->setOptions(options); |
| 53 | |
| 54 | PointTable table; |
| 55 | try |
| 56 | { |
| 57 | reader->prepare(table); |
| 58 | reader->execute(table); |
| 59 | FAIL() << "Expected an exception for an invalid file"; |
| 60 | } |
| 61 | catch (pdal_error const & err) |
| 62 | { |
| 63 | EXPECT_EQ("readers.ilvis2: Invalid metadata file: 'invalidfile'", |
| 64 | std::string(err.what())); |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | |
| 69 | TEST(Ilvis2ReaderWithMDReaderTest, testValidMetadataFile) |
nothing calls this directly
no test coverage detected