summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/testRegistry.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-09-16 17:56:09 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-09-16 17:56:09 (GMT)
commit767057f37fa6ce196b15ee2243a1d409b33ba893 (patch)
tree1a4756eb33488182cbbf42a81dfdd3013f42e4d9 /Source/kwsys/testRegistry.cxx
parent9b486bacfc98d6878b0e48f0136653c98cc5b385 (diff)
downloadCMake-767057f37fa6ce196b15ee2243a1d409b33ba893.zip
CMake-767057f37fa6ce196b15ee2243a1d409b33ba893.tar.gz
CMake-767057f37fa6ce196b15ee2243a1d409b33ba893.tar.bz2
BUG: Fix encoding and add deleting to the test
Diffstat (limited to 'Source/kwsys/testRegistry.cxx')
-rw-r--r--Source/kwsys/testRegistry.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/kwsys/testRegistry.cxx b/Source/kwsys/testRegistry.cxx
index 6906dac..b808f11 100644
--- a/Source/kwsys/testRegistry.cxx
+++ b/Source/kwsys/testRegistry.cxx
@@ -35,7 +35,7 @@
kwsys_ios::cout << "Error in: " << #x << kwsys_ios::endl; \
}
-#define CHE(x,y,res) if ( strcmp(x,y) ) \
+#define CHE(x,y,res) if ( x && y && strcmp(x,y) ) \
{ \
res = 1; \
kwsys_ios::cout << "Error, " << x << " != " << y << kwsys_ios::endl; \
@@ -90,10 +90,14 @@ int main(int, char**)
IFT(reg.SetValue("TestSubkeyWithVeryLongInFactSoLongItsHardToImagineAnybodyWouldReallyDoItLongName", "TestKey1", longStringWithNewLines), res);
IFT(reg.ReadValue("TestSubkeyWithVeryLongInFactSoLongItsHardToImagineAnybodyWouldReallyDoItLongName", "TestKey1", &buffer), res);
CHE(buffer, longStringWithNewLines, res);
+ IFT(reg.DeleteValue("TestSubkeyWithVeryLongInFactSoLongItsHardToImagineAnybodyWouldReallyDoItLongName", "TestKey1"), res);
+ IFNT(reg.ReadValue("TestSubkeyWithVeryLongInFactSoLongItsHardToImagineAnybodyWouldReallyDoItLongName", "TestKey1", &buffer), res);
IFT(reg.SetValue("TestSubkeyWith = EqualSignChar", "TestKey = 1", "Some value"), res);
IFT(reg.ReadValue("TestSubkeyWith = EqualSignChar", "TestKey = 1", &buffer), res);
CHE(buffer, "Some value", res);
+ IFT(reg.DeleteValue("TestSubkeyWith = EqualSignChar", "TestKey = 1"), res);
+ IFNT(reg.ReadValue("TestSubkeyWith = EqualSignChar", "TestKey = 1", &buffer), res);
if ( res )
{