Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored ISD parsing into utilities and added warnings #179

Merged
merged 7 commits into from
Feb 19, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added check for warning output to bad fram ISD test
  • Loading branch information
jessemapel committed Feb 18, 2019
commit 411a973ce9f6cb9739cd0e8dc12c023be15e9e0e
7 changes: 6 additions & 1 deletion tests/PluginTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,22 +112,27 @@ TEST_F(FrameIsdTest, ConstructInValidCamera) {
UsgsAstroPlugin testPlugin;
isd.setFilename("data/constVelocityLineScan.img");
csm::Model *cameraModel = NULL;
csm::WarningList *warnings = new csm::WarningList;
try {
testPlugin.constructModelFromISD(
isd,
"USGS_ASTRO_FRAME_SENSOR_MODEL",
NULL);
warnings);
FAIL() << "Expected an error";
}
catch(csm::Error &e) {
EXPECT_EQ(e.getError(), csm::Error::SENSOR_MODEL_NOT_CONSTRUCTIBLE);
EXPECT_FALSE(warnings->empty());
}
catch(...) {
FAIL() << "Expected csm SENSOR_MODEL_NOT_CONSTRUCTIBLE error";
}
if (cameraModel) {
delete cameraModel;
}
if (warnings) {
delete warnings;
}
}

TEST_F(ConstVelLineScanIsdTest, Constructible) {
Expand Down