Unverified Commit a2b5f1e6 authored by Makayla Shepherd's avatar Makayla Shepherd Committed by GitHub
Browse files

Merge pull request #106 from kdl222/m04089_temp

Removed unreachable code in getsn and added test to increase code coverage. Fixes #4089.
parents 6e3c92e4 d4949b61
Loading
Loading
Loading
Loading
+10 −14
Original line number Diff line number Diff line
@@ -34,16 +34,12 @@ void IsisMain() {
  bool WriteObservation = ui.GetBoolean("OBSERVATION");

  QString format = ui.GetString("FORMAT");
  bool pvl = true;
  bool pvl;
  if (format == "PVL") {
    pvl = true;
  }
  else if (format == "FLAT") {
    pvl = false;
  }
  else {
    QString msg = "Invalid format QString [" + format + "]";
    throw IException(IException::User, msg, _FILEINFO_);
    pvl = false;
  }

  // Extract label from cube file
+19 −14
Original line number Diff line number Diff line
@@ -42,6 +42,11 @@
      Added FORMAT option to choose between PVL and FLAT format. Effects output
      file only, default is still PVL.
    </change>
    <change name="Kaitlyn Lee" date="2018-01-17">
      Removed unreachable else clause that assumed more than two options are
      allowed to be entered in for the parameter FORMAT. Added test to default case
      to increase code coverage.
    </change>
  </history>

  <groups>
+7 −4
Original line number Diff line number Diff line
@@ -4,8 +4,11 @@ include $(ISISROOT)/make/isismake.tsts

commands:
	$(APPNAME) FROM=$(INPUT)/peaks.cub \
	TO=$(OUTPUT)/peaks.pvl FILE=TRUE OBSERVATION=TRUE \
		TO=$(OUTPUT)/peaks.pvl FILE=FALSE OBSERVATION=TRUE SN=FALSE \
			APPEND=false;
	$(APPNAME) FROM=$(INPUT)/peaks.cub \
		TO=$(OUTPUT)/peaks.pvl FILE=TRUE OBSERVATION=FALSE SN=TRUE \
			APPEND=TRUE;
	$(APPNAME) FROM=$(INPUT)/hirise.cub \
		TO= $(OUTPUT)/hirise.pvl FILE=TRUE OBSERVATION=TRUE \
			APPEND=false;