X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FTestDicomString.cxx;h=006d3b450042db153ff533fb5f374bf6186905b4;hb=d9f8b4b69e332d38e9c883ba60f40dc858883de9;hp=f12073ed2f7d6d3a74d8d712fcc227fc465af6be;hpb=f0ea8af1179c35ddc83da32df10813899427214d;p=gdcm.git diff --git a/Testing/TestDicomString.cxx b/Testing/TestDicomString.cxx index f12073ed..006d3b45 100644 --- a/Testing/TestDicomString.cxx +++ b/Testing/TestDicomString.cxx @@ -1,6 +1,24 @@ +/*========================================================================= + + Program: gdcm + Module: $RCSfile: TestDicomString.cxx,v $ + Language: C++ + Date: $Date: 2005/02/02 10:05:26 $ + Version: $Revision: 1.5 $ + + Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de + l'Image). All rights reserved. See Doc/License.txt or + http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ #include "gdcmUtil.h" +#include -int TestDicomString(int , char* []) +int TestDicomString(int, char *[]) { int i; const char *s = "\0\0"; @@ -11,14 +29,15 @@ int TestDicomString(int , char* []) assert( a.c_str()[i] == '\0' ); assert( a.data()[i] == '\0' ); } - assert( a.c_str()[3] == '\0' ); + assert( a.c_str()[2] == '\0' ); /* std::string zeros(x, 0); char s1[] = "\0"; char s2[] = "\0\0"; char s3[] = "\0\0\0"; -char s4[] = "\0abc";*/ +char s4[] = "\0abc"; +*/ return 0; }