X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FTestVR.cxx;h=46ab1af17d68b19a2c54ba003ed0cbfc988f49da;hb=745e3abcf3563cd15ebb92316d6dd800d8199340;hp=303ec22dfaa1f422bc38d3e20df6cd44c982ffef;hpb=f541928adfc662b7ae54169e75d2bcf05566b724;p=gdcm.git diff --git a/Testing/TestVR.cxx b/Testing/TestVR.cxx index 303ec22d..46ab1af1 100644 --- a/Testing/TestVR.cxx +++ b/Testing/TestVR.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestVR.cxx,v $ Language: C++ - Date: $Date: 2005/10/21 08:28:02 $ - Version: $Revision: 1.10 $ + Date: $Date: 2007/05/23 14:18:06 $ + Version: $Revision: 1.13 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,61 +21,63 @@ int TestVR(int , char *[]) { int error = 0; - gdcm::VR *vr = new gdcm::VR(); + GDCM_NAME_SPACE::VR *vr = GDCM_NAME_SPACE::VR::New(); - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); - // There should be 16 entries ... + // We should test the 27 entries ... vr->Print( std::cout ); // Valid VR if( !vr->IsValidVR( "PN" ) ) { - std::cerr << "'PN' is not a valid VR" << std::endl; + std::cerr << "'PN' is not recognized as a valid VR" << std::endl; error++; } if( !vr->IsValidVR( "FD" ) ) { - std::cerr << "'FD' is not a valid VR" << std::endl; + std::cerr << "'FD' is not recognized as a valid VR" << std::endl; error++; } if( vr->IsValidVR( "" ) ) { - std::cerr << "'' is a valid VR" << std::endl; + std::cerr << "'' is recognized as a valid VR" << std::endl; error++; } if( vr->IsValidVR( " " ) ) { - std::cerr << "' ' is a valid VR" << std::endl; + std::cerr << "' ' is recognized as a valid VR" << std::endl; error++; } if( vr->IsValidVR( "\000/" ) ) { - std::cerr << "' /' is a valid VR" << std::endl; + std::cerr << "' /' is recognized as a valid VR" << std::endl; error++; } - if( vr->IsValidVR( gdcm::GDCM_VRUNKNOWN ) ) + if( vr->IsValidVR( GDCM_NAME_SPACE::GDCM_VRUNKNOWN ) ) { - std::cerr << "' ' is a valid VR" << std::endl; + std::cerr << "' ' is recognized as a valid VR" << std::endl; error++; } // String representable + //--------------------- if( !vr->IsVROfStringRepresentable( "PN" ) ) { - std::cerr << "'PN' is not a string representable" << std::endl; + std::cerr << "'PN' is not recognized as a string representable" << std::endl; error++; } - if( vr->IsVROfStringRepresentable( "FD" ) ) + if( vr->IsVROfStringRepresentable( "OB" ) ) { - std::cerr << "'FD' is a string representable" << std::endl; + std::cerr << "'OB' is recognized as a string representable" << std::endl; error++; } // Binary representable - if( !vr->IsVROfBinaryRepresentable( "FD" ) ) + //--------------------- + if( !vr->IsVROfBinaryRepresentable( "OB" ) ) { - std::cerr << "FD is not a binary representable" << std::endl; + std::cerr << "OB is not recognized as a binary representable" << std::endl; error++; } if( vr->IsVROfBinaryRepresentable( "PN" ) ) @@ -85,6 +87,7 @@ int TestVR(int , char *[]) } // Sequence + //--------- if( vr->IsVROfSequence( "" ) ) { std::cerr << "'' is a sequence" << std::endl; @@ -92,10 +95,10 @@ int TestVR(int , char *[]) } if( !vr->IsVROfSequence( "SQ" ) ) { - std::cerr << "'SQ' is not a sequence" << std::endl; + std::cerr << "'SQ' is not recognized as a Sequence" << std::endl; error++; } - delete vr; + vr->Delete(); return error; }