DOI-USGS / ISIS3

Integrated Software for Imagers and Spectrometers v3. ISIS3 is a digital image processing software package to manipulate imagery collected by current and past NASA and International planetary missions.
https://isis.astrogeology.usgs.gov
Other
196 stars 166 forks source link

pixel2map should have an "errors" app test #2293

Closed ascbot closed 5 years ago

ascbot commented 5 years ago

Author Name: Ian Humphrey (Ian Humphrey)

Original Assignee: Curtis Rose


Currently pixel2map does not test the exceptions that it can throw.

To improve test coverage of this application, an "errors" test should be written that can exercise any testable exceptional cases. pixel2map can throw the following exceptions in the following cases:

// The FROMLIST file is empty
if (list.size() < 1)

USER The list file [FROMLIST] does not contain any data.

// Make sure the target is not the sky
if (g_incam->target()->isSky())

USER The image [cube] is targeting the sky, use skymap instead.

// Make sure all the bands for all the files match
if (i > 1 && atts0.bandsString() != lastBandString)

USER The Band numbers for all the files do not match.

// Image crosses longitude seam and LONSEAM is set to ERROR
else if (ui.GetString("LONSEAM") == "ERROR")

USER The image [cube] crosses the longitude seam

See the following internal wiki page for more information about testing exceptions in an app test.

ascbot commented 5 years ago

Original Redmine Comment Author Name: Ian Humphrey (Ian Humphrey) Original Date: 2016-12-09T20:09:21Z


reviewed changes, looks good!