summaryrefslogtreecommitdiff
path: root/registry/test
diff options
context:
space:
mode:
authorJuergen Schmidt <jsc@openoffice.org>2000-10-09 10:56:04 +0000
committerJuergen Schmidt <jsc@openoffice.org>2000-10-09 10:56:04 +0000
commita071bf4867b8977185460c57b379343e8ea2ea20 (patch)
tree697b8933ba53db5403bb4e8bbdafc5cb47af3b20 /registry/test
parent7b1a97badbc2387962c36875712c6ef5df0b0ea9 (diff)
change the binary typelibrary format, extend the test
Diffstat (limited to 'registry/test')
-rw-r--r--registry/test/testregcpp.cxx21
1 files changed, 19 insertions, 2 deletions
diff --git a/registry/test/testregcpp.cxx b/registry/test/testregcpp.cxx
index ffdbdb8d721e..e8a16ba743b1 100644
--- a/registry/test/testregcpp.cxx
+++ b/registry/test/testregcpp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: testregcpp.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 15:18:43 $
+ * last change: $Author: jsc $ $Date: 2000-10-09 11:56:04 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -208,6 +208,8 @@ void test_coreReflection()
if (reader.isValid())
{
+ VOS_ENSHURE(reader.getTypeName().equals(OUString::createFromAscii("ModuleA")), "testCoreReflection error 9a2");
+
RTConstValue aReadConst = reader.getFieldConstValue(8);
OString aConstStr = OUStringToOString(aConst.m_value.aString, RTL_TEXTENCODING_ASCII_US);
VOS_ENSHURE(aConstStr.equals("dies ist ein unicode string"), "testCoreReflection error 9b");
@@ -357,6 +359,21 @@ void test_coreReflection()
sal_uInt32 aBlopSize = writer.getBlopSize();
VOS_ENSHURE(!key7.setValue(OUString(), RG_VALUETYPE_BINARY, (void*)pBlop, aBlopSize), "testCoreReflection error 9e");
+ sal_uInt8* readBlop = (sal_uInt8*)rtl_allocateMemory(aBlopSize);
+ VOS_ENSHURE(!key7.getValue(OUString(), (void*)readBlop) , "testCoreReflection error 9e2");
+
+ RegistryTypeReader reader(*pReaderLoader, readBlop, aBlopSize, sal_True);
+
+ if (reader.isValid())
+ {
+ VOS_ENSHURE(reader.getTypeName().equals(OUString::createFromAscii("ModuleA/ServiceA")), "testCoreReflection error 9e3");
+
+ sal_uInt32 referenceCount = reader.getReferenceCount();
+ VOS_ENSHURE( referenceCount == 4, "testCoreReflection error 9e4");
+
+ OUString refName = reader.getReferenceName(0);
+ VOS_ENSHURE(refName.equals(OUString::createFromAscii("ModuleA/XInterfaceA")), "testCoreReflection error 9e5");
+ }
}
{