added inc/dec test to testPVStructureArray.cpp

This commit is contained in:
Marty Kraimer
2011-01-21 06:27:58 -05:00
parent f4a1173e7a
commit d16bc519c0
3 changed files with 107 additions and 0 deletions

View File

@@ -65,6 +65,17 @@ void testPowerSupplyArray(FILE * fd) {
buffer.clear();
powerSupplyArrayStruct->getField()->dumpReferenceCount(&buffer,0);
fprintf(fd," reference counts %s\n",buffer.c_str());
buffer.clear();
structure->dumpReferenceCount(&buffer,0);
fprintf(fd,"before incReferenceCount reference counts %s\n",buffer.c_str());
structure->incReferenceCount();
buffer.clear();
structure->dumpReferenceCount(&buffer,0);
fprintf(fd,"after incReferenceCount reference counts %s\n",buffer.c_str());
structure->decReferenceCount();
buffer.clear();
structure->dumpReferenceCount(&buffer,0);
fprintf(fd,"after decReferenceCount reference counts %s\n",buffer.c_str());
delete powerSupplyArrayStruct;
}