#include "gdcmDataImages.h"
typedef std::string EntryValueType; // same type as ValEntry::value
-typedef std::map< TagKey, EntryValueType > MapEntryValues;
+typedef std::map< gdcm::TagKey, EntryValueType > MapEntryValues;
typedef MapEntryValues* MapEntryValuesPtr;
typedef std::string FileNameType;
typedef std::map< FileNameType, MapEntryValuesPtr > MapFileValuesType;
std::string testedValue = tested->GetEntryByNumber(group, element);
if ( testedValue != j->second )
{
- std::cout << Indent << "Uncorrect value for key " << key << std::endl
- << Indent << " read value [" << testedValue << "]" << std::endl
- << Indent << " reference value [" << j->second << "]"
- << std::endl;
+ // Oops make sure this is only the \0 that differ
+ if( testedValue[j->second.size()] != '\0' ||
+ strncmp(testedValue.c_str(),
+ j->second.c_str(), j->second.size()) != 0)
+ {
+ std::cout << Indent << "Uncorrect value for key "
+ << key << std::endl
+ << Indent << " read value ["
+ << testedValue << "]" << std::endl
+ << Indent << " reference value ["
+ << j->second << "]" << std::endl;
return false;
+ }
}
}
delete tested;
bool ReferenceFileParser::SecondPassReferenceFile()
throw ( ParserException )
{
- TagKey key;
+ gdcm::TagKey key;
EntryValueType value;
std::string line;
bool inBlock = false;
while ( !from.eof() )
{
- getline( from, line );
+ std::getline( from, line );
lineNumber++;
CleanUpLine( line );