Unverified Commit 9c23d0e9 authored by ihumphrey's avatar ihumphrey Committed by GitHub
Browse files

Merge pull request #498 from kdl222/release

Fixed UserInterface unit test failing on Mac.
parents da1cd226 dce16b77
Loading
Loading
Loading
Loading
+0 −206
Original line number Diff line number Diff line


Testing ImportPdsTable class using file data/VIR_IR_1A_1_332974737_1_HK.LBL


List of Columns found - Total: 34
VersionTypeSecondaryHeaderFlag
Apid
PacketSequenceControl
PacketsLength
ScetTimeClock
ScetTimeUtc
FrameNumber
FrameCount
SubframeCount
PacketsCount
ShutterStatus
ChannelId
CompressionMode
SpectralRange
CurrentMode
SubCurrentMode
IrExpo
IrTemp
CcdExpo
CcdTemp
MirrorSin
Mirror
SpectTemp
TeleTemp
ColdTipTemp
RadiatorTemp
SuMotorCurr
LedgeTemp
StartNoisyBits
EndNoisyBits
CrOrw
NofNoisyBits
SubframeData
SeqStep

Now without Name Conversion: 
VERSION, TYPE, SECONDARY HEADER FLAG
APID
PACKET SEQUENCE CONTROL
PACKETS LENGTH
SCET TIME (CLOCK)
SCET TIME (UTC)
FRAME NUMBER
FRAME COUNT
SUBFRAME COUNT
PACKETS COUNT
SHUTTER STATUS
CHANNEL ID
COMPRESSION MODE
SPECTRAL RANGE
CURRENT MODE
SUB CURRENT MODE
IR EXPO
IR TEMP
CCD EXPO
CCD TEMP
MIRROR SIN
MIRROR
SPECT TEMP
TELE TEMP
COLD TIP TEMP
RADIATOR TEMP
SU MOTOR CURR
LEDGE TEMP
START NOISY BITS
END NOISY BITS
CR ORW
NOF NOISY BITS
SUBFRAME DATA
SEQ STEP
Getting ISIS Table...
VersionTypeSecondaryHeaderFlag	Apid	PacketSequenceControl	PacketsLength	ScetTimeClock	ScetTimeUtc	FrameNumber	FrameCount	SubframeCount	PacketsCount	ShutterStatus	ChannelId	CompressionMode	SpectralRange	CurrentMode	SubCurrentMode	IrExpo	IrTemp	CcdExpo	CcdTemp	MirrorSin	Mirror	SpectTemp	TeleTemp	ColdTipTemp	RadiatorTemp	SuMotorCurr	LedgeTemp	StartNoisyBits	EndNoisyBits	CrOrw	NofNoisyBits	SubframeData	SeqStep	



Import PDS table from PDS table exported as MSB...
ReimportedMSB
Double Value	Integer Value	Text Value	Real Value
3.14159			3				PI			3.1428570747375
2.71828			2				e			2.0



Import PDS table from PDS table exported as LSB...
ReimportedLSB
Double Value	Integer Value	Text Value	Real Value
3.14159			3				PI			3.1428570747375
2.71828			2				e			2.0



Testing name() (default TABLE): TABLE

Testing setName("My Table"): My Table


Testing ImportPdsTable protected methods with file data/edrindex.lbl

Constructing new ImportPdsTable where the PDS table object name is INDEX_TABLE

Testing getColumnFields...

Column TELEMETRY_SOURCE_NAME items: 1
  030_009_f0006-000-0000_003_0128278505-223.dat               

Column Description for this column: 
m_name: TELEMETRY_SOURCE_NAME
m_colnum: 42
m_dataType: CHARACTER
m_startByte: 658
m_numBytes: 60
m_itemBytes: 60
m_items: 1


Column ROVER_MOTION_COUNTER items: 5
  0     
  0     
  0     
  0     
  0     

Column Description for this column: 
m_name: ROVER_MOTION_COUNTER
m_colnum: 43
m_dataType: INTEGER
m_startByte: 720
m_numBytes: 34
m_itemBytes: 6
m_items: 5



Throw error for invalid table file name: 
**ERROR** Unable to import PDS table.  Neither of the following possible table files were found: [INVALID_TABLE_FILE_NAME.DAT]  or [./invalid_table_file_name.dat].
**ERROR** Failed to convert string [INVALID_TABLE_FILE_NAME] to an integer.

Throw error for attempt to access invalid column index: 
**PROGRAMMER ERROR** Unable to import the binary PDS table [TABLE] into Isis. The requested column index [5] exceeds the last column index [3].

Throw error for attempt to export non-existent columns: 
**PROGRAMMER ERROR** Unable to import the PDS table [My Table] into Isis. The requested column name [Invalid Column Name] does not exist in table.

Throw error for missing table location in label file:
**ERROR** The PDS file data/lsb_pds_binary_table.lbl does not have the required TABLE object, [MISSING_TABLE]. The PDS label file is probably invalid.

Throw error for invalid table format type in label file:
**USER ERROR** Unable to import the PDS table [TABLE] from the PDS file [data/lsb_pds_binary_table.dat] into Isis. The PDS INTERCHANGE_FORMAT [UNKNOWN_FORMAT_TYPE] is not supported. Valid values are ASCII or BINARY.

Print message when COLUMNS value not matching number of COLUMN objects:
Number of columns in the COLUMNS label keyword (3) does not match number of COLUMN objects found (4)

Throw error for invalid Text PDS table to be imported: 
**ERROR** Unable to import the PDS table [TABLE] from the PDS file [data/invalidTextTable.tab] into Isis.
**PROGRAMMER ERROR** Failed to convert data in row [0].
**PROGRAMMER ERROR** Conversion failure of column VERSION, TYPE, SECONDARY HEADER FLAG.
**ERROR** Failed to convert string [A] to an integer.

Throw error for invalid MSB_INTEGER bytes in label file: 
**ERROR** Unable to import the PDS table [EXPORTED_ISIS_TABLE] from the PDS file [data/msb_pds_binary_table.DAT] into Isis.
**ERROR** Only 4 byte integer values are supported in Isis. PDS Column [Integer Value] has an integer DATA_TYPE with [BYTES = 8].

Throw error for invalid INTEGER bytes in label file: 
**ERROR** Unable to import the PDS table [TABLE] from the PDS file [data/LSB_PDS_BINARY_TABLE.dat] into Isis.
**ERROR** Only 4 byte integer values are supported in Isis. PDS Column [Integer Value] has an integer DATA_TYPE with [BYTES = 2].

Throw error for invalid REAL bytes in label file: 
**ERROR** Unable to import the PDS table [EXPORTED_ISIS_TABLE] from the PDS file [data/msb_pds_binary_table.DAT] into Isis.
**ERROR** Only 4 byte or 8 byte real values are supported in Isis. PDS Column [Double Value] has a real DATA_TYPE with [BYTES = 12].

Throw error for invalid REAL bytes in label file: 
**ERROR** Unable to import the PDS table [TABLE] from the PDS file [data/LSB_PDS_BINARY_TABLE.dat] into Isis.
**ERROR** Only 4 byte or 8 byte real values are supported in Isis. PDS Column [Double Value] has a real DATA_TYPE with [BYTES = 2].

Throw error for invalid column DATA_TYPE in label file: 
**ERROR** Unable to import the PDS table [TABLE] from the PDS file [data/LSB_PDS_BINARY_TABLE.DAT] into Isis.
**ERROR** PDS Column [Double Value] has an unsupported DATA_TYPE [UNKNOWN_DATA_TYPE].

Throw error for inconsistent byte order in label file: 
**ERROR** Unable to import the PDS table [TABLE] from the PDS file [data/LSB_PDS_BINARY_TABLE.DAT] into Isis.
**ERROR** Unable to import the binary PDS table [TABLE]. The column DATA_TYPE values indicate differing byte orders.

Throw error if index used to request a column description 
is greater than the number of columns in the table: 
**PROGRAMMER ERROR** Index (100) into Columns invalid (max: 48).

Throw error if index used to request a column description is less than 0: 
**PROGRAMMER ERROR** Index (-1) into Columns invalid (max: 48).

cols = 4
rows = 0
has double = 1
col 1 name = IntegerValue
DoubleValue
IntegerValue
TextValue
RealValue
type Double Value column = PC_REAL
set Double Value column to type MSB_INTEGER 
type Double Value column = MSB_INTEGER
+1 −1
Original line number Diff line number Diff line
@@ -929,7 +929,7 @@ int main(int argc, char *argv[]) {
    {
      int myArgc = 0;
      strcpy(myArgv[myArgc++], "./unitTest");
      strcpy(myArgv[myArgc++], "-save");
      strcpy(myArgv[myArgc++], "-save=unitTestSaveArgs.par");

      Isis::UserInterface ui(unitTestXml, myArgc, myArgv);
      ui.SaveHistory();