Program: gdcm
Module: $RCSfile: TestDataEntry.cxx,v $
Language: C++
- Date: $Date: 2005/10/19 15:43:58 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2005/10/20 08:58:15 $
+ Version: $Revision: 1.4 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
if( entry->GetValueCount() != 1 )
{
std::cout << " Failed" << std::endl
- << " Number of content values is incorrect" << std::endl;
+ << " Number of content values is incorrect" << std::endl
+ << " Found: " << entry->GetValueCount()
+ << " - Must be: 1" << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetValueCount() != 2 )
{
std::cout << " Failed" << std::endl
- << " Number of content values is incorrect" << std::endl;
+ << " Number of content values is incorrect" << std::endl
+ << " Found: " << entry->GetValueCount()
+ << " - Must be: 2" << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetValueCount() != 0 )
{
std::cout << " Failed" << std::endl
- << " Number of content values is incorrect" << std::endl;
+ << " Number of content values is incorrect" << std::endl
+ << " Found: " << entry->GetValueCount()
+ << " - Must be: 0" << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetLength() != strlen(data) + strlen(data)%2 )
{
std::cout << " Failed" << std::endl
- << " Size of string is incorrect" << std::endl;
+ << " Size of string is incorrect" << std::endl
+ << " Found: " << entry->GetLength()
+ << " - Must be: " << strlen(data) + strlen(data)%2 << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetValueCount() != nbvalue )
{
std::cout << " Failed" << std::endl
- << " Number of content values is incorrect" << std::endl;
+ << " Number of content values is incorrect" << std::endl
+ << " Found: " << entry->GetValueCount()
+ << " - Must be: " << nbvalue << std::endl;
delete dict;
delete entry;
return(1);
if( memcmp(entry->GetString().c_str(),data,entry->GetLength()) != 0 )
{
std::cout << " Failed" << std::endl
- << " Content of string is incorrect" << std::endl;
+ << " Content of string is incorrect" << std::endl
+ << " Found: " << entry->GetString().c_str()
+ << " - Must be: " << data << std::endl;
delete dict;
delete entry;
return(1);
{
std::cout << " Failed" << std::endl
<< " Content of entry's values is incorrect : id " << i << std::endl
- << " Found " << entry->GetValue(i) << " - Must be " << svalue[i] << std::endl;
+ << " Found " << entry->GetValue(i)
+ << " - Must be " << svalue[i] << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetLength() != nbvalue*sizeof(uint16_t) )
{
std::cout << " Failed" << std::endl
- << " BinArea length is incorrect" << std::endl;
+ << " BinArea length is incorrect" << std::endl
+ << " Found: " << entry->GetLength()
+ << " - Must be: " << nbvalue*sizeof(uint16_t) << std::endl;
delete dict;
delete entry;
return(1);
if( memcmp(entry->GetString().c_str(),data,strlen(data)) != 0 )
{
std::cout << " Failed" << std::endl
- << " Content of string is incorrect" << std::endl;
+ << " Content of string is incorrect" << std::endl
+ << " Found: " << entry->GetString().c_str()
+ << " - Must be: " << data << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetValueCount() != nbvalue )
{
std::cout << " Failed" << std::endl
- << " Number of content values is incorrect" << std::endl;
+ << " Number of content values is incorrect" << std::endl
+ << " Found: " << entry->GetValueCount()
+ << " - Must be: " << nbvalue << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetValue(i) != svalue[i] )
{
std::cout << " Failed" << std::endl
- << " Content of entry's values is incorrect : id " << i << std::endl;
+ << " Content of entry's values is incorrect : id " << i << std::endl
+ << " Found: " << entry->GetValue(i)
+ << " - Must be: " << svalue[i] << std::endl;
delete dict;
delete entry;
return(1);
if( memcmp(entry->GetString().c_str(),data,strlen(data)) != 0 )
{
std::cout << " Failed" << std::endl
- << " Content of string is incorrect" << std::endl;
+ << " Content of string is incorrect" << std::endl
+ << " Found: " << entry->GetString().c_str()
+ << " - Must be: " << data << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetValueCount() != nbvalue )
{
std::cout << " Failed" << std::endl
- << " Number of content values is incorrect" << std::endl;
+ << " Number of content values is incorrect" << std::endl
+ << " Found: " << entry->GetValueCount()
+ << " - Must be: " << nbvalue << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetValue(i) != svalue[i] )
{
std::cout << " Failed" << std::endl
- << " Content of entry's values is incorrect : id " << i << std::endl;
+ << " Content of entry's values is incorrect : id " << i << std::endl
+ << " Found: " << entry->GetValue(i)
+ << " - Must be: " << svalue[i] << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetLength() != nbvalue*sizeof(uint32_t) )
{
std::cout << " Failed" << std::endl
- << " BinArea length is incorrect" << std::endl;
+ << " BinArea length is incorrect" << std::endl
+ << " Found: " << entry->GetLength()
+ << " - Must be: " << nbvalue*sizeof(uint32_t) << std::endl;
delete dict;
delete entry;
return(1);
if( memcmp(entry->GetString().c_str(),data,strlen(data)) != 0 )
{
std::cout << " Failed" << std::endl
- << " Content of string is incorrect" << std::endl;
- std::cout<<"#"<<entry->GetString()<<"#"<<" / "<<"#"<<data<<"#"<<std::endl;
+ << " Content of string is incorrect" << std::endl
+ << " Found: " << entry->GetString().c_str()
+ << " - Must be: " << data << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetValueCount() != nbvalue )
{
std::cout << " Failed" << std::endl
- << " Number of content values is incorrect" << std::endl;
+ << " Number of content values is incorrect" << std::endl
+ << " Found: " << entry->GetValueCount()
+ << " - Must be: " << nbvalue << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetValue(i) != lvalue[i] )
{
std::cout << " Failed" << std::endl
- << " Content of entry's values is incorrect : id " << i << std::endl;
+ << " Content of entry's values is incorrect : id " << i << std::endl
+ << " Found: " << entry->GetValue(i)
+ << " - Must be: " << lvalue[i] << std::endl;
delete dict;
delete entry;
return(1);
if( memcmp(entry->GetString().c_str(),data,strlen(data)) != 0 )
{
std::cout << " Failed" << std::endl
- << " Content of string is incorrect" << std::endl;
+ << " Content of string is incorrect" << std::endl
+ << " Found: " << entry->GetString().c_str()
+ << " - Must be: " << data << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetValueCount() != nbvalue )
{
std::cout << " Failed" << std::endl
- << " Number of content values is incorrect" << std::endl;
+ << " Number of content values is incorrect" << std::endl
+ << " Found: " << entry->GetValueCount()
+ << " - Must be: " << nbvalue << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetValue(i) != lvalue[i] )
{
std::cout << " Failed" << std::endl
- << " Content of entry's values is incorrect : id " << i << std::endl;
+ << " Content of entry's values is incorrect : id " << i << std::endl
+ << " Found: " << entry->GetValue(i)
+ << " - Must be: " << lvalue[i] << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetLength() != nbvalue*sizeof(float) )
{
std::cout << " Failed" << std::endl
- << " BinArea length is incorrect" << std::endl;
+ << " BinArea length is incorrect" << std::endl
+ << " Found: " << entry->GetLength()
+ << " - Must be: " << nbvalue*sizeof(float) << std::endl;
delete dict;
delete entry;
return(1);
if( memcmp(entry->GetString().c_str(),fdata,strlen(fdata)) != 0 )
{
std::cout << " Failed" << std::endl
- << " Content of string is incorrect" << std::endl;
+ << " Content of string is incorrect" << std::endl
+ << " Found: " << entry->GetString().c_str()
+ << " - Must be: " << fdata << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetValueCount() != nbvalue )
{
std::cout << " Failed" << std::endl
- << " Number of content values is incorrect" << std::endl;
+ << " Number of content values is incorrect" << std::endl
+ << " Found: " << entry->GetValueCount()
+ << " - Must be: " << nbvalue << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetValue(i) != fvalue[i] )
{
std::cout << " Failed" << std::endl
- << " Content of entry's values is incorrect : id " << i << std::endl;
+ << " Content of entry's values is incorrect : id " << i << std::endl
+ << " Found: " << entry->GetValue(i)
+ << " - Must be: " << fvalue[i] << std::endl;
delete dict;
delete entry;
return(1);
if( memcmp(entry->GetString().c_str(),fdata,strlen(fdata)) != 0 )
{
std::cout << " Failed" << std::endl
- << " Content of string is incorrect" << std::endl;
+ << " Content of string is incorrect" << std::endl
+ << " Found: " << entry->GetString().c_str()
+ << " - Must be: " << fdata << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetValueCount() != nbvalue )
{
std::cout << " Failed" << std::endl
- << " Number of content values is incorrect" << std::endl;
+ << " Number of content values is incorrect" << std::endl
+ << " Found: " << entry->GetValueCount()
+ << " - Must be: " << nbvalue << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetValue(i) != fvalue[i] )
{
std::cout << " Failed" << std::endl
- << " Content of entry's values is incorrect : id " << i << std::endl;
+ << " Content of entry's values is incorrect : id " << i << std::endl
+ << " Found: " << entry->GetValue(i)
+ << " - Must be: " << fvalue[i] << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetLength() != nbvalue*sizeof(double) )
{
std::cout << " Failed" << std::endl
- << " BinArea length is incorrect" << std::endl;
+ << " BinArea length is incorrect" << std::endl
+ << " Found: " << entry->GetLength()
+ << " - Must be: " << nbvalue*sizeof(double) << std::endl;
delete dict;
delete entry;
return(1);
if( memcmp(entry->GetString().c_str(),fdata,strlen(fdata)) != 0 )
{
std::cout << " Failed" << std::endl
- << " Content of string is incorrect" << std::endl;
+ << " Content of string is incorrect" << std::endl
+ << " Found: " << entry->GetString().c_str()
+ << " - Must be: " << fdata << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetValueCount() != nbvalue )
{
std::cout << " Failed" << std::endl
- << " Number of content values is incorrect" << std::endl;
+ << " Number of content values is incorrect" << std::endl
+ << " Found: " << entry->GetValueCount()
+ << " - Must be: " << nbvalue << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetValue(i) != dvalue[i] )
{
std::cout << " Failed" << std::endl
- << " Content of entry's values is incorrect : id " << i << std::endl;
+ << " Content of entry's values is incorrect : id " << i << std::endl
+ << " Found: " << entry->GetValue(i)
+ << " - Must be: " << dvalue[i] << std::endl;
delete dict;
delete entry;
return(1);
if( memcmp(entry->GetString().c_str(),fdata,strlen(fdata)) != 0 )
{
std::cout << " Failed" << std::endl
- << " Content of string is incorrect" << std::endl;
+ << " Content of string is incorrect" << std::endl
+ << " Found: " << entry->GetString().c_str()
+ << " - Must be: " << fdata << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetValueCount() != nbvalue )
{
std::cout << " Failed" << std::endl
- << " Number of content values is incorrect" << std::endl;
+ << " Number of content values is incorrect" << std::endl
+ << " Found: " << entry->GetValueCount()
+ << " - Must be: " << nbvalue << std::endl;
delete dict;
delete entry;
return(1);
if( entry->GetValue(i) != dvalue[i] )
{
std::cout << " Failed" << std::endl
- << " Content of entry's values is incorrect : id " << i << std::endl;
+ << " Content of entry's values is incorrect : id " << i << std::endl
+ << " Found: " << entry->GetValue(i)
+ << " - Must be: " << dvalue[i] << std::endl;
delete dict;
delete entry;
return(1);