[cig-commits] commit: Merge with 1.4.x
Mercurial
hg at geodynamics.org
Fri Feb 5 12:09:36 PST 2010
changeset: 774:69f4dc15d8a6
tag: tip
parent: 772:c16613f1fc54
parent: 773:8b4a54c7ba19
user: Walter Landry <wlandry at caltech.edu>
date: Thu Feb 04 15:13:37 2010 -0800
files: Base/Automation/tests/HierarchyTableSuite.c Base/Context/src/AbstractContext.c Base/Context/src/VariableAllVC.c Base/Context/tests/DictionaryCheckSuite.c Base/Extensibility/tests/EntryPointSuite.c Base/Foundation/tests/MemMonitorSuite.c Base/Foundation/tests/MemoryReportSuite.c Base/Foundation/tests/ObjectListSuite.c Base/IO/tests/IO_HandlerSuite.c Base/IO/tests/JournalSuite.c
description:
Merge with 1.4.x
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Automation/src/Meta.c
--- a/Base/Automation/src/Meta.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Automation/src/Meta.c Thu Feb 04 15:13:37 2010 -0800
@@ -47,133 +47,133 @@
/* Info parts --------------------------------------------------------------------------------------------------------------------*/
char* Stg_Meta_GetType( Dictionary* dictionary ) {
- Dictionary* info = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, "info" ) );
- return Dictionary_Entry_Value_AsString( Dictionary_Get( info, "title" ) );
+ Dictionary* info = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, (Dictionary_Entry_Key)"info" ) );
+ return Dictionary_Entry_Value_AsString( Dictionary_Get( info, (Dictionary_Entry_Key)"title" ) );
}
-char* Stg_Meta_GetCreator( Dictionary* dictionary ) {
- Dictionary* info = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, "info" ) );
- return Dictionary_Entry_Value_AsString( Dictionary_Get( info, "creator" ) );
+char* Stg_Meta_GetCreator( Dictionary* dictionary ) {
+ Dictionary* info = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, (Dictionary_Entry_Key)"info" ) );
+ return Dictionary_Entry_Value_AsString( Dictionary_Get( info, (Dictionary_Entry_Key)"creator" ) );
}
-char* Stg_Meta_GetPublisher( Dictionary* dictionary ) {
- Dictionary* info = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, "info" ) );
- return Dictionary_Entry_Value_AsString( Dictionary_Get( info, "publisher" ) );
+char* Stg_Meta_GetPublisher( Dictionary* dictionary ) {
+ Dictionary* info = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, (Dictionary_Entry_Key)"info" ) );
+ return Dictionary_Entry_Value_AsString( Dictionary_Get( info, (Dictionary_Entry_Key)"publisher" ) );
}
-char* Stg_Meta_GetRights( Dictionary* dictionary ) {
- Dictionary* info = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, "info" ) );
- return Dictionary_Entry_Value_AsString( Dictionary_Get( info, "rights" ) );
+char* Stg_Meta_GetRights( Dictionary* dictionary ) {
+ Dictionary* info = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, (Dictionary_Entry_Key)"info" ) );
+ return Dictionary_Entry_Value_AsString( Dictionary_Get( info, (Dictionary_Entry_Key)"rights" ) );
}
-char* Stg_Meta_GetSource( Dictionary* dictionary ) {
- Dictionary* info = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, "info" ) );
- return Dictionary_Entry_Value_AsString( Dictionary_Get( info, "source" ) );
+char* Stg_Meta_GetSource( Dictionary* dictionary ) {
+ Dictionary* info = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, (Dictionary_Entry_Key)"info" ) );
+ return Dictionary_Entry_Value_AsString( Dictionary_Get( info, (Dictionary_Entry_Key)"source" ) );
}
-char* Stg_Meta_GetSubject( Dictionary* dictionary ) {
- Dictionary* info = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, "info" ) );
- return Dictionary_Entry_Value_AsString( Dictionary_Get( info, "subject" ) );
+char* Stg_Meta_GetSubject( Dictionary* dictionary ) {
+ Dictionary* info = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, (Dictionary_Entry_Key)"info" ) );
+ return Dictionary_Entry_Value_AsString( Dictionary_Get( info, (Dictionary_Entry_Key)"subject" ) );
}
-char* Stg_Meta_GetDescription( Dictionary* dictionary ) {
- Dictionary* info = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, "info" ) );
- return Dictionary_Entry_Value_AsString( Dictionary_Get( info, "description" ) );
+char* Stg_Meta_GetDescription( Dictionary* dictionary ) {
+ Dictionary* info = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, (Dictionary_Entry_Key)"info" ) );
+ return Dictionary_Entry_Value_AsString( Dictionary_Get( info, (Dictionary_Entry_Key)"description" ) );
}
/* Code parts --------------------------------------------------------------------------------------------------------------------*/
-char* Stg_Meta_GetExampleDocumentation( Dictionary* dictionary ) {
- Dictionary* code = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, "code" ) );
- return Dictionary_Entry_Value_AsString( Dictionary_Get( code, "example-documentation" ) );
+char* Stg_Meta_GetExampleDocumentation( Dictionary* dictionary ) {
+ Dictionary* code = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, (Dictionary_Entry_Key)"code" ) );
+ return Dictionary_Entry_Value_AsString( Dictionary_Get( code, (Dictionary_Entry_Key)"example-documentation" ) );
}
-char* Stg_Meta_GetExampleCode( Dictionary* dictionary ) {
- Dictionary* code = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, "code" ) );
- return Dictionary_Entry_Value_AsString( Dictionary_Get( code, "example-code" ) );
+char* Stg_Meta_GetExampleCode( Dictionary* dictionary ) {
+ Dictionary* code = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, (Dictionary_Entry_Key)"code" ) );
+ return Dictionary_Entry_Value_AsString( Dictionary_Get( code, (Dictionary_Entry_Key)"example-code" ) );
}
-char* Stg_Meta_GetInherits( Dictionary* dictionary ) {
- Dictionary* code = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, "code" ) );
- return Dictionary_Entry_Value_AsString( Dictionary_Get( code, "inherits" ) );
+char* Stg_Meta_GetInherits( Dictionary* dictionary ) {
+ Dictionary* code = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, (Dictionary_Entry_Key)"code" ) );
+ return Dictionary_Entry_Value_AsString( Dictionary_Get( code, (Dictionary_Entry_Key)"inherits" ) );
}
/* Implements parts --------------------------------------------------------------------------------------------------------------*/
-char* Stg_Meta_GetReference( Dictionary* dictionary ) {
- Dictionary* implements = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, "implements" ) );
- return Dictionary_Entry_Value_AsString( Dictionary_Get( implements, "reference" ) );
+char* Stg_Meta_GetReference( Dictionary* dictionary ) {
+ Dictionary* implements = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, (Dictionary_Entry_Key)"implements" ) );
+ return Dictionary_Entry_Value_AsString( Dictionary_Get( implements, (Dictionary_Entry_Key)"reference" ) );
}
-char* Stg_Meta_GetEquation( Dictionary* dictionary ) {
- Dictionary* implements = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, "implements" ) );
- return Dictionary_Entry_Value_AsString( Dictionary_Get( implements, "equation" ) );
+char* Stg_Meta_GetEquation( Dictionary* dictionary ) {
+ Dictionary* implements = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, (Dictionary_Entry_Key)"implements" ) );
+ return Dictionary_Entry_Value_AsString( Dictionary_Get( implements, (Dictionary_Entry_Key)"equation" ) );
}
/* Parameter parts ---------------------------------------------------------------------------------------------------------------*/
-Index Stg_Meta_GetParameterCount( Dictionary* dictionary ) {
- Dictionary* parameters = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, "parameters" ) );
- return Dictionary_GetCount( parameters );
+Index Stg_Meta_GetParameterCount( Dictionary* dictionary ) {
+ Dictionary* parameters = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, (Dictionary_Entry_Key)"parameters" ) );
+ return Dictionary_GetCount( parameters );
}
char* Stg_Meta_GetParameterName( Dictionary* dictionary, Index i ) {
- Dictionary* parameters = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, "parameters" ) );
+ Dictionary* parameters = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, (Dictionary_Entry_Key)"parameters" ) );
Dictionary* parameter = Dictionary_Entry_Value_AsDictionary( Dictionary_GetByIndex( parameters, i ) );
- return Dictionary_Entry_Value_AsString( Dictionary_Get( parameter, "name" ) );
+ return Dictionary_Entry_Value_AsString( Dictionary_Get( parameter, (Dictionary_Entry_Key)"name" ) );
}
char* Stg_Meta_GetParameterType( Dictionary* dictionary, Index i ) {
- Dictionary* parameters = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, "parameters" ) );
+ Dictionary* parameters = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, (Dictionary_Entry_Key)"parameters" ) );
Dictionary* parameter = Dictionary_Entry_Value_AsDictionary( Dictionary_GetByIndex( parameters, i ) );
- return Dictionary_Entry_Value_AsString( Dictionary_Get( parameter, "type" ) );
+ return Dictionary_Entry_Value_AsString( Dictionary_Get( parameter, (Dictionary_Entry_Key)"type" ) );
}
char* Stg_Meta_GetParameterDefault( Dictionary* dictionary, Index i ) {
- Dictionary* parameters = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, "parameters" ) );
+ Dictionary* parameters = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, (Dictionary_Entry_Key)"parameters" ) );
Dictionary* parameter = Dictionary_Entry_Value_AsDictionary( Dictionary_GetByIndex( parameters, i ) );
- return Dictionary_Entry_Value_AsString( Dictionary_Get( parameter, "default" ) );
+ return Dictionary_Entry_Value_AsString( Dictionary_Get( parameter, (Dictionary_Entry_Key)"default" ) );
}
char* Stg_Meta_GetParameterDocumentation( Dictionary* dictionary, Index i ) {
- Dictionary* parameters = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, "parameters" ) );
+ Dictionary* parameters = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, (Dictionary_Entry_Key)"parameters" ) );
Dictionary* parameter = Dictionary_Entry_Value_AsDictionary( Dictionary_GetByIndex( parameters, i ) );
- return Dictionary_Entry_Value_AsString( Dictionary_Get( parameter, "documentation" ) );
+ return Dictionary_Entry_Value_AsString( Dictionary_Get( parameter, (Dictionary_Entry_Key)"documentation" ) );
}
/* Association parts -------------------------------------------------------------------------------------------------------------*/
-Index Stg_Meta_GetAssociationCount( Dictionary* dictionary ) {
- Dictionary* associations = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, "associations" ) );
- return Dictionary_GetCount( associations );
+Index Stg_Meta_GetAssociationCount( Dictionary* dictionary ) {
+ Dictionary* associations = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, (Dictionary_Entry_Key)"associations" ) );
+ return Dictionary_GetCount( associations );
}
char* Stg_Meta_GetAssociationName( Dictionary* dictionary, Index i ) {
- Dictionary* associations = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, "associations" ) );
+ Dictionary* associations = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, (Dictionary_Entry_Key)"associations" ) );
Dictionary* association = Dictionary_Entry_Value_AsDictionary( Dictionary_GetByIndex( associations, i ) );
- return Dictionary_Entry_Value_AsString( Dictionary_Get( association, "name" ) );
+ return Dictionary_Entry_Value_AsString( Dictionary_Get( association, (Dictionary_Entry_Key)"name" ) );
}
char* Stg_Meta_GetAssociationType( Dictionary* dictionary, Index i ) {
- Dictionary* associations = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, "associations" ) );
+ Dictionary* associations = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, (Dictionary_Entry_Key)"associations" ) );
Dictionary* association = Dictionary_Entry_Value_AsDictionary( Dictionary_GetByIndex( associations, i ) );
- return Dictionary_Entry_Value_AsString( Dictionary_Get( association, "type" ) );
+ return Dictionary_Entry_Value_AsString( Dictionary_Get( association, (Dictionary_Entry_Key)"type" ) );
}
char* Stg_Meta_GetAssociationNillable( Dictionary* dictionary, Index i ) {
- Dictionary* associations = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, "associations" ) );
+ Dictionary* associations = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, (Dictionary_Entry_Key)"associations" ) );
Dictionary* association = Dictionary_Entry_Value_AsDictionary( Dictionary_GetByIndex( associations, i ) );
- return Dictionary_Entry_Value_AsString( Dictionary_Get( association, "nillable" ) );
+ return Dictionary_Entry_Value_AsString( Dictionary_Get( association, (Dictionary_Entry_Key)"nillable" ) );
}
char* Stg_Meta_GetAssociationDocumentation( Dictionary* dictionary, Index i ) {
- Dictionary* associations = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, "associations" ) );
+ Dictionary* associations = Dictionary_Entry_Value_AsDictionary( Dictionary_Get( dictionary, (Dictionary_Entry_Key)"associations" ) );
Dictionary* association = Dictionary_Entry_Value_AsDictionary( Dictionary_GetByIndex( associations, i ) );
- return Dictionary_Entry_Value_AsString( Dictionary_Get( association, "documentation" ) );
+ return Dictionary_Entry_Value_AsString( Dictionary_Get( association, (Dictionary_Entry_Key)"documentation" ) );
}
/* Print function ----------------------------------------------------------------------------------------------------------------*/
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Automation/tests/ComponentCopySuite.c
--- a/Base/Automation/tests/ComponentCopySuite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Automation/tests/ComponentCopySuite.c Thu Feb 04 15:13:37 2010 -0800
@@ -132,8 +132,8 @@ void Stg_ComponentA_AssignFromXML( void*
void Stg_ComponentA_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
Stg_ComponentA* self = (Stg_ComponentA*)component;
- self->b = Stg_ComponentFactory_ConstructByName( cf, "b", Stg_ComponentB, True, data ) ;
- self->c = Stg_ComponentFactory_ConstructByName( cf, "c", Stg_ComponentC, True, data ) ;
+ self->b = Stg_ComponentFactory_ConstructByName( cf, (Name)"b", Stg_ComponentB, True, data ) ;
+ self->c = Stg_ComponentFactory_ConstructByName( cf, (Name)"c", Stg_ComponentC, True, data ) ;
}
void Stg_ComponentA_Build( void* component, void* data ) {
Stg_ComponentA* self = (Stg_ComponentA*)component;
@@ -285,7 +285,7 @@ void Stg_ComponentC_AssignFromXML( void*
void Stg_ComponentC_AssignFromXML( void* component, Stg_ComponentFactory* cf, void* data ) {
Stg_ComponentC* self = (Stg_ComponentC*)component;
- self->b = Stg_ComponentFactory_ConstructByName( cf, "b", Stg_ComponentB, True, data ) ;
+ self->b = Stg_ComponentFactory_ConstructByName( cf, (Name)"b", Stg_ComponentB, True, data ) ;
}
void Stg_ComponentC_Build( void* component, void* data ) {
Stg_ComponentC* self = (Stg_ComponentC*)component;
@@ -330,27 +330,19 @@ void ComponentCopySuite_TestCopy( Compon
Stg_ComponentFactory* cf;
- Stg_ComponentRegister_Add(
- Stg_ComponentRegister_Get_ComponentRegister(),
- Stg_ComponentA_Type,
- "0",
- (Stg_Component_DefaultConstructorFunction*)Stg_ComponentA_NewDefault );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), Stg_ComponentA_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*)Stg_ComponentA_NewDefault );
Stg_ComponentRegister_Add(
- Stg_ComponentRegister_Get_ComponentRegister(),
+ Stg_ComponentRegister_Get_ComponentRegister( ),
Stg_ComponentB_Type,
"0",
(Stg_Component_DefaultConstructorFunction*)Stg_ComponentB_NewDefault );
- Stg_ComponentRegister_Add(
- Stg_ComponentRegister_Get_ComponentRegister(),
- Stg_ComponentC_Type,
- "0",
- (Stg_Component_DefaultConstructorFunction*)Stg_ComponentC_NewDefault );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), Stg_ComponentC_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*)Stg_ComponentC_NewDefault );
/* Creating a dictionary of components */
componentsDictionary = Dictionary_New();
- componentDict = Dictionary_New();
+ componentDict = Dictionary_New( );
Dictionary_AddFromString( componentDict, "Type", "Stg_ComponentA" );
Dictionary_AddFromDictionary( componentsDictionary, "a", componentDict );
componentDict = Dictionary_New();
@@ -368,14 +360,14 @@ void ComponentCopySuite_TestCopy( Compon
Stg_ComponentFactory_CreateComponents( cf );
Stg_ComponentFactory_ConstructComponents( cf, 0 /* dummy */ );
- a = (Stg_ComponentA*)LiveComponentRegister_Get( cf->LCRegister, "a" );
+ a = (Stg_ComponentA*)LiveComponentRegister_Get( cf->LCRegister, (Name)"a" );
/* "Stg_Components creation" */
pcu_check_true(
a != NULL &&
a->b != NULL &&
a->c != NULL &&
- a->b == a->c->b );
+ a->b == a->c->b );
aCopy = Stg_Class_Copy( a, NULL, True, "_dup", NULL );
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Automation/tests/HierarchyTableSuite.c
--- a/Base/Automation/tests/HierarchyTableSuite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Automation/tests/HierarchyTableSuite.c Thu Feb 04 15:13:37 2010 -0800
@@ -118,10 +118,10 @@ void HierarchyTableSuite_TestIsChild( Hi
void HierarchyTableSuite_TestPrintParents( HierarchyTableSuiteData* data ) {
- Stream* stream = Journal_Register( Info_Type, "testStream" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"testStream" );
const Name testFilename = "testHTable-PrintParents.txt";
- if (data->rank==0) {
+ if (data->rank==0 ) {
Stream_RedirectFile( stream, testFilename );
}
@@ -144,10 +144,10 @@ void HierarchyTableSuite_TestPrintParent
void HierarchyTableSuite_TestPrintChildren( HierarchyTableSuiteData* data ) {
- Stream* stream = Journal_Register( Info_Type, "testStream" );
+ Stream* stream = Journal_Register( Info_Type, (Name)"testStream" );
const Name testFilename = "testHTable-PrintChildren.txt";
- if (data->rank==0) {
+ if (data->rank==0 ) {
Stream_RedirectFile( stream, testFilename );
}
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Container/tests/LinkedListSuite.c
--- a/Base/Container/tests/LinkedListSuite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Container/tests/LinkedListSuite.c Thu Feb 04 15:13:37 2010 -0800
@@ -77,7 +77,7 @@ void LinkedListSuite_DataPrintFunction(
Stream *myStream = NULL;
assert (nodeData);
- myStream = Journal_Register( InfoStream_Type, "LinkedListStream" );
+ myStream = Journal_Register( InfoStream_Type, (Name)"LinkedListStream" );
Journal_Printf( myStream, "\t%d\n", *(int*)nodeData );
}
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Container/tests/MaxHeapSuite.c
--- a/Base/Container/tests/MaxHeapSuite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Container/tests/MaxHeapSuite.c Thu Feb 04 15:13:37 2010 -0800
@@ -76,7 +76,7 @@ void** extendArray( int newCount, void *
/* TODO Check if this is executed by creating memory */
(*(int***)array) = (int**)Memory_Realloc_Array((*(int***)array), int**, newCount );
if( ((*(int***)array) == NULL) ){
- Journal_Firewall( 0, Journal_Register(ErrorStream_Type, "testMaxHeap"), "Memory allocation failed in '%s'!!\n Aborting..!!\n", __func__ );
+ Journal_Firewall( 0, Journal_Register( ErrorStream_Type, (Name)"testMaxHeap" ), "Memory allocation failed in '%s'!!\n Aborting..!!\n", __func__ );
}
else{
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Context/src/AbstractContext.c
--- a/Base/Context/src/AbstractContext.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Context/src/AbstractContext.c Thu Feb 04 15:13:37 2010 -0800
@@ -114,7 +114,7 @@ AbstractContext* _AbstractContext_New(
}
void _AbstractContext_Init( AbstractContext* self ) {
- Stream* debug = Journal_Register( DebugStream_Type, AbstractContext_Type );
+ Stream* debug = Journal_Register( DebugStream_Type, (Name)AbstractContext_Type );
char buf[80];
#ifdef READ_HDF5
@@ -144,15 +144,15 @@ void _AbstractContext_Init( AbstractCont
self->nproc,
self->rank );
}
- self->info = Journal_Register( InfoStream_Type, AbstractContext_Type );
- self->verbose = Journal_Register( InfoStream_Type, AbstractContext_Type_Verbose );
+ self->info = Journal_Register( InfoStream_Type, (Name)AbstractContext_Type );
+ self->verbose = Journal_Register( InfoStream_Type, (Name)AbstractContext_Type_Verbose );
sprintf( buf, "journal.info.%s", AbstractContext_Type_Verbose );
- if( !Dictionary_Get( self->dictionary, buf ) ) {
+ if( !Dictionary_Get( self->dictionary, (Dictionary_Entry_Key)buf ) ) {
Journal_Enable_NamedStream( InfoStream_Type, AbstractContext_Type_Verbose, False );
}
/* Turn off the journal warning debug stream by default: even if debug is enabled in general */
- if( !Dictionary_Get( self->dictionary, "journal.debug.DictionaryWarning" ) ) {
+ if( !Dictionary_Get( self->dictionary, (Dictionary_Entry_Key)"journal.debug.DictionaryWarning" ) ) {
Journal_Enable_NamedStream( DebugStream_Type, "DictionaryWarning", False );
}
@@ -372,17 +372,17 @@ void _AbstractContext_AssignFromXML( voi
self->outputPath = StG_Strdup( Dictionary_Entry_Value_AsString(
Dictionary_GetDefault( self->dictionary, "outputPath", Dictionary_Entry_Value_FromString( "./" ) ) ) );
- if( Dictionary_Get( self->dictionary, "checkpointReadPath" ) ) {
- self->checkpointReadPath = StG_Strdup( Dictionary_Entry_Value_AsString( Dictionary_Get( self->dictionary, "checkpointReadPath" ) ) );
+ if( Dictionary_Get( self->dictionary, (Dictionary_Entry_Key)"checkpointReadPath" ) ) {
+ self->checkpointReadPath = StG_Strdup( Dictionary_Entry_Value_AsString( Dictionary_Get( self->dictionary, (Dictionary_Entry_Key)"checkpointReadPath" ) ) );
}
else {
- self->checkpointReadPath = StG_Strdup( self->outputPath );
+ self->checkpointReadPath = StG_Strdup( self->outputPath );
}
- if( Dictionary_Get( self->dictionary, "checkpointWritePath" ) ) {
- self->checkpointWritePath = StG_Strdup( Dictionary_Entry_Value_AsString( Dictionary_Get( self->dictionary, "checkpointWritePath" ) ) );
+ if( Dictionary_Get( self->dictionary, (Dictionary_Entry_Key)"checkpointWritePath" ) ) {
+ self->checkpointWritePath = StG_Strdup( Dictionary_Entry_Value_AsString( Dictionary_Get( self->dictionary, (Dictionary_Entry_Key)"checkpointWritePath" ) ) );
}
else {
- self->checkpointWritePath = StG_Strdup( self->outputPath );
+ self->checkpointWritePath = StG_Strdup( self->outputPath );
}
self->checkpointAppendStep = Dictionary_Entry_Value_AsBool(
@@ -436,10 +436,10 @@ void _AbstractContext_AssignFromXML( voi
int adjustedYear;
int adjustedMonth;
- Stream* s = Journal_Register( Info_Type, XML_IO_Handler_Type );
+ Stream* s = Journal_Register( Info_Type, (Name)XML_IO_Handler_Type );
/* Avoid confusing messages from XML_IO_Handler...turn it off temporarily */
- Bool isEnabled = Stream_IsEnable( s );
+ Bool isEnabled = Stream_IsEnable( s );
Stream_EnableSelfOnly( s, False );
ioHandler = XML_IO_Handler_New();
@@ -472,17 +472,17 @@ void _AbstractContext_AssignFromXML( voi
/* Note: these try for deprecated keys "start", "end" and "stop" as well as new ones "startTime" and
"stopTime" - Main.PatrickSunter - 4 November 2004 */
startTime = stopTime = 0;
- dictEntryVal = Dictionary_Get( self->dictionary, "start" );
- if ( NULL == dictEntryVal ) {
+ dictEntryVal = Dictionary_Get( self->dictionary, (Dictionary_Entry_Key)"start" );
+ if ( NULL == dictEntryVal ) {
dictEntryVal = Dictionary_GetDefault( self->dictionary, "startTime",
Dictionary_Entry_Value_FromDouble( startTime ) );
}
self->startTime = Dictionary_Entry_Value_AsDouble( dictEntryVal );
- dictEntryVal = Dictionary_Get( self->dictionary, "end" );
- if ( NULL == dictEntryVal ) {
- dictEntryVal = Dictionary_Get( self->dictionary, "stop" );
- if ( NULL == dictEntryVal ) {
+ dictEntryVal = Dictionary_Get( self->dictionary, (Dictionary_Entry_Key)"end" );
+ if ( NULL == dictEntryVal ) {
+ dictEntryVal = Dictionary_Get( self->dictionary, (Dictionary_Entry_Key)"stop" );
+ if ( NULL == dictEntryVal ) {
dictEntryVal = Dictionary_GetDefault( self->dictionary, "stopTime",
Dictionary_Entry_Value_FromDouble( stopTime ) );
}
@@ -491,8 +491,8 @@ void _AbstractContext_AssignFromXML( voi
/* maxTimeSteps of 0 means no maximum applied */
/* Note: these try for deprecated key "maxLoops" as well as new one "maxTimeSteps" - Main.PatrickSunter - 4 November 2004 */
- dictEntryVal = Dictionary_Get( self->dictionary, "maxLoops" );
- if ( NULL == dictEntryVal ) {
+ dictEntryVal = Dictionary_Get( self->dictionary, (Dictionary_Entry_Key)"maxLoops" );
+ if ( NULL == dictEntryVal ) {
dictEntryVal = Dictionary_GetDefault( self->dictionary, "maxTimeSteps", Dictionary_Entry_Value_FromUnsignedInt( 0 ) );
}
self->maxTimeSteps = Dictionary_Entry_Value_AsUnsignedInt( dictEntryVal );
@@ -520,7 +520,7 @@ void _AbstractContext_AssignFromXML( voi
}
/* Check if we have been provided a constant to multiply our calculated dt values by. */
- self->dtFactor = Dictionary_GetDouble_WithDefault( self->dictionary, "timestepFactor", 1.0 );
+ self->dtFactor = Dictionary_GetDouble_WithDefault( self->dictionary, (Dictionary_Entry_Key)"timestepFactor", 1.0 );
/* this defines all the entryPoints, eg, self->constructK, etc...
so it must go before we start KeyCall */
@@ -540,8 +540,8 @@ void _AbstractContext_AssignFromXML( voi
if( self->rank == 0 )
Context_PrintConcise( self, self->verbose );
- if ( True == Dictionary_GetBool_WithDefault( self->dictionary, "showJournalStatus", False ) ) {
- Journal_PrintConcise();
+ if ( True == Dictionary_GetBool_WithDefault( self->dictionary, (Dictionary_Entry_Key)"showJournalStatus", False ) ) {
+ Journal_PrintConcise( );
}
}
@@ -889,7 +889,7 @@ void _AbstractContext_LoadTimeInfoFromCh
char* timeInfoFileName = NULL;
char* timeInfoFileNamePart = NULL;
FILE* timeInfoFile;
- Stream* errorStr = Journal_Register( Error_Type, self->type );
+ Stream* errorStr = Journal_Register( Error_Type, (Name)self->type );
#ifdef READ_HDF5
hid_t file, fileSpace, fileData;
@@ -959,7 +959,7 @@ void _AbstractContext_SaveTimeInfo( void
FILE* timeInfoFile = NULL;
char* timeInfoFileName = NULL;
char* timeInfoFileNamePart = NULL;
- Stream* errorStr = Journal_Register( Error_Type, self->type );
+ Stream* errorStr = Journal_Register( Error_Type, (Name)self->type );
#ifdef WRITE_HDF5
hid_t file, fileSpace, fileData, props;
hsize_t count;
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Context/src/CompositeVC.c
--- a/Base/Context/src/CompositeVC.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Context/src/CompositeVC.c Thu Feb 04 15:13:37 2010 -0800
@@ -157,7 +157,7 @@ void _CompositeVC_ReadDictionary( void*
if( dictionary && !self->hasReadDictionary ) {
Dictionary_Entry_Value* vcList;
- vcList = Dictionary_Get( dictionary, "independentVCList" );
+ vcList = Dictionary_Get( dictionary, (Dictionary_Entry_Key)"independentVCList" );
if( vcList ) {
Index count;
@@ -165,15 +165,15 @@ void _CompositeVC_ReadDictionary( void*
count = Dictionary_Entry_Value_GetCount(vcList);
- for (entry_I = 0; entry_I < count; entry_I++) {
+ for (entry_I = 0; entry_I < count; entry_I++ ) {
Dictionary_Entry_Value* vcEntry;
Type type;
Dictionary* dictionary;
VariableCondition* vc;
vcEntry = Dictionary_Entry_Value_GetElement(vcList, entry_I);
- type = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember(vcEntry, "type"));
- dictionary = Dictionary_Entry_Value_AsDictionary(vcEntry);
+ type = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember( vcEntry, (Dictionary_Entry_Key)"type"));
+ dictionary = Dictionary_Entry_Value_AsDictionary(vcEntry );
vc = VariableCondition_Register_CreateNew( self->context, variableCondition_Register, self->variable_Register,
self->conFunc_Register, type, dictionary, self->data );
vc->cf = self->cf;
@@ -188,7 +188,7 @@ void _CompositeVC_ReadDictionary( void*
*/
}
}
- vcList = Dictionary_Get( dictionary, "vcList" );
+ vcList = Dictionary_Get( dictionary, (Dictionary_Entry_Key)"vcList" );
if( vcList ) {
Index count;
@@ -196,15 +196,15 @@ void _CompositeVC_ReadDictionary( void*
count = Dictionary_Entry_Value_GetCount(vcList);
- for (entry_I = 0; entry_I < count; entry_I++) {
+ for (entry_I = 0; entry_I < count; entry_I++ ) {
Dictionary_Entry_Value* vcEntry;
Type type;
Dictionary* dictionary;
VariableCondition* vc;
vcEntry = Dictionary_Entry_Value_GetElement(vcList, entry_I);
- type = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember(vcEntry, "type"));
- dictionary = Dictionary_Entry_Value_AsDictionary(vcEntry);
+ type = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember( vcEntry, (Dictionary_Entry_Key)"type"));
+ dictionary = Dictionary_Entry_Value_AsDictionary(vcEntry );
vc = VariableCondition_Register_CreateNew( self->context, variableCondition_Register, self->variable_Register,
self->conFunc_Register, type, dictionary, self->data );
vc->_readDictionary( vc, dictionary );
@@ -228,21 +228,21 @@ void _CompositeVC_AssignFromXML( void* c
later on when using the fucked up 'ReadDictionary' function. */
self->cf = cf;
- context = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Context", AbstractContext, False, data );
- if( !context )
- context = Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data );
+ context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", AbstractContext, False, data );
+ if( !context )
+ context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data );
variableRegister = context->variable_Register;
assert( variableRegister );
conditionFunctionRegister = condFunc_Register;
- assert( conditionFunctionRegister );
+ assert( conditionFunctionRegister );
- vcName = Stg_ComponentFactory_GetString( cf, self->name, "vcName", self->name );
+ vcName = Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"vcName", self->name );
- if ( cf->rootDict )
+ if ( cf->rootDict )
vcDict = Dictionary_GetDictionary( cf->rootDict, vcName );
- initData = Stg_ComponentFactory_ConstructByKey( cf, self->name, "Data", Stg_Component, False, data );
+ initData = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Data", Stg_Component, False, data );
_VariableCondition_Init( self, context, variableRegister, conditionFunctionRegister, vcDict );
_CompositeVC_Init( self, initData );
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Context/src/Init.c
--- a/Base/Context/src/Init.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Context/src/Init.c Thu Feb 04 15:13:37 2010 -0800
@@ -56,7 +56,7 @@ Bool BaseContext_Init( int* argc, char**
Bool BaseContext_Init( int* argc, char** argv[] ) {
Stream* typedStream;
- Journal_Printf( Journal_Register( DebugStream_Type, "Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
+ Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */
condFunc_Register = ConditionFunction_Register_New();
variableCondition_Register = VariableCondition_Register_New();
@@ -72,11 +72,11 @@ Bool BaseContext_Init( int* argc, char**
Journal_RegisterTypedStream( typedStream );
/** Adding default constructors of various components to the Stg_ComponentRegister */
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), Variable_Type, "0", (Stg_Component_DefaultConstructorFunction*)_Variable_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), CompositeVC_Type, "0", (Stg_Component_DefaultConstructorFunction*)_CompositeVC_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), SetVC_Type, "0", (Stg_Component_DefaultConstructorFunction*)_SetVC_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), VariableAllVC_Type, "0", (Stg_Component_DefaultConstructorFunction*)_VariableAllVC_DefaultNew );
- Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), DynamicVC_Type, "0", (Stg_Component_DefaultConstructorFunction*)_DynamicVC_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), Variable_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*)_Variable_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), CompositeVC_Type, "0", (Stg_Component_DefaultConstructorFunction*)_CompositeVC_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), SetVC_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*)_SetVC_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister( ), VariableAllVC_Type, "0", (Stg_Component_DefaultConstructorFunction*)_VariableAllVC_DefaultNew );
+ Stg_ComponentRegister_Add( Stg_ComponentRegister_Get_ComponentRegister(), DynamicVC_Type, (Name)"0", (Stg_Component_DefaultConstructorFunction*)_DynamicVC_DefaultNew );
/** Register Parents for All Classes */
RegisterParent( Variable_Type, Stg_Component_Type );
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Context/src/SetVC.c
--- a/Base/Context/src/SetVC.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Context/src/SetVC.c Thu Feb 04 15:13:37 2010 -0800
@@ -144,16 +144,16 @@ void _SetVC_ReadDictionary( void* setVC,
/* Find dictionary entry */
if (self->_dictionaryEntryName)
- vcDictVal = Dictionary_Get( dictionary, self->_dictionaryEntryName );
+ vcDictVal = Dictionary_Get( dictionary, (Dictionary_Entry_Key)self->_dictionaryEntryName );
else {
vcDictVal = &_vcDictVal;
Dictionary_Entry_Value_InitFromStruct( vcDictVal, dictionary );
}
if (vcDictVal) {
- Dictionary_Entry_Value* setVal = Dictionary_Entry_Value_GetMember( vcDictVal, "indices" );
+ Dictionary_Entry_Value* setVal = Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"indices" );
Index indexCnt = Dictionary_Entry_Value_AsUnsignedInt(
- Dictionary_Entry_Value_GetMember( vcDictVal, "indexCount" ) );
+ Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"indexCount" ) );
Index i, cnt;
self->_vcset = IndexSet_New( indexCnt );
@@ -164,8 +164,8 @@ void _SetVC_ReadDictionary( void* setVC,
Dictionary_Entry_Value_GetElement( setVal, i ) ) );
/* Obtain the variable entries */
- varsVal = Dictionary_Entry_Value_GetMember(vcDictVal, "variables");
- self->_entryCount = Dictionary_Entry_Value_GetCount( varsVal );
+ varsVal = Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"variables");
+ self->_entryCount = Dictionary_Entry_Value_GetCount( varsVal );
self->_entryTbl = Memory_Alloc_Array( SetVC_Entry, self->_entryCount, "SetVC->_entryTbl");
for (entry_I = 0; entry_I < self->_entryCount; entry_I++) {
@@ -174,12 +174,12 @@ void _SetVC_ReadDictionary( void* setVC,
Dictionary_Entry_Value* varDictListVal;
varDictListVal = Dictionary_Entry_Value_GetElement(varsVal, entry_I);
- valueEntry = Dictionary_Entry_Value_GetMember(varDictListVal, "value");
+ valueEntry = Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"value" );
self->_entryTbl[entry_I].varName = Dictionary_Entry_Value_AsString(
- Dictionary_Entry_Value_GetMember(varDictListVal, "name"));
+ Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"name") );
- valType = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember(varDictListVal, "type"));
+ valType = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"type") );
if (!strcasecmp(valType, "func")) {
char* funcName = Dictionary_Entry_Value_AsString(valueEntry);
@@ -225,7 +225,7 @@ void _SetVC_ReadDictionary( void* setVC,
}
else {
/* Assume double */
- Journal_DPrintf( Journal_Register( InfoStream_Type, "myStream" ),
+ Journal_DPrintf( Journal_Register( InfoStream_Type, (Name)"myStream" ),
"Type to variable on variable condition not given, assuming double\n" );
self->_entryTbl[entry_I].value.type = VC_ValueType_Double;
self->_entryTbl[entry_I].value.as.typeDouble = Dictionary_Entry_Value_AsDouble( valueEntry );
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Context/src/VariableAllVC.c
--- a/Base/Context/src/VariableAllVC.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Context/src/VariableAllVC.c Thu Feb 04 15:13:37 2010 -0800
@@ -152,7 +152,7 @@ void _VariableAllVC_ReadDictionary( void
/* Find dictionary entry */
if (self->_dictionaryEntryName)
- vcDictVal = Dictionary_Get( dictionary, self->_dictionaryEntryName );
+ vcDictVal = Dictionary_Get( dictionary, (Dictionary_Entry_Key)self->_dictionaryEntryName );
else
{
vcDictVal = &_vcDictVal;
@@ -162,23 +162,23 @@ void _VariableAllVC_ReadDictionary( void
if (vcDictVal)
{
/* Obtain the variable entries */
- self->_entryCount = Dictionary_Entry_Value_GetCount(Dictionary_Entry_Value_GetMember(vcDictVal, "variables"));
+ self->_entryCount = Dictionary_Entry_Value_GetCount(Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"variables") );
self->_entryTbl = Memory_Alloc_Array( VariableAllVC_Entry, self->_entryCount, "VariableAllVC->_entryTbl" );
- varsVal = Dictionary_Entry_Value_GetMember(vcDictVal, "variables");
+ varsVal = Dictionary_Entry_Value_GetMember( vcDictVal, (Dictionary_Entry_Key)"variables");
- for (entry_I = 0; entry_I < self->_entryCount; entry_I++)
+ for (entry_I = 0; entry_I < self->_entryCount; entry_I++ )
{
char* valType;
Dictionary_Entry_Value* valueEntry;
Dictionary_Entry_Value* varDictListVal;
varDictListVal = Dictionary_Entry_Value_GetElement(varsVal, entry_I);
- valueEntry = Dictionary_Entry_Value_GetMember(varDictListVal, "value");
+ valueEntry = Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"value" );
self->_entryTbl[entry_I].varName = Dictionary_Entry_Value_AsString(
- Dictionary_Entry_Value_GetMember(varDictListVal, "name"));
+ Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"name") );
- valType = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember(varDictListVal, "type"));
+ valType = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember( varDictListVal, (Dictionary_Entry_Key)"type") );
if (!strcasecmp(valType, "func"))
{
char* funcName = Dictionary_Entry_Value_AsString(valueEntry);
@@ -226,7 +226,7 @@ void _VariableAllVC_ReadDictionary( void
}
else {
/* Assume double */
- Journal_DPrintf( Journal_Register( InfoStream_Type, "myStream" ), "Type to variable on variable condition not given, assuming double\n" );
+ Journal_DPrintf( Journal_Register( InfoStream_Type, (Name)"myStream" ), "Type to variable on variable condition not given, assuming double\n" );
self->_entryTbl[entry_I].value.type = VC_ValueType_Double;
self->_entryTbl[entry_I].value.as.typeDouble = Dictionary_Entry_Value_AsDouble( valueEntry );
}
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Context/tests/AbstractContextSuite.c
--- a/Base/Context/tests/AbstractContextSuite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Context/tests/AbstractContextSuite.c Thu Feb 04 15:13:37 2010 -0800
@@ -177,10 +177,10 @@ void AbstractContextSuite_Setup( Abstrac
data->dict = Dictionary_New();
- Dictionary_Add( data->dict, "outputPath", Dictionary_Entry_Value_FromString( "output" ) );
- Dictionary_Add( data->dict, "checkpointEvery", Dictionary_Entry_Value_FromUnsignedInt( 5 ) );
- Dictionary_Add( data->dict, "dumpEvery", Dictionary_Entry_Value_FromUnsignedInt( 2 ) );
- Dictionary_Add( data->dict, "maxTimeSteps", Dictionary_Entry_Value_FromUnsignedInt( 10 ) );
+ Dictionary_Add( data->dict, (Dictionary_Entry_Key)"outputPath", Dictionary_Entry_Value_FromString( "output" ) );
+ Dictionary_Add( data->dict, (Dictionary_Entry_Key)"checkpointEvery", Dictionary_Entry_Value_FromUnsignedInt( 5 ) );
+ Dictionary_Add( data->dict, (Dictionary_Entry_Key)"dumpEvery", Dictionary_Entry_Value_FromUnsignedInt( 2 ) );
+ Dictionary_Add( data->dict, (Dictionary_Entry_Key)"maxTimeSteps", Dictionary_Entry_Value_FromUnsignedInt( 10 ) );
cf = Stg_ComponentFactory_New( data->dict, NULL );
@@ -307,14 +307,14 @@ void AbstractContextSuite_TestRestartFro
data->dict = Dictionary_New();
- Dictionary_Add( data->dict, "outputPath", Dictionary_Entry_Value_FromString( "output" ) );
- Dictionary_Add( data->dict, "checkpointEvery", Dictionary_Entry_Value_FromUnsignedInt( 5 ) );
- Dictionary_Add( data->dict, "dumpEvery", Dictionary_Entry_Value_FromUnsignedInt( 2 ) );
- Dictionary_Add( data->dict, "maxTimeSteps", Dictionary_Entry_Value_FromUnsignedInt( 10 ) );
+ Dictionary_Add( data->dict, (Dictionary_Entry_Key)"outputPath", Dictionary_Entry_Value_FromString( "output" ) );
+ Dictionary_Add( data->dict, (Dictionary_Entry_Key)"checkpointEvery", Dictionary_Entry_Value_FromUnsignedInt( 5 ) );
+ Dictionary_Add( data->dict, (Dictionary_Entry_Key)"dumpEvery", Dictionary_Entry_Value_FromUnsignedInt( 2 ) );
+ Dictionary_Add( data->dict, (Dictionary_Entry_Key)"maxTimeSteps", Dictionary_Entry_Value_FromUnsignedInt( 10 ) );
/* ReBuild the context */
- Dictionary_Set( data->dict, "maxTimeSteps", Dictionary_Entry_Value_FromUnsignedInt( 20 ) );
- Dictionary_Set( data->dict, "restartTimestep", Dictionary_Entry_Value_FromUnsignedInt( 5 ) );
+ Dictionary_Set( data->dict, (Dictionary_Entry_Key)"maxTimeSteps", Dictionary_Entry_Value_FromUnsignedInt( 20 ) );
+ Dictionary_Set( data->dict, (Dictionary_Entry_Key)"restartTimestep", Dictionary_Entry_Value_FromUnsignedInt( 5 ) );
MPI_Comm_dup( MPI_COMM_WORLD, &CommWorld );
cf = Stg_ComponentFactory_New( data->dict, NULL );
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Context/tests/ConditionFunctionSuite.c
--- a/Base/Context/tests/ConditionFunctionSuite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Context/tests/ConditionFunctionSuite.c Thu Feb 04 15:13:37 2010 -0800
@@ -64,7 +64,7 @@ void ConditionFunctionSuite_TestApply( C
ConditionFunction* cf;
double result;
- cf = ConditionFunction_New(func, "quadratic");
+ cf = ConditionFunction_New( func, (Name)"quadratic" );
ConditionFunction_Apply(cf, 4, 2, NULL, &result);
pcu_check_true( TEST_CF_RESULT == result );
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Context/tests/DictionaryCheckSuite.c
--- a/Base/Context/tests/DictionaryCheckSuite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Context/tests/DictionaryCheckSuite.c Thu Feb 04 15:13:37 2010 -0800
@@ -61,22 +61,17 @@ void DictionaryCheckSuite_TestCheckKeys(
char expectedFilename[PCU_PATH_MAX];
const char* errMessage = "Component dictionary must have unique names\n";
- Stream_RedirectFile(Journal_Register( Error_Type, "DictionaryCheck"), testFilename1 );
- Stream_SetPrintingRank(Journal_Register( Error_Type, "DictionaryCheck"), 0 );
- Stream_ClearCustomFormatters( Journal_Register( Error_Type, "DictionaryCheck") );
+ Stream_RedirectFile(Journal_Register( Error_Type, (Name)"DictionaryCheck" ), testFilename1 );
+ Stream_SetPrintingRank(Journal_Register( Error_Type, (Name)"DictionaryCheck" ), 0 );
+ Stream_ClearCustomFormatters( Journal_Register( Error_Type, (Name)"DictionaryCheck") );
/* Create a set of Dictionary entries */
/* For dictionary */
- Dictionary_Add( dictionary, "test_dict_string",
- Dictionary_Entry_Value_FromString( "hello" ) );
- Dictionary_Add( dictionary, "test_dict_double",
- Dictionary_Entry_Value_FromDouble( 45.567 ) );
- Dictionary_Add( dictionary, "test_dict_string",
- Dictionary_Entry_Value_FromString( "goodbye" ) );
- Dictionary_Add( dictionary, "test_dict_string",
- Dictionary_Entry_Value_FromString( "hello" ) );
- Dictionary_Add( dictionary, "test_dict_string2",
- Dictionary_Entry_Value_FromString( "hello" ) );
+ Dictionary_Add( dictionary, (Dictionary_Entry_Key)"test_dict_string", Dictionary_Entry_Value_FromString( "hello" ) );
+ Dictionary_Add( dictionary, (Dictionary_Entry_Key)"test_dict_double", Dictionary_Entry_Value_FromDouble( 45.567 ) );
+ Dictionary_Add( dictionary, (Dictionary_Entry_Key)"test_dict_string", Dictionary_Entry_Value_FromString( "goodbye" ) );
+ Dictionary_Add( dictionary, (Dictionary_Entry_Key)"test_dict_string", Dictionary_Entry_Value_FromString( "hello" ) );
+ Dictionary_Add( dictionary, (Dictionary_Entry_Key)"test_dict_string2", Dictionary_Entry_Value_FromString( "hello" ) );
CheckDictionaryKeys(dictionary, errMessage);
@@ -87,15 +82,12 @@ void DictionaryCheckSuite_TestCheckKeys(
}
/* For dictionary2 */
- Dictionary_Add( dictionary2, "test_dict_string",
- Dictionary_Entry_Value_FromString( "hello" ) );
- Dictionary_Add( dictionary2, "test_dict_double",
- Dictionary_Entry_Value_FromDouble( 45.567 ) );
- Dictionary_Add( dictionary2, "test_dict_stuff",
- Dictionary_Entry_Value_FromString( "hello") );
+ Dictionary_Add( dictionary2, (Dictionary_Entry_Key)"test_dict_string", Dictionary_Entry_Value_FromString( "hello" ) );
+ Dictionary_Add( dictionary2, (Dictionary_Entry_Key)"test_dict_double", Dictionary_Entry_Value_FromDouble( 45.567 ) );
+ Dictionary_Add( dictionary2, (Dictionary_Entry_Key)"test_dict_stuff", Dictionary_Entry_Value_FromString( "hello") );
/* Call DictionaryCheck function */
- Stream_RedirectFile(Journal_Register( Error_Type, "DictionaryCheck"), testFilename2 );
+ Stream_RedirectFile(Journal_Register( Error_Type, (Name)"DictionaryCheck" ), testFilename2 );
CheckDictionaryKeys(dictionary2, errMessage);
/* This file expected to be empty */
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Context/tests/LiveComponentRegisterSuite.c
--- a/Base/Context/tests/LiveComponentRegisterSuite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Context/tests/LiveComponentRegisterSuite.c Thu Feb 04 15:13:37 2010 -0800
@@ -108,24 +108,24 @@ void LiveComponentRegisterSuite_TestGet(
LiveComponentRegister_Add( data->lcRegister, (Stg_Component*) vecVar[1] );
LiveComponentRegister_Add( data->lcRegister, (Stg_Component*) vecVar[2] );
- tempVar = (Variable*) LiveComponentRegister_Get( data->lcRegister, "Scalar" );
+ tempVar = (Variable*) LiveComponentRegister_Get( data->lcRegister, (Name)"Scalar" );
pcu_check_true( tempVar == var );
- tempVar = (Variable*) LiveComponentRegister_Get( data->lcRegister, "Three" );
+ tempVar = (Variable* ) LiveComponentRegister_Get( data->lcRegister, (Name)"Three" );
pcu_check_true( tempVar == vec );
- tempVar = (Variable*) LiveComponentRegister_Get( data->lcRegister, "a" );
+ tempVar = (Variable* ) LiveComponentRegister_Get( data->lcRegister, (Name)"a" );
pcu_check_true( tempVar == vecVar[0] );
- tempVar = (Variable*) LiveComponentRegister_Get( data->lcRegister, "b" );
+ tempVar = (Variable* ) LiveComponentRegister_Get( data->lcRegister, (Name)"b" );
pcu_check_true( tempVar == vecVar[1] );
- tempVar = (Variable*) LiveComponentRegister_Get( data->lcRegister, "c" );
+ tempVar = (Variable* ) LiveComponentRegister_Get( data->lcRegister, (Name)"c" );
pcu_check_true( tempVar == vecVar[2] );
}
-void LiveComponentRegisterSuite( pcu_suite_t* suite ) {
+void LiveComponentRegisterSuite( pcu_suite_t* suite ) {
pcu_suite_setData( suite, LiveComponentRegisterSuiteData );
pcu_suite_setFixtures( suite, LiveComponentRegisterSuite_Setup, LiveComponentRegisterSuite_Teardown );
pcu_suite_addTest( suite, LiveComponentRegisterSuite_TestGet );
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Context/tests/SetVC_Suite.c
--- a/Base/Context/tests/SetVC_Suite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Context/tests/SetVC_Suite.c Thu Feb 04 15:13:37 2010 -0800
@@ -104,7 +104,7 @@ void SetVC_Suite_Setup( SetVC_SuiteData*
IO_Handler_ReadAllFromFile( io_handler, setVC_XMLFilename, data->dict );
/* Create CF stuff */
- data->quadCF = ConditionFunction_New( quadratic, "quadratic" );
+ data->quadCF = ConditionFunction_New( quadratic, (Name)"quadratic" );
ConditionFunction_Register_Add( data->conFunc_Register, data->quadCF );
/* Create variables */
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Context/tests/VariableAllVC_Suite.c
--- a/Base/Context/tests/VariableAllVC_Suite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Context/tests/VariableAllVC_Suite.c Thu Feb 04 15:13:37 2010 -0800
@@ -66,17 +66,17 @@ void VariableAllVC_Suite_CreateDictEntri
varList = Dictionary_Entry_Value_NewList();
varValue = Dictionary_Entry_Value_NewStruct();
- Dictionary_Entry_Value_AddMember( varValue, "name", Dictionary_Entry_Value_FromString( "test" ) );
- Dictionary_Entry_Value_AddMember( varValue, "type", Dictionary_Entry_Value_FromString( "double" ) );
- Dictionary_Entry_Value_AddMember( varValue, "value", Dictionary_Entry_Value_FromDouble( TEST_CONDVALUE ) );
+ Dictionary_Entry_Value_AddMember( varValue, (Dictionary_Entry_Key)"name", Dictionary_Entry_Value_FromString( "test" ) );
+ Dictionary_Entry_Value_AddMember( varValue, (Dictionary_Entry_Key)"type", Dictionary_Entry_Value_FromString( "double" ) );
+ Dictionary_Entry_Value_AddMember( varValue, (Dictionary_Entry_Key)"value", Dictionary_Entry_Value_FromDouble( TEST_CONDVALUE ) );
Dictionary_Entry_Value_AddElement( varList, varValue );
- Dictionary_Entry_Value_AddMember( info, "variables", varList );
- Dictionary_Add( data->dict, data->vcKey, info );
+ Dictionary_Entry_Value_AddMember( info, (Dictionary_Entry_Key)"variables", varList );
+ Dictionary_Add( data->dict, (Dictionary_Entry_Key)data->vcKey, info );
}
-void VariableAllVC_Suite_Setup( VariableAllVC_SuiteData* data ) {
+void VariableAllVC_Suite_Setup( VariableAllVC_SuiteData* data ) {
data->arraySize = 10;
data->testArray = Memory_Alloc_Array( double, data->arraySize, "test" );
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Context/tests/VariableDumpStreamSuite.c
--- a/Base/Context/tests/VariableDumpStreamSuite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Context/tests/VariableDumpStreamSuite.c Thu Feb 04 15:13:37 2010 -0800
@@ -119,12 +119,12 @@ void VariableDumpStreamSuite_TestDump( V
Variable_SetValueAtDouble( vec, i, 2, 5.6 );
}
- dumpStream = Journal_Register( VariableDumpStream_Type, "scalar dump" );
+ dumpStream = Journal_Register( VariableDumpStream_Type, (Name)"scalar dump" );
VariableDumpStream_SetVariable( dumpStream, var, 1, 0, scalarDumpFilename );
pcu_check_true( Journal_Dump( dumpStream, NULL ) );
Stream_Flush( dumpStream );
- dumpStream2 = Journal_Register( VariableDumpStream_Type, "vector dump" );
+ dumpStream2 = Journal_Register( VariableDumpStream_Type, (Name)"vector dump" );
VariableDumpStream_SetVariable( dumpStream2, vec, 1, 0, vectorDumpFilename );
pcu_check_true( Journal_Dump( dumpStream2, NULL ) );
Stream_Flush( dumpStream2 );
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Extensibility/tests/EntryPointSuite.c
--- a/Base/Extensibility/tests/EntryPointSuite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Extensibility/tests/EntryPointSuite.c Thu Feb 04 15:13:37 2010 -0800
@@ -249,7 +249,7 @@ void EntryPointSuite_TestPrintConcise( E
pcu_check_true( data->ep->hooks->count == 5 );
- stream = Journal_Register( InfoStream_Type, EntryPoint_Type );
+ stream = Journal_Register( InfoStream_Type, (Name)EntryPoint_Type );
Stream_RedirectFile( stream, testFilename );
EntryPoint_PrintConcise( data->ep, stream );
@@ -366,7 +366,7 @@ void EntryPointSuite_TestMinMax( EntryPo
double result;
Stream* stream;
- stream = Journal_Register( InfoStream_Type, "myStream" );
+ stream = Journal_Register( InfoStream_Type, (Name)"myStream" );
Stream_Enable( stream, False );
data->ep = EntryPoint_New( testEpName, EntryPoint_Maximum_VoidPtr_CastType );
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Extensibility/tests/ExtensionSuite.c
--- a/Base/Extensibility/tests/ExtensionSuite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Extensibility/tests/ExtensionSuite.c Thu Feb 04 15:13:37 2010 -0800
@@ -120,19 +120,19 @@ void ExtensionSuite_TestOfStruct( Extens
/* Build the extensionMgr */
extensionMgr = ExtensionManager_New_OfStruct( "Node", sizeof(BaseClass) );
- ExtensionManager_Add( extensionMgr, Type0, sizeof(ExtensionStruct0) ); numExtensions++;
- ExtensionManager_Add( extensionMgr, Temp0, sizeof(ExtensionStruct1) ); numExtensions++;
- ExtensionManager_Add( extensionMgr, Pres0, sizeof(ExtensionStruct2) ); numExtensions++;
- ExtensionManager_Add( extensionMgr, BC_Set0, sizeof(ExtensionStruct3) ); numExtensions++;
- ExtensionManager_Add( extensionMgr, Weight0, sizeof(ExtensionStruct4) ); numExtensions++;
- ExtensionManager_Add( extensionMgr, Type1, sizeof(ExtensionStruct0) ); numExtensions++;
- ExtensionManager_Add( extensionMgr, Temp1, sizeof(ExtensionStruct1) ); numExtensions++;
- ExtensionManager_Add( extensionMgr, Pres1, sizeof(ExtensionStruct2) ); numExtensions++;
- ExtensionManager_Add( extensionMgr, BC_Set1, sizeof(ExtensionStruct3) ); numExtensions++;
- ExtensionManager_Add( extensionMgr, Weight1, sizeof(ExtensionStruct4) ); numExtensions++;
+ ExtensionManager_Add( extensionMgr, (Name)Type0, sizeof(ExtensionStruct0) ); numExtensions++;
+ ExtensionManager_Add( extensionMgr, (Name)Temp0, sizeof(ExtensionStruct1) ); numExtensions++;
+ ExtensionManager_Add( extensionMgr, (Name)Pres0, sizeof(ExtensionStruct2) ); numExtensions++;
+ ExtensionManager_Add( extensionMgr, (Name)BC_Set0, sizeof(ExtensionStruct3) ); numExtensions++;
+ ExtensionManager_Add( extensionMgr, (Name)Weight0, sizeof(ExtensionStruct4) ); numExtensions++;
+ ExtensionManager_Add( extensionMgr, (Name)Type1, sizeof(ExtensionStruct0) ); numExtensions++;
+ ExtensionManager_Add( extensionMgr, (Name)Temp1, sizeof(ExtensionStruct1) ); numExtensions++;
+ ExtensionManager_Add( extensionMgr, (Name)Pres1, sizeof(ExtensionStruct2) ); numExtensions++;
+ ExtensionManager_Add( extensionMgr, (Name)BC_Set1, sizeof(ExtensionStruct3) ); numExtensions++;
+ ExtensionManager_Add( extensionMgr, (Name)Weight1, sizeof(ExtensionStruct4) ); numExtensions++;
/* "Is the initial size correct" */
- pcu_check_true( extensionMgr->initialSize == sizeof(BaseClass) );
+ pcu_check_true( extensionMgr->initialSize == sizeof(BaseClass) );
/* Is the first offset at the correct position */
pcu_check_true( ExtensionInfo_At( extensionMgr->extInfos, 0 )->offset == sizeof(BaseClass) );
@@ -171,43 +171,43 @@ void ExtensionSuite_TestOfStruct( Extens
pcu_check_true( ((ArithPointer)&nBC_Set0->dd - (ArithPointer)n) == sizeof(BaseClass) + size0 + size1 + size2 );
nWeight0 = (ExtensionStruct4*)ExtensionManager_Get( extensionMgr, n,
- ExtensionManager_GetHandle( extensionMgr, "Weight0" ));
+ ExtensionManager_GetHandle( extensionMgr, (Name)"Weight0" ));
/* Is offset correct */
pcu_check_true( ((ArithPointer)&nWeight0->wf - (ArithPointer)n) ==
sizeof(BaseClass) + size0 + size1 + size2 + size3 );
- nType1 = (ExtensionStruct0*)ExtensionManager_Get( extensionMgr, n,
- ExtensionManager_GetHandle( extensionMgr, "Type1" ) );
+ nType1 = (ExtensionStruct0* )ExtensionManager_Get( extensionMgr, n,
+ ExtensionManager_GetHandle( extensionMgr, (Name)"Type1" ) );
/* Is offset correct */
pcu_check_true( ((ArithPointer)&nType1->type - (ArithPointer)n) ==
sizeof(BaseClass) + size0 + size1 + size2 + size3 + size4 );
- nTemp1 = (ExtensionStruct1*)ExtensionManager_Get( extensionMgr, n,
- ExtensionManager_GetHandle( extensionMgr, "Temp1" ) );
+ nTemp1 = (ExtensionStruct1* )ExtensionManager_Get( extensionMgr, n,
+ ExtensionManager_GetHandle( extensionMgr, (Name)"Temp1" ) );
/* Is offset correct */
pcu_check_true( ((ArithPointer)&nTemp1->temp - (ArithPointer)n) ==
sizeof(BaseClass) + size0 + size1 + size2 + size3 + size4 + size0 );
- nPres1 = (ExtensionStruct2*)ExtensionManager_Get( extensionMgr, n,
- ExtensionManager_GetHandle( extensionMgr, "Pres1" ) );
+ nPres1 = (ExtensionStruct2* )ExtensionManager_Get( extensionMgr, n,
+ ExtensionManager_GetHandle( extensionMgr, (Name)"Pres1" ) );
/* Is offset correct */
pcu_check_true( ((ArithPointer)&nPres1->pres - (ArithPointer)n) ==
sizeof(BaseClass) + size0 + size1 + size2 + size3 + size4 + size0 + size1 );
- nBC_Set1 = (ExtensionStruct3*)ExtensionManager_Get( extensionMgr, n,
- ExtensionManager_GetHandle( extensionMgr, "BC_Set1" ) );
+ nBC_Set1 = (ExtensionStruct3* )ExtensionManager_Get( extensionMgr, n,
+ ExtensionManager_GetHandle( extensionMgr, (Name)"BC_Set1" ) );
/* Is offset correct */
pcu_check_true( ((ArithPointer)&nBC_Set1->dd - (ArithPointer)n) ==
sizeof(BaseClass) + size0 + size1 + size2 + size3 + size4 + size0 + size1 + size2 );
- nWeight1 = (ExtensionStruct4*)ExtensionManager_Get( extensionMgr, n,
- ExtensionManager_GetHandle( extensionMgr, "Weight1" ) );
+ nWeight1 = (ExtensionStruct4* )ExtensionManager_Get( extensionMgr, n,
+ ExtensionManager_GetHandle( extensionMgr, (Name)"Weight1" ) );
/* Is offset correct */
pcu_check_true( ((ArithPointer)&nWeight1->wf - (ArithPointer)n) ==
sizeof(BaseClass) + size0 + size1 + size2 + size3 + size4 + size0 + size1 + size2 + size3 );
for( ii = 0; ii < ArraySize; ii++ ) {
- n = (BaseClass*)ExtensionManager_At( extensionMgr, nArray, ii );
+ n = (BaseClass* )ExtensionManager_At( extensionMgr, nArray, ii );
n->x = 1.0f;
n->y = 2.0f;
@@ -218,12 +218,12 @@ void ExtensionSuite_TestOfStruct( Extens
nTemp0 = (ExtensionStruct1*)ExtensionManager_Get( extensionMgr, n, 1 );
nPres0 = (ExtensionStruct2*)ExtensionManager_Get( extensionMgr, n, 2 );
nBC_Set0 = (ExtensionStruct3*)ExtensionManager_Get( extensionMgr, n, 3 );
- nWeight0 = (ExtensionStruct4*)ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, "Weight0" ) );
- nType1 = (ExtensionStruct0*)ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, "Type1" ) );
- nTemp1 = (ExtensionStruct1*)ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, "Temp1" ) );
- nPres1 = (ExtensionStruct2*)ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, "Pres1" ) );
- nBC_Set1 = (ExtensionStruct3*)ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, "BC_Set1" ) );
- nWeight1 = (ExtensionStruct4*)ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, "Weight1" ) );
+ nWeight0 = (ExtensionStruct4*)ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, (Name)"Weight0" ) );
+ nType1 = (ExtensionStruct0* )ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, (Name)"Type1" ) );
+ nTemp1 = (ExtensionStruct1* )ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, (Name)"Temp1" ) );
+ nPres1 = (ExtensionStruct2* )ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, (Name)"Pres1" ) );
+ nBC_Set1 = (ExtensionStruct3* )ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, (Name)"BC_Set1" ) );
+ nWeight1 = (ExtensionStruct4* )ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, (Name)"Weight1" ) );
nType0->type = 5;
nTemp0->temp = 6.0f;
@@ -244,18 +244,18 @@ void ExtensionSuite_TestOfStruct( Extens
}
for( ii = 0; ii < ArraySize; ii++ ) {
- n = (BaseClass*)ExtensionManager_At( extensionMgr, nArray, ii );
+ n = (BaseClass* )ExtensionManager_At( extensionMgr, nArray, ii );
nType0 = (ExtensionStruct0*)ExtensionManager_Get( extensionMgr, n, 0 );
nTemp0 = (ExtensionStruct1*)ExtensionManager_Get( extensionMgr, n, 1 );
nPres0 = (ExtensionStruct2*)ExtensionManager_Get( extensionMgr, n, 2 );
nBC_Set0 = (ExtensionStruct3*)ExtensionManager_Get( extensionMgr, n, 3 );
- nWeight0 = (ExtensionStruct4*)ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, "Weight0" ) );
- nType1 = (ExtensionStruct0*)ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, "Type1" ) );
- nTemp1 = (ExtensionStruct1*)ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, "Temp1" ) );
- nPres1 = (ExtensionStruct2*)ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, "Pres1" ) );
- nBC_Set1 = (ExtensionStruct3*)ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, "BC_Set1" ) );
- nWeight1 = (ExtensionStruct4*)ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, "Weight1" ) );
+ nWeight0 = (ExtensionStruct4*)ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, (Name)"Weight0" ) );
+ nType1 = (ExtensionStruct0* )ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, (Name)"Type1" ) );
+ nTemp1 = (ExtensionStruct1* )ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, (Name)"Temp1" ) );
+ nPres1 = (ExtensionStruct2* )ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, (Name)"Pres1" ) );
+ nBC_Set1 = (ExtensionStruct3* )ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, (Name)"BC_Set1" ) );
+ nWeight1 = (ExtensionStruct4* )ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, (Name)"Weight1" ) );
pcu_check_true( n->x == 1.0f );
pcu_check_true( n->y == 2.0f );
@@ -277,7 +277,7 @@ void ExtensionSuite_TestOfStruct( Extens
pcu_check_true( nBC_Set1->dd == 17 );
pcu_check_true( nBC_Set1->cc == 18 );
pcu_check_true( nBC_Set1->bc == 19 );
- pcu_check_true( nWeight1->wf == 20.0f );
+ pcu_check_true( nWeight1->wf == 20.0f );
}
/* Stg_Class_Delete stuff */
@@ -315,19 +315,19 @@ void ExtensionSuite_TestOfExistingObject
/* Build the extensionMgr */
n = Memory_Alloc_Unnamed( BaseClass );
extensionMgr = ExtensionManager_New_OfExistingObject( "Node", n );
- ExtensionManager_Add( extensionMgr, Type0, sizeof(ExtensionStruct0) ); numExtensions++;
- ExtensionManager_Add( extensionMgr, Temp0, sizeof(ExtensionStruct1) ); numExtensions++;
- ExtensionManager_Add( extensionMgr, Pres0, sizeof(ExtensionStruct2) ); numExtensions++;
- ExtensionManager_Add( extensionMgr, BC_Set0, sizeof(ExtensionStruct3) ); numExtensions++;
- ExtensionManager_Add( extensionMgr, Weight0, sizeof(ExtensionStruct4) ); numExtensions++;
- ExtensionManager_Add( extensionMgr, Type1, sizeof(ExtensionStruct0) ); numExtensions++;
- ExtensionManager_Add( extensionMgr, Temp1, sizeof(ExtensionStruct1) ); numExtensions++;
- ExtensionManager_Add( extensionMgr, Pres1, sizeof(ExtensionStruct2) ); numExtensions++;
- ExtensionManager_Add( extensionMgr, BC_Set1, sizeof(ExtensionStruct3) ); numExtensions++;
- ExtensionManager_Add( extensionMgr, Weight1, sizeof(ExtensionStruct4) ); numExtensions++;
+ ExtensionManager_Add( extensionMgr, (Name)Type0, sizeof(ExtensionStruct0) ); numExtensions++;
+ ExtensionManager_Add( extensionMgr, (Name)Temp0, sizeof(ExtensionStruct1) ); numExtensions++;
+ ExtensionManager_Add( extensionMgr, (Name)Pres0, sizeof(ExtensionStruct2) ); numExtensions++;
+ ExtensionManager_Add( extensionMgr, (Name)BC_Set0, sizeof(ExtensionStruct3) ); numExtensions++;
+ ExtensionManager_Add( extensionMgr, (Name)Weight0, sizeof(ExtensionStruct4) ); numExtensions++;
+ ExtensionManager_Add( extensionMgr, (Name)Type1, sizeof(ExtensionStruct0) ); numExtensions++;
+ ExtensionManager_Add( extensionMgr, (Name)Temp1, sizeof(ExtensionStruct1) ); numExtensions++;
+ ExtensionManager_Add( extensionMgr, (Name)Pres1, sizeof(ExtensionStruct2) ); numExtensions++;
+ ExtensionManager_Add( extensionMgr, (Name)BC_Set1, sizeof(ExtensionStruct3) ); numExtensions++;
+ ExtensionManager_Add( extensionMgr, (Name)Weight1, sizeof(ExtensionStruct4) ); numExtensions++;
/* Is the initial size correct */
- pcu_check_true( extensionMgr->initialSize == 0 );
+ pcu_check_true( extensionMgr->initialSize == 0 );
/* Is the first offset at the correct position */
pcu_check_true( ExtensionInfo_At( extensionMgr->extInfos, 0 )->offset == 0 );
@@ -374,28 +374,28 @@ void ExtensionSuite_TestOfExistingObject
nBC_Set0->cc = 10;
nBC_Set0->bc = 11;
- nWeight0 = (ExtensionStruct4*)ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, "Weight0" ) );
+ nWeight0 = (ExtensionStruct4*)ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, (Name)"Weight0" ) );
/* Is offset correct */
pcu_check_true(
((ArithPointer)&nWeight0->wf - (ArithPointer)extensionMgr->_extensionsToExisting) ==
size0 + size1 + size2 + size3 );
nWeight0->wf = 12.0f;
- nType1 = (ExtensionStruct0*)ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, "Type1" ) );
+ nType1 = (ExtensionStruct0* )ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, (Name)"Type1" ) );
/* Is offset correct */
pcu_check_true(
((ArithPointer)&nType1->type - (ArithPointer)extensionMgr->_extensionsToExisting) ==
size0 + size1 + size2 + size3 + size4 );
nType1->type = 13;
- nTemp1 = (ExtensionStruct1*)ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, "Temp1" ) );
+ nTemp1 = (ExtensionStruct1* )ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, (Name)"Temp1" ) );
/* Is offset correct */
pcu_check_true(
((ArithPointer)&nTemp1->temp - (ArithPointer)extensionMgr->_extensionsToExisting) ==
size0 + size1 + size2 + size3 + size4 + size0 );
nTemp1->temp = 14.0f;
- nPres1 = (ExtensionStruct2*)ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, "Pres1" ) );
+ nPres1 = (ExtensionStruct2* )ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, (Name)"Pres1" ) );
/* Is offset correct */
pcu_check_true(
((ArithPointer)&nPres1->pres - (ArithPointer)extensionMgr->_extensionsToExisting) ==
@@ -403,7 +403,7 @@ void ExtensionSuite_TestOfExistingObject
nPres1->pres = 15.0f;
nPres1->flag = 16;
- nBC_Set1 = (ExtensionStruct3*)ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, "BC_Set1" ) );
+ nBC_Set1 = (ExtensionStruct3* )ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, (Name)"BC_Set1" ) );
/* Is offset correct */
pcu_check_true(
((ArithPointer)&nBC_Set1->dd - (ArithPointer)extensionMgr->_extensionsToExisting) ==
@@ -413,10 +413,10 @@ void ExtensionSuite_TestOfExistingObject
nBC_Set1->bc = 19;
/* Is offset correct */
- nWeight1 = (ExtensionStruct4*)ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, "Weight1" ) );
+ nWeight1 = (ExtensionStruct4* )ExtensionManager_Get( extensionMgr, n, ExtensionManager_GetHandle( extensionMgr, (Name)"Weight1" ) );
pcu_check_true(
((ArithPointer)&nWeight1->wf - (ArithPointer)extensionMgr->_extensionsToExisting) ==
- size0 + size1 + size2 + size3 + size4 + size0 + size1 + size2 + size3 );
+ size0 + size1 + size2 + size3 + size4 + size0 + size1 + size2 + size3 );
nWeight1->wf = 20.0f;
@@ -468,19 +468,19 @@ void ExtensionSuite_TestAddArrayToExisti
baseObject = Memory_Alloc( BaseClass, "BaseObject" );
objExtension = ExtensionManager_New_OfExistingObject( "obj", baseObject );
- ExtensionManager_Add( objExtension, Type0, sizeof(ExtensionStruct0) );
+ ExtensionManager_Add( objExtension, (Name)Type0, sizeof(ExtensionStruct0) );
ExtensionManager_AddArray( objExtension, Temp0, sizeof(ExtensionStruct1), 10 );
{
objType0 = (ExtensionStruct0*)ExtensionManager_Get(
objExtension,
baseObject,
- ExtensionManager_GetHandle( objExtension, "Type0" ) );
+ ExtensionManager_GetHandle( objExtension, (Name)"Type0" ) );
- objTemp0 = (ExtensionStruct1*)ExtensionManager_Get(
+ objTemp0 = (ExtensionStruct1* )ExtensionManager_Get(
objExtension,
baseObject,
- ExtensionManager_GetHandle( objExtension, "Temp0" ) );
+ ExtensionManager_GetHandle( objExtension, (Name)"Temp0" ) );
objType0->type = 'a';
for ( ii = 0; ii < 10; ++ii ) {
@@ -488,10 +488,10 @@ void ExtensionSuite_TestAddArrayToExisti
}
}
- objTemp0 = (ExtensionStruct1*)ExtensionManager_Get(
+ objTemp0 = (ExtensionStruct1* )ExtensionManager_Get(
objExtension,
baseObject,
- ExtensionManager_GetHandle( objExtension, "Temp0" ) );
+ ExtensionManager_GetHandle( objExtension, (Name)"Temp0" ) );
for ( ii = 0; ii < 10; ++ii ) {
pcu_check_true( objTemp0[ii].temp == ii );
@@ -502,7 +502,7 @@ void ExtensionSuite_TestAddArrayToExisti
}
-void ExtensionSuite_TestExtendOfExtendedArray( ExtensionSuiteData* data ) {
+void ExtensionSuite_TestExtendOfExtendedArray( ExtensionSuiteData* data ) {
ExtensionManager* structExtension=NULL;
ExtensionManager* arrayExtension=NULL;
BaseClass* nArray=NULL;
@@ -516,7 +516,7 @@ void ExtensionSuite_TestExtendOfExtended
structExtension = ExtensionManager_New_OfStruct( "Node", sizeof(BaseClass) );
- ExtensionManager_Add( structExtension, Type0, sizeof(ExtensionStruct0) );
+ ExtensionManager_Add( structExtension, (Name)Type0, sizeof(ExtensionStruct0) );
ExtensionManager_AddArray( structExtension, Temp0, sizeof(ExtensionStruct1), 10 );
nArray = (BaseClass*)ExtensionManager_Malloc( structExtension, ArraySize );
@@ -526,57 +526,57 @@ void ExtensionSuite_TestExtendOfExtended
/* Since the nArray is already allocated, this function should realloc it to put the extended array
* at the end */
- ExtensionManager_Add( arrayExtension, Pres0, sizeof(ExtensionStruct2) );
+ ExtensionManager_Add( arrayExtension, (Name)Pres0, sizeof(ExtensionStruct2) );
- for ( array_I = 0; array_I < ArraySize; ++array_I ) {
+ for ( array_I = 0; array_I < ArraySize; ++array_I ) {
current = ExtensionManager_At( structExtension, nArray, array_I );
nType0 = (ExtensionStruct0*)ExtensionManager_Get(
structExtension,
current,
- ExtensionManager_GetHandle( structExtension, "Type0" ) );
- nTemp0 = (ExtensionStruct1*)ExtensionManager_Get(
+ ExtensionManager_GetHandle( structExtension, (Name)"Type0" ) );
+ nTemp0 = (ExtensionStruct1* )ExtensionManager_Get(
structExtension,
current,
- ExtensionManager_GetHandle( structExtension, "Temp0" ) );
+ ExtensionManager_GetHandle( structExtension, (Name)"Temp0" ) );
nType0->type = 'a';
for ( ii = 0; ii < 10; ++ii ) {
nTemp0[ii].temp = (double)((array_I * 10) + ii);
}
- nPres0 = (ExtensionStruct2*)ExtensionManager_Get(
+ nPres0 = (ExtensionStruct2* )ExtensionManager_Get(
arrayExtension,
ExtensionManager_At( arrayExtension, nArray, array_I ),
- ExtensionManager_GetHandle( arrayExtension, "Pres0" ) );
+ ExtensionManager_GetHandle( arrayExtension, (Name)"Pres0" ) );
nPres0->pres = (double)array_I;
nPres0->flag = 'b';
}
- for ( array_I = 0; array_I < ArraySize; ++array_I ) {
+ for ( array_I = 0; array_I < ArraySize; ++array_I ) {
current = ExtensionManager_At( structExtension, nArray, array_I );
nType0 = (ExtensionStruct0*)ExtensionManager_Get(
structExtension,
current,
- ExtensionManager_GetHandle( structExtension, "Type0" ) );
- nTemp0 = (ExtensionStruct1*)ExtensionManager_Get(
+ ExtensionManager_GetHandle( structExtension, (Name)"Type0" ) );
+ nTemp0 = (ExtensionStruct1* )ExtensionManager_Get(
structExtension,
current,
- ExtensionManager_GetHandle( structExtension, "Temp0" ) );
+ ExtensionManager_GetHandle( structExtension, (Name)"Temp0" ) );
pcu_check_true( nType0->type == 'a' );
for ( ii = 0; ii < 10; ++ii ) {
pcu_check_true( nTemp0[ii].temp == (double)((array_I * 10) + ii) );
}
- nPres0 = (ExtensionStruct2*)ExtensionManager_Get(
+ nPres0 = (ExtensionStruct2* )ExtensionManager_Get(
arrayExtension,
ExtensionManager_At( arrayExtension, nArray, array_I ),
- ExtensionManager_GetHandle( arrayExtension, "Pres0" ) );
+ ExtensionManager_GetHandle( arrayExtension, (Name)"Pres0" ) );
pcu_check_true( nPres0->pres == (double)array_I );
- pcu_check_true( nPres0->flag == 'b' );
+ pcu_check_true( nPres0->flag == 'b' );
}
ExtensionManager_Free( structExtension, nArray );
@@ -604,7 +604,7 @@ void ExtensionSuite_TestCopyExtendedArra
structExtension = ExtensionManager_New_OfStruct( "Node", sizeof(BaseClass) );
- ExtensionManager_Add( structExtension, Type0, sizeof(ExtensionStruct0) );
+ ExtensionManager_Add( structExtension, (Name)Type0, sizeof(ExtensionStruct0) );
ExtensionManager_AddArray( structExtension, Temp0, sizeof(ExtensionStruct1), 10 );
nArray = (BaseClass*)ExtensionManager_Malloc( structExtension, ArraySize );
@@ -614,29 +614,29 @@ void ExtensionSuite_TestCopyExtendedArra
/* Since the nArray is already allocated, this function should realloc it to put the extended array
* at the end */
- ExtensionManager_Add( arrayExtension, Pres0, sizeof(ExtensionStruct2) );
+ ExtensionManager_Add( arrayExtension, (Name)Pres0, sizeof(ExtensionStruct2) );
- for ( array_I = 0; array_I < ArraySize; ++array_I ) {
+ for ( array_I = 0; array_I < ArraySize; ++array_I ) {
current = ExtensionManager_At( structExtension, nArray, array_I );
nType0 = (ExtensionStruct0*)ExtensionManager_Get(
structExtension,
current,
- ExtensionManager_GetHandle( structExtension, "Type0" ) );
- nTemp0 = (ExtensionStruct1*)ExtensionManager_Get(
+ ExtensionManager_GetHandle( structExtension, (Name)"Type0" ) );
+ nTemp0 = (ExtensionStruct1* )ExtensionManager_Get(
structExtension,
current,
- ExtensionManager_GetHandle( structExtension, "Temp0" ) );
+ ExtensionManager_GetHandle( structExtension, (Name)"Temp0" ) );
nType0->type = 'a';
for ( ii = 0; ii < 10; ++ii ) {
nTemp0[ii].temp = (double)((array_I * 10) + ii);
}
- nPres0 = (ExtensionStruct2*)ExtensionManager_Get(
+ nPres0 = (ExtensionStruct2* )ExtensionManager_Get(
arrayExtension,
ExtensionManager_At( arrayExtension, nArray, array_I ),
- ExtensionManager_GetHandle( arrayExtension, "Pres0" ) );
+ ExtensionManager_GetHandle( arrayExtension, (Name)"Pres0" ) );
nPres0->pres = (double)array_I;
nPres0->flag = 'b';
@@ -644,7 +644,7 @@ void ExtensionSuite_TestCopyExtendedArra
/* Copy time! */
- copyMap = PtrMap_New( 1 );
+ copyMap = PtrMap_New( 1 );
arrayExtensionCopy = Stg_Class_Copy( arrayExtension, NULL, True, "_dup", copyMap );
structExtensionCopy = Stg_Class_Copy( structExtension, NULL, True, "_dup", copyMap );
nArrayCopy = PtrMap_Find( copyMap, arrayExtension->_array );
@@ -657,24 +657,24 @@ void ExtensionSuite_TestCopyExtendedArra
nType0 = (ExtensionStruct0*)ExtensionManager_Get(
arrayExtensionCopy,
current,
- ExtensionManager_GetHandle( structExtension, "Type0" ) );
- nTemp0 = (ExtensionStruct1*)ExtensionManager_Get(
+ ExtensionManager_GetHandle( structExtension, (Name)"Type0" ) );
+ nTemp0 = (ExtensionStruct1* )ExtensionManager_Get(
arrayExtensionCopy,
current,
- ExtensionManager_GetHandle( structExtension, "Temp0" ) );
+ ExtensionManager_GetHandle( structExtension, (Name)"Temp0" ) );
pcu_check_true( nType0->type == 'a' );
for ( ii = 0; ii < 10; ++ii ) {
pcu_check_true( nTemp0[ii].temp == (double)((array_I * 10) + ii) );
}
- nPres0 = (ExtensionStruct2*)ExtensionManager_Get(
+ nPres0 = (ExtensionStruct2* )ExtensionManager_Get(
arrayExtension,
ExtensionManager_At( arrayExtension, nArray, array_I ),
- ExtensionManager_GetHandle( arrayExtension, "Pres0" ) );
+ ExtensionManager_GetHandle( arrayExtension, (Name)"Pres0" ) );
pcu_check_true( nPres0->pres == (double)array_I );
- pcu_check_true( nPres0->flag == 'b' );
+ pcu_check_true( nPres0->flag == 'b' );
}
ExtensionManager_Free( structExtension, nArray );
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Foundation/tests/CommonRoutinesSuite.c
--- a/Base/Foundation/tests/CommonRoutinesSuite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Foundation/tests/CommonRoutinesSuite.c Thu Feb 04 15:13:37 2010 -0800
@@ -72,15 +72,15 @@ void CommonRoutinesSuite_Teardown( Commo
void CommonRoutinesSuite_TestLMS( CommonRoutinesSuiteData* data ) {
- pcu_check_true( 1 == Stg_LongestMatchingSubsequenceLength( "Acrobat", "BOAT", True ) );
- pcu_check_true( 6 == Stg_LongestMatchingSubsequenceLength( "Abracadabra", "Yabbadabbadoo", True ) );
- pcu_check_true( 7 == Stg_LongestMatchingSubsequenceLength( "Abracadabra", "Yabbadabbadoo", False ) );
- pcu_check_true( 6 == Stg_LongestMatchingSubsequenceLength( "Python", "PythonShape", False ) );
+ pcu_check_true( 1 == Stg_LongestMatchingSubsequenceLength( (char *)"Acrobat", (char *)"BOAT", True ) );
+ pcu_check_true( 6 == Stg_LongestMatchingSubsequenceLength( (char *)"Abracadabra", (char *)"Yabbadabbadoo", True ) );
+ pcu_check_true( 7 == Stg_LongestMatchingSubsequenceLength( (char *)"Abracadabra", (char *)"Yabbadabbadoo", False ) );
+ pcu_check_true( 6 == Stg_LongestMatchingSubsequenceLength( (char *)"Python", (char *)"PythonShape", False ) );
}
void CommonRoutinesSuite_TestStringIsNumeric( CommonRoutinesSuiteData* data ) {
- pcu_check_true( False == Stg_StringIsNumeric( "nan" ) );
+ pcu_check_true( False == Stg_StringIsNumeric( (char *)"nan" ) );
pcu_check_true( True == Stg_StringIsNumeric( "567" ) );
pcu_check_true( True == Stg_StringIsNumeric( "1.0e90" ) );
pcu_check_true( False == Stg_StringIsNumeric( "1e90e80" ) );
@@ -91,7 +91,7 @@ void CommonRoutinesSuite_TestStringIsNum
void CommonRoutinesSuite_TestStringIsEmpty( CommonRoutinesSuiteData* data ) {
- pcu_check_true( True == Stg_StringIsEmpty( "\t \n" ) );
+ pcu_check_true( True == Stg_StringIsEmpty( (char *)"\t \n" ) );
pcu_check_true( False == Stg_StringIsEmpty( "asdf" ) );
pcu_check_true( True == Stg_StringIsEmpty( " " ) );
pcu_check_true( True == Stg_StringIsEmpty( " \n" ) );
@@ -99,7 +99,7 @@ void CommonRoutinesSuite_TestStringIsEmp
}
-void CommonRoutinesSuite_TestStG_RoundDoubleToNDecimalPlaces( CommonRoutinesSuiteData* data ) {
+void CommonRoutinesSuite_TestStG_RoundDoubleToNDecimalPlaces( CommonRoutinesSuiteData* data ) {
double roundedValue;
double errorMargin;
Index testValue_I;
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Foundation/tests/MemMonitorSuite.c
--- a/Base/Foundation/tests/MemMonitorSuite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Foundation/tests/MemMonitorSuite.c Thu Feb 04 15:13:37 2010 -0800
@@ -50,7 +50,7 @@ typedef struct {
void MemMonitorSuite_Setup( MemMonitorSuiteData* data ) {
Journal_Enable_TypedStream( Info_Type, True );
- Stream_Enable( Journal_Register( Info_Type, Stg_MemMonitor_InfoStreamName ), True );
+ Stream_Enable( Journal_Register( Info_Type, (Name)Stg_MemMonitor_InfoStreamName ), True );
data->mm = NULL;
MPI_Comm_rank( MPI_COMM_WORLD, &data->rank );
@@ -78,7 +78,7 @@ void MemMonitorSuite_TestMonitor( MemMon
Stg_MemMonitor_SetMemoryWatchCriteria( 0.2 );
if (data->rank==0) {
- Stream_RedirectFile( Journal_Register( Info_Type, Stg_MemMonitor_InfoStreamName ), memoryReportOutputFilename );
+ Stream_RedirectFile( Journal_Register( Info_Type, (Name)Stg_MemMonitor_InfoStreamName ), memoryReportOutputFilename );
}
/* Don't create the MM until now, so we can control the total memory for testing purposes */
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Foundation/tests/MemoryReportSuite.c
--- a/Base/Foundation/tests/MemoryReportSuite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Foundation/tests/MemoryReportSuite.c Thu Feb 04 15:13:37 2010 -0800
@@ -112,13 +112,13 @@ void MemoryReportSuite_AllocGroupOne( Me
data->strB_alloc++;
data->strB_total += sizeof(StructB)*3;
- data->array2d = Memory_Alloc_2DArray( StructC, 4, 5, "GroupOne" );
+ data->array2d = Memory_Alloc_2DArray( StructC, 4, 5, (Name)"GroupOne" );
data->strC_alloc++;
- data->strC_total += Memory_Length_2DArray( sizeof(StructC), 4, 5 );
+ data->strC_total += Memory_Length_2DArray( sizeof(StructC ), 4, 5 );
- data->array3d = Memory_Alloc_3DArray( StructA, 2, 3, 4, "GroupOne" );
+ data->array3d = Memory_Alloc_3DArray( StructA, 2, 3, 4, (Name)"GroupOne" );
data->strA_alloc++;
- data->strA_total += Memory_Length_3DArray( sizeof(StructA), 2, 3, 4 );
+ data->strA_total += Memory_Length_3DArray( sizeof(StructA ), 2, 3, 4 );
data->array4d = Memory_Alloc_4DArray_Unnamed( StructB, 5, 4, 3, 2 );
data->strB_alloc++;
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Foundation/tests/ObjectListSuite.c
--- a/Base/Foundation/tests/ObjectListSuite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Foundation/tests/ObjectListSuite.c Thu Feb 04 15:13:37 2010 -0800
@@ -116,22 +116,22 @@ void ObjectListSuite_Teardown( ObjectLis
/* Test 2: Can we append the first entry? */
void ObjectListSuite_TestAppend( ObjectListSuiteData* data ) {
- Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), "a" );
- Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), "a" );
- Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), "a", 0, DummyPointer_Print, DummyPointer_Copy );
- Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), "a" );
+ Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), (Name)"a" );
+ Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), (Name)"a" );
+ Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), (Name)"a", 0, DummyPointer_Print, DummyPointer_Copy );
+ Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), (Name)"a" );
pcu_check_true(
- data->addPtr0 == Stg_ObjectList_Get( data->ol0, "a" ) &&
+ data->addPtr0 == Stg_ObjectList_Get( data->ol0, (Name)"a" ) &&
data->addPtr0 == Stg_ObjectList_ObjectAt( data->ol0, 0 ) &&
Stg_ObjectList_Count( data->ol0 ) == 1 &&
- data->addPtr1 == Stg_ObjectList_Get( &data->ol1, "a" ) &&
+ data->addPtr1 == Stg_ObjectList_Get( &data->ol1, (Name)"a" ) &&
data->addPtr1 == Stg_ObjectList_ObjectAt( &data->ol1, 0 ) &&
Stg_ObjectList_Count( &data->ol1 ) == 1 &&
- data->addPtr2 == Stg_ObjectList_Get( data->ol2, "a" ) &&
+ data->addPtr2 == Stg_ObjectList_Get( data->ol2, (Name)"a" ) &&
data->addPtr2 == Stg_ObjectList_ObjectAt( data->ol2, 0 ) &&
Stg_ObjectList_Count( data->ol2 ) == 1 &&
- data->addPtr3 == Stg_ObjectList_Get( data->ol3, "a" ) &&
+ data->addPtr3 == Stg_ObjectList_Get( data->ol3, (Name)"a" ) &&
data->addPtr3 == Stg_ObjectList_ObjectAt( data->ol3, 0 ) &&
Stg_ObjectList_Count( data->ol3 ) == 1 );
}
@@ -139,10 +139,10 @@ void ObjectListSuite_TestAppend( ObjectL
/* Test 3: Can we prepend the second entry? */
void ObjectListSuite_TestPrepend( ObjectListSuiteData* data ) {
- Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), "a" );
- Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), "a" );
- Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), "a", 0, DummyPointer_Print, DummyPointer_Copy );
- Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), "a" );
+ Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), (Name)"a" );
+ Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), (Name)"a" );
+ Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), (Name)"a", 0, DummyPointer_Print, DummyPointer_Copy );
+ Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), (Name)"a" );
Stg_ObjectList_ClassPrepend( data->ol0, (data->addPtr0 = DummyClass_New()), "b" );
Stg_ObjectList_ClassPrepend( &data->ol1, (data->addPtr1 = DummyClass_New()), "b" );
@@ -150,22 +150,22 @@ void ObjectListSuite_TestPrepend( Object
Stg_ObjectList_GlobalPointerPrepend( data->ol3, (data->addPtr3 = (void*)DummyFunc2), "b" );
pcu_check_true(
- data->addPtr0 == Stg_ObjectList_Get( data->ol0, "b" ) &&
+ data->addPtr0 == Stg_ObjectList_Get( data->ol0, (Name)"b" ) &&
data->addPtr0 == Stg_ObjectList_ObjectAt( data->ol0, 0 ) &&
Stg_ObjectList_Count( data->ol0 ) == 2 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol0, 1 ) ), "a" ) == 0 );
pcu_check_true(
- data->addPtr1 == Stg_ObjectList_Get( &data->ol1, "b" ) &&
+ data->addPtr1 == Stg_ObjectList_Get( &data->ol1, (Name)"b" ) &&
data->addPtr1 == Stg_ObjectList_ObjectAt( &data->ol1, 0 ) &&
Stg_ObjectList_Count( &data->ol1 ) == 2 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( &data->ol1, 1 ) ), "a" ) == 0 );
pcu_check_true(
- data->addPtr2 == Stg_ObjectList_Get( data->ol2, "b" ) &&
+ data->addPtr2 == Stg_ObjectList_Get( data->ol2, (Name)"b" ) &&
data->addPtr2 == Stg_ObjectList_ObjectAt( data->ol2, 0 ) &&
Stg_ObjectList_Count( data->ol2 ) == 2 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol2, 1 ) ), "a" ) == 0 );
pcu_check_true(
- data->addPtr3 == Stg_ObjectList_Get( data->ol3, "b" ) &&
+ data->addPtr3 == Stg_ObjectList_Get( data->ol3, (Name)"b" ) &&
data->addPtr3 == Stg_ObjectList_ObjectAt( data->ol3, 0 ) &&
Stg_ObjectList_Count( data->ol3 ) == 2 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol3, 1 ) ), "a" ) == 0 );
@@ -174,14 +174,14 @@ void ObjectListSuite_TestPrepend( Object
/* Test 4: Can we insert before "a" the third entry? */
void ObjectListSuite_TestInsertBefore( ObjectListSuiteData* data ) {
- Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), "b" );
- Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), "b" );
- Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), "b", 0, DummyPointer_Print, DummyPointer_Copy );
- Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), "b" );
- Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), "a" );
- Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), "a" );
- Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), "a", 0, DummyPointer_Print, DummyPointer_Copy );
- Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), "a" );
+ Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), (Name)"b" );
+ Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), (Name)"b" );
+ Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), (Name)"b", 0, DummyPointer_Print, DummyPointer_Copy );
+ Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), (Name)"b" );
+ Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), (Name)"a" );
+ Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), (Name)"a" );
+ Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), (Name)"a", 0, DummyPointer_Print, DummyPointer_Copy );
+ Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), (Name)"a" );
Stg_ObjectList_ClassInsertBefore( data->ol0, "a", (data->addPtr0 = DummyClass_New()), "c" );
Stg_ObjectList_ClassInsertBefore( &data->ol1, "a", (data->addPtr1 = DummyClass_New()), "c" );
@@ -196,25 +196,25 @@ void ObjectListSuite_TestInsertBefore( O
Stg_ObjectList_GlobalPointerInsertBefore( data->ol3, "a", (data->addPtr3 = (void*)DummyFunc3), "c" );
pcu_check_true(
- data->addPtr0 == Stg_ObjectList_Get( data->ol0, "c" ) &&
+ data->addPtr0 == Stg_ObjectList_Get( data->ol0, (Name)"c" ) &&
data->addPtr0 == Stg_ObjectList_ObjectAt( data->ol0, 1 ) &&
Stg_ObjectList_Count( data->ol0 ) == 3 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol0, 0 ) ), "b" ) == 0 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol0, 2 ) ), "a" ) == 0 );
pcu_check_true(
- data->addPtr1 == Stg_ObjectList_Get( &data->ol1, "c" ) &&
+ data->addPtr1 == Stg_ObjectList_Get( &data->ol1, (Name)"c" ) &&
data->addPtr1 == Stg_ObjectList_ObjectAt( &data->ol1, 1 ) &&
Stg_ObjectList_Count( &data->ol1 ) == 3 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( &data->ol1, 0 ) ), "b" ) == 0 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( &data->ol1, 2 ) ), "a" ) == 0 );
pcu_check_true(
- data->addPtr2 == Stg_ObjectList_Get( data->ol2, "c" ) &&
+ data->addPtr2 == Stg_ObjectList_Get( data->ol2, (Name)"c" ) &&
data->addPtr2 == Stg_ObjectList_ObjectAt( data->ol2, 1 ) &&
Stg_ObjectList_Count( data->ol2 ) == 3 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol2, 0 ) ), "b" ) == 0 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol2, 2 ) ), "a" ) == 0 );
pcu_check_true(
- data->addPtr3 == Stg_ObjectList_Get( data->ol3, "c" ) &&
+ data->addPtr3 == Stg_ObjectList_Get( data->ol3, (Name)"c" ) &&
data->addPtr3 == Stg_ObjectList_ObjectAt( data->ol3, 1 ) &&
Stg_ObjectList_Count( data->ol3 ) == 3 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol3, 0 ) ), "b" ) == 0 &&
@@ -224,18 +224,18 @@ void ObjectListSuite_TestInsertBefore( O
/* Test 5: Can we insert after "c" the fourth entry? */
void ObjectListSuite_TestInsertAfter( ObjectListSuiteData* data ) {
- Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), "b" );
- Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), "b" );
- Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), "b", 0, DummyPointer_Print, DummyPointer_Copy );
- Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), "b" );
- Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), "c" );
- Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), "c" );
- Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), "c", 0, DummyPointer_Print, DummyPointer_Copy );
- Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), "c" );
- Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), "a" );
- Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), "a" );
- Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), "a", 0, DummyPointer_Print, DummyPointer_Copy );
- Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), "a" );
+ Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), (Name)"b" );
+ Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), (Name)"b" );
+ Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), (Name)"b", 0, DummyPointer_Print, DummyPointer_Copy );
+ Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), (Name)"b" );
+ Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), (Name)"c" );
+ Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), (Name)"c" );
+ Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), (Name)"c", 0, DummyPointer_Print, DummyPointer_Copy );
+ Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), (Name)"c" );
+ Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), (Name)"a" );
+ Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), (Name)"a" );
+ Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), (Name)"a", 0, DummyPointer_Print, DummyPointer_Copy );
+ Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), (Name)"a" );
Stg_ObjectList_ClassInsertAfter( data->ol0, "c", (data->addPtr0 = DummyClass_New()), "d" );
Stg_ObjectList_ClassInsertAfter( &data->ol1, "c", (data->addPtr1 = DummyClass_New()), "d" );
@@ -251,28 +251,28 @@ void ObjectListSuite_TestInsertAfter( Ob
Stg_ObjectList_GlobalPointerInsertAfter( data->ol3, "c", (data->addPtr3 = (void*)DummyFunc4), "d" );
pcu_check_true(
- data->addPtr0 == Stg_ObjectList_Get( data->ol0, "d" ) &&
+ data->addPtr0 == Stg_ObjectList_Get( data->ol0, (Name)"d" ) &&
data->addPtr0 == Stg_ObjectList_ObjectAt( data->ol0, 2 ) &&
Stg_ObjectList_Count( data->ol0 ) == 4 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol0, 0 ) ), "b" ) == 0 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol0, 1 ) ), "c" ) == 0 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol0, 3 ) ), "a" ) == 0 );
pcu_check_true(
- data->addPtr1 == Stg_ObjectList_Get( &data->ol1, "d" ) &&
+ data->addPtr1 == Stg_ObjectList_Get( &data->ol1, (Name)"d" ) &&
data->addPtr1 == Stg_ObjectList_ObjectAt( &data->ol1, 2 ) &&
Stg_ObjectList_Count( &data->ol1 ) == 4 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( &data->ol1, 0 ) ), "b" ) == 0 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( &data->ol1, 1 ) ), "c" ) == 0 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( &data->ol1, 3 ) ), "a" ) == 0 );
pcu_check_true(
- data->addPtr2 == Stg_ObjectList_Get( data->ol2, "d" ) &&
+ data->addPtr2 == Stg_ObjectList_Get( data->ol2, (Name)"d" ) &&
data->addPtr2 == Stg_ObjectList_ObjectAt( data->ol2, 2 ) &&
Stg_ObjectList_Count( data->ol2 ) == 4 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol2, 0 ) ), "b" ) == 0 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol2, 1 ) ), "c" ) == 0 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol2, 3 ) ), "a" ) == 0 );
pcu_check_true(
- data->addPtr3 == Stg_ObjectList_Get( data->ol3, "d" ) &&
+ data->addPtr3 == Stg_ObjectList_Get( data->ol3, (Name)"d" ) &&
data->addPtr3 == Stg_ObjectList_ObjectAt( data->ol3, 2 ) &&
Stg_ObjectList_Count( data->ol3 ) == 4 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol3, 0 ) ), "b" ) == 0 &&
@@ -283,58 +283,50 @@ void ObjectListSuite_TestInsertAfter( Ob
/* Test 6: Can we replace "d" with the fifth entry? */
void ObjectListSuite_TestReplace( ObjectListSuiteData* data ) {
- Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), "b" );
- Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), "b" );
- Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), "b", 0, DummyPointer_Print, DummyPointer_Copy );
- Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), "b" );
- Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), "c" );
- Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), "c" );
- Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), "c", 0, DummyPointer_Print, DummyPointer_Copy );
- Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), "c" );
- Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), "d" );
- Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), "d" );
- Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), "d", 0, DummyPointer_Print, DummyPointer_Copy );
- Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), "d" );
- Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), "a" );
- Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), "a" );
- Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), "a", 0, DummyPointer_Print, DummyPointer_Copy );
- Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), "a" );
+ Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), (Name)"b" );
+ Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), (Name)"b" );
+ Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), (Name)"b", 0, DummyPointer_Print, DummyPointer_Copy );
+ Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), (Name)"b" );
+ Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), (Name)"c" );
+ Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), (Name)"c" );
+ Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), (Name)"c", 0, DummyPointer_Print, DummyPointer_Copy );
+ Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), (Name)"c" );
+ Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), (Name)"d" );
+ Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), (Name)"d" );
+ Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), (Name)"d", 0, DummyPointer_Print, DummyPointer_Copy );
+ Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), (Name)"d" );
+ Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), (Name)"a" );
+ Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), (Name)"a" );
+ Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), (Name)"a", 0, DummyPointer_Print, DummyPointer_Copy );
+ Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), (Name)"a" );
Stg_ObjectList_ClassReplace( data->ol0, "d", DELETE, (data->addPtr0 = DummyClass_New()), "e" );
Stg_ObjectList_ClassReplace( &data->ol1, "d", DELETE, (data->addPtr1 = DummyClass_New()), "e" );
- Stg_ObjectList_PointerReplace(
- data->ol2,
- "d",
- DELETE,
- (data->addPtr2 = DummyPointer_New()),
- "e",
- 0,
- DummyPointer_Print,
- DummyPointer_Copy );
- Stg_ObjectList_GlobalPointerReplace( data->ol3, "d", DELETE, (data->addPtr3 = (void*)DummyFunc5), "e" );
+ Stg_ObjectList_PointerReplace( data->ol2, "d", DELETE, (data->addPtr2 = DummyPointer_New()), (Name)"e", 0, DummyPointer_Print, DummyPointer_Copy );
+ Stg_ObjectList_GlobalPointerReplace( data->ol3, (Name)"d", DELETE, (data->addPtr3 = (void*)DummyFunc5), (Name)"e" );
pcu_check_true(
- data->addPtr0 == Stg_ObjectList_Get( data->ol0, "e" ) &&
+ data->addPtr0 == Stg_ObjectList_Get( data->ol0, (Name)"e" ) &&
data->addPtr0 == Stg_ObjectList_ObjectAt( data->ol0, 2 ) &&
Stg_ObjectList_Count( data->ol0 ) == 4 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol0, 0 ) ), "b" ) == 0 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol0, 1 ) ), "c" ) == 0 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol0, 3 ) ), "a" ) == 0 );
pcu_check_true(
- data->addPtr1 == Stg_ObjectList_Get( &data->ol1, "e" ) &&
+ data->addPtr1 == Stg_ObjectList_Get( &data->ol1, (Name)"e" ) &&
data->addPtr1 == Stg_ObjectList_ObjectAt( &data->ol1, 2 ) &&
Stg_ObjectList_Count( &data->ol1 ) == 4 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( &data->ol1, 0 ) ), "b" ) == 0 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( &data->ol1, 1 ) ), "c" ) == 0 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( &data->ol1, 3 ) ), "a" ) == 0 );
pcu_check_true(
- data->addPtr2 == Stg_ObjectList_Get( data->ol2, "e" ) &&
+ data->addPtr2 == Stg_ObjectList_Get( data->ol2, (Name)"e" ) &&
data->addPtr2 == Stg_ObjectList_ObjectAt( data->ol2, 2 ) &&
Stg_ObjectList_Count( data->ol2 ) == 4 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol2, 0 ) ), "b" ) == 0 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol2, 1 ) ), "c" ) == 0 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol2, 3 ) ), "a" ) == 0 );
pcu_check_true(
- data->addPtr3 == Stg_ObjectList_Get( data->ol3, "e" ) &&
+ data->addPtr3 == Stg_ObjectList_Get( data->ol3, (Name)"e" ) &&
data->addPtr3 == Stg_ObjectList_ObjectAt( data->ol3, 2 ) &&
Stg_ObjectList_Count( data->ol3 ) == 4 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol3, 0 ) ), "b" ) == 0 &&
@@ -345,31 +337,31 @@ void ObjectListSuite_TestReplace( Object
/* Test 7: Can we remove the "c" entry? */
void ObjectListSuite_TestRemove( ObjectListSuiteData* data ) {
- Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), "b" );
- Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), "b" );
- Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), "b", 0, DummyPointer_Print, DummyPointer_Copy );
- Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), "b" );
- Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), "c" );
- Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), "c" );
- Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), "c", 0, DummyPointer_Print, DummyPointer_Copy );
- Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), "c" );
- Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), "e" );
- Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), "e" );
- Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), "e", 0, DummyPointer_Print, DummyPointer_Copy );
- Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), "e" );
- Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), "a" );
- Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), "a" );
- Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), "a", 0, DummyPointer_Print, DummyPointer_Copy );
- Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), "a" );
+ Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), (Name)"b" );
+ Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), (Name)"b" );
+ Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), (Name)"b", 0, DummyPointer_Print, DummyPointer_Copy );
+ Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), (Name)"b" );
+ Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), (Name)"c" );
+ Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), (Name)"c" );
+ Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), (Name)"c", 0, DummyPointer_Print, DummyPointer_Copy );
+ Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), (Name)"c" );
+ Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), (Name)"e" );
+ Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), (Name)"e" );
+ Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), (Name)"e", 0, DummyPointer_Print, DummyPointer_Copy );
+ Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), (Name)"e" );
+ Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), (Name)"a" );
+ Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), (Name)"a" );
+ Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), (Name)"a", 0, DummyPointer_Print, DummyPointer_Copy );
+ Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), (Name)"a" );
- Stg_ObjectList_Remove( data->ol0, "c", DELETE );
- Stg_ObjectList_Remove( &data->ol1, "c", DELETE );
- Stg_ObjectList_Remove( data->ol2, "c", DELETE );
- Stg_ObjectList_Remove( data->ol3, "c", DELETE );
+ Stg_ObjectList_Remove( data->ol0, (Name)"c", DELETE );
+ Stg_ObjectList_Remove( &data->ol1, (Name)"c", DELETE );
+ Stg_ObjectList_Remove( data->ol2, (Name)"c", DELETE );
+ Stg_ObjectList_Remove( data->ol3, (Name)"c", DELETE );
pcu_check_true(
Stg_ObjectList_Count( data->ol0 ) == 3 &&
- strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol0, 0 ) ), "b" ) == 0 &&
+ strcmp( Stg_Object_GetName( (Stg_Object* )Stg_ObjectList_At( data->ol0, 0 ) ), "b" ) == 0 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol0, 1 ) ), "e" ) == 0 &&
strcmp( Stg_Object_GetName( (Stg_Object*)Stg_ObjectList_At( data->ol0, 2 ) ), "a" ) == 0 );
pcu_check_true(
@@ -392,21 +384,21 @@ void ObjectListSuite_TestRemove( ObjectL
/* Test 8: Can we replace all with the sixth entry? */
void ObjectListSuite_TestReplaceAll( ObjectListSuiteData* data ) {
- Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), "b" );
- Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), "b" );
- Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), "b", 0, DummyPointer_Print, DummyPointer_Copy );
- Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), "b" );
- Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), "e" );
- Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), "e" );
- Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), "e", 0, DummyPointer_Print, DummyPointer_Copy );
- Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), "e" );
- Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), "a" );
- Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), "a" );
- Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), "a", 0, DummyPointer_Print, DummyPointer_Copy );
- Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), "a" );
+ Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), (Name)"b" );
+ Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), (Name)"b" );
+ Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), (Name)"b", 0, DummyPointer_Print, DummyPointer_Copy );
+ Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), (Name)"b" );
+ Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), (Name)"e" );
+ Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), (Name)"e" );
+ Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), (Name)"e", 0, DummyPointer_Print, DummyPointer_Copy );
+ Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), (Name)"e" );
+ Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), (Name)"a" );
+ Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), (Name)"a" );
+ Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), (Name)"a", 0, DummyPointer_Print, DummyPointer_Copy );
+ Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), (Name)"a" );
- Stg_ObjectList_ClassReplaceAll( data->ol0, DELETE, (data->addPtr0 = DummyClass_New()), "f" );
- Stg_ObjectList_ClassReplaceAll( &data->ol1, DELETE, (data->addPtr1 = DummyClass_New()), "f" );
+ Stg_ObjectList_ClassReplaceAll( data->ol0, DELETE, (data->addPtr0 = DummyClass_New()), (Name)"f" );
+ Stg_ObjectList_ClassReplaceAll( &data->ol1, DELETE, (data->addPtr1 = DummyClass_New()), (Name)"f" );
Stg_ObjectList_PointerReplaceAll(
data->ol2,
DELETE,
@@ -417,19 +409,19 @@ void ObjectListSuite_TestReplaceAll( Obj
DummyPointer_Copy );
Stg_ObjectList_GlobalPointerReplaceAll( data->ol3, DELETE, (data->addPtr3 = (void*)DummyFunc6), "f" );
pcu_check_true(
- data->addPtr0 == Stg_ObjectList_Get( data->ol0, "f" ) &&
+ data->addPtr0 == Stg_ObjectList_Get( data->ol0, (Name)"f" ) &&
data->addPtr0 == Stg_ObjectList_ObjectAt( data->ol0, 0 ) &&
Stg_ObjectList_Count( data->ol0 ) == 1 );
pcu_check_true(
- data->addPtr1 == Stg_ObjectList_Get( &data->ol1, "f" ) &&
+ data->addPtr1 == Stg_ObjectList_Get( &data->ol1, (Name)"f" ) &&
data->addPtr1 == Stg_ObjectList_ObjectAt( &data->ol1, 0 ) &&
Stg_ObjectList_Count( &data->ol1 ) == 1 );
pcu_check_true(
- data->addPtr2 == Stg_ObjectList_Get( data->ol2, "f" ) &&
+ data->addPtr2 == Stg_ObjectList_Get( data->ol2, (Name)"f" ) &&
data->addPtr2 == Stg_ObjectList_ObjectAt( data->ol2, 0 ) &&
Stg_ObjectList_Count( data->ol2 ) == 1 );
pcu_check_true(
- data->addPtr3 == Stg_ObjectList_Get( data->ol3, "f" ) &&
+ data->addPtr3 == Stg_ObjectList_Get( data->ol3, (Name)"f" ) &&
data->addPtr3 == Stg_ObjectList_ObjectAt( data->ol3, 0 ) &&
Stg_ObjectList_Count( data->ol3 ) == 1 );
}
@@ -444,10 +436,10 @@ void ObjectListSuite_TestCopy( ObjectLis
Stg_ObjectList* ol2deep;
Stg_ObjectList* ol3deep;
- Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), "f" );
- Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), "f" );
- Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), "f", 0, DummyPointer_Print, DummyPointer_Copy );
- Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), "f" );
+ Stg_ObjectList_ClassAppend( data->ol0, (data->addPtr0 = DummyClass_New()), (Name)"f" );
+ Stg_ObjectList_ClassAppend( &data->ol1, (data->addPtr1 = DummyClass_New()), (Name)"f" );
+ Stg_ObjectList_PointerAppend( data->ol2, (data->addPtr2 = DummyPointer_New()), (Name)"f", 0, DummyPointer_Print, DummyPointer_Copy );
+ Stg_ObjectList_GlobalPointerAppend( data->ol3, (data->addPtr3 = (void*)DummyFunc1), (Name)"f" );
ol0deep = Stg_Class_Copy( data->ol0, 0, True, 0, 0 );
ol1deep = Stg_Class_Copy( &data->ol1, 0, True, 0, 0 );
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/Foundation/tests/PrimitiveObjectSuite.c
--- a/Base/Foundation/tests/PrimitiveObjectSuite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/Foundation/tests/PrimitiveObjectSuite.c Thu Feb 04 15:13:37 2010 -0800
@@ -58,18 +58,18 @@ void PrimitiveObjectSuite_TestPrimObject
list = Stg_ObjectList_New();
- Stg_ObjectList_Append( list, Stg_PrimitiveObject_New_UnsignedChar( 'a', "char item" ) );
- Stg_ObjectList_Append( list, Stg_PrimitiveObject_New_UnsignedShort( 123, "short item" ) );
- Stg_ObjectList_Append( list, Stg_PrimitiveObject_New_UnsignedInt( 456, "int item" ) );
- Stg_ObjectList_Append( list, Stg_PrimitiveObject_New_UnsignedLong( 789, "long item" ) );
- Stg_ObjectList_Append( list, Stg_PrimitiveObject_New_Char( 'a', "char item" ) );
- Stg_ObjectList_Append( list, Stg_PrimitiveObject_New_Short( -123, "short item" ) );
- Stg_ObjectList_Append( list, Stg_PrimitiveObject_New_Int( -456, "int item" ) );
- Stg_ObjectList_Append( list, Stg_PrimitiveObject_New_Long( -789, "long item" ) );
- Stg_ObjectList_Append( list, Stg_PrimitiveObject_New_Float( 1.2f, "float item" ) );
- Stg_ObjectList_Append( list, Stg_PrimitiveObject_New_Double( 2.4, "double item" ) );
+ Stg_ObjectList_Append( list, Stg_PrimitiveObject_New_UnsignedChar( 'a', (Name)"char item" ) );
+ Stg_ObjectList_Append( list, Stg_PrimitiveObject_New_UnsignedShort( 123, (Name)"short item" ) );
+ Stg_ObjectList_Append( list, Stg_PrimitiveObject_New_UnsignedInt( 456, (Name)"int item" ) );
+ Stg_ObjectList_Append( list, Stg_PrimitiveObject_New_UnsignedLong( 789, (Name)"long item" ) );
+ Stg_ObjectList_Append( list, Stg_PrimitiveObject_New_Char( 'a', (Name)"char item" ) );
+ Stg_ObjectList_Append( list, Stg_PrimitiveObject_New_Short( -123, (Name)"short item" ) );
+ Stg_ObjectList_Append( list, Stg_PrimitiveObject_New_Int( -456, (Name)"int item" ) );
+ Stg_ObjectList_Append( list, Stg_PrimitiveObject_New_Long( -789, (Name)"long item" ) );
+ Stg_ObjectList_Append( list, Stg_PrimitiveObject_New_Float( 1.2f, (Name)"float item" ) );
+ Stg_ObjectList_Append( list, Stg_PrimitiveObject_New_Double( 2.4, (Name)"double item" ) );
- primObject = (Stg_PrimitiveObject*)Stg_ObjectList_At( list, 0 );
+ primObject = (Stg_PrimitiveObject* )Stg_ObjectList_At( list, 0 );
pcu_check_true( primObject->dataType == Stg_C_Primitive_Type_UnsignedChar );
pcu_check_true( primObject->value.asUnsignedChar == 'a' );
primObject = (Stg_PrimitiveObject*)Stg_ObjectList_At( list, 1 );
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/IO/tests/DictionarySuite.c
--- a/Base/IO/tests/DictionarySuite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/IO/tests/DictionarySuite.c Thu Feb 04 15:13:37 2010 -0800
@@ -110,16 +110,16 @@ void DictionarySuite_SetupTestDictData(
testStruct = Dictionary_Entry_Value_NewStruct();
Stg_asprintf( &testDD->testKeys[++iter], "test_struct" );
testDD->testValues[iter] = testStruct;
- Dictionary_Entry_Value_AddMember( testStruct, "height", Dictionary_Entry_Value_FromDouble( testDD->testStruct->height ) );
- Dictionary_Entry_Value_AddMember( testStruct, "anisotropic", Dictionary_Entry_Value_FromBool( testDD->testStruct->anisotropic ) );
- Dictionary_Entry_Value_AddMember( testStruct, "person", Dictionary_Entry_Value_FromString( testDD->testStruct->person ) );
+ Dictionary_Entry_Value_AddMember( testStruct, (Dictionary_Entry_Key)"height", Dictionary_Entry_Value_FromDouble( testDD->testStruct->height ) );
+ Dictionary_Entry_Value_AddMember( testStruct, (Dictionary_Entry_Key)"anisotropic", Dictionary_Entry_Value_FromBool( testDD->testStruct->anisotropic ) );
+ Dictionary_Entry_Value_AddMember( testStruct, (Dictionary_Entry_Key)"person", Dictionary_Entry_Value_FromString( testDD->testStruct->person ) );
/* Adding a 2nd struct within the first struct */
- testStruct2 = Dictionary_Entry_Value_NewStruct();
- Dictionary_Entry_Value_AddMember( testStruct, "geom", testStruct2 );
- Dictionary_Entry_Value_AddMember( testStruct2, "startx", Dictionary_Entry_Value_FromUnsignedInt( testDD->testStruct->geom.startx ) );
- Dictionary_Entry_Value_AddMember( testStruct2, "starty", Dictionary_Entry_Value_FromUnsignedInt( testDD->testStruct->geom.starty ) );
- Dictionary_Entry_Value_AddMember( testStruct2, "startz", Dictionary_Entry_Value_FromUnsignedInt( testDD->testStruct->geom.startz ) );
+ testStruct2 = Dictionary_Entry_Value_NewStruct( );
+ Dictionary_Entry_Value_AddMember( testStruct, (Dictionary_Entry_Key)"geom", testStruct2 );
+ Dictionary_Entry_Value_AddMember( testStruct2, (Dictionary_Entry_Key)"startx", Dictionary_Entry_Value_FromUnsignedInt( testDD->testStruct->geom.startx ) );
+ Dictionary_Entry_Value_AddMember( testStruct2, (Dictionary_Entry_Key)"starty", Dictionary_Entry_Value_FromUnsignedInt( testDD->testStruct->geom.starty ) );
+ Dictionary_Entry_Value_AddMember( testStruct2, (Dictionary_Entry_Key)"startz", Dictionary_Entry_Value_FromUnsignedInt( testDD->testStruct->geom.startz ) );
}
void DictionarySuite_Setup( DictionarySuiteData* data ) {
@@ -138,7 +138,7 @@ void DictionarySuite_DictionaryData_Free
void DictionarySuite_DictionaryData_Free( DictionarySuite_TestDictData* testDD ) {
Index ii;
for ( ii=0; ii< testDD->testEntriesCount; ii++ ) {
- Memory_Free( testDD->testKeys[ii] );
+ Memory_Free( testDD->testKeys[ii] );
/* Note: we don't free the testValues here, as expect that deleting the
* dictionary has already done this */
}
@@ -238,8 +238,8 @@ void DictionarySuite_TestGet( Dictionary
DictionarySuite_PopulateDictWithTestValues( data->dict, data->testDD );
- testStruct = Dictionary_Get( data->dict, "test_struct" );
- yValue = Dictionary_Entry_Value_GetMember( Dictionary_Entry_Value_GetMember(testStruct, "geom"), "starty");
+ testStruct = Dictionary_Get( data->dict, (Dictionary_Entry_Key)"test_struct" );
+ yValue = Dictionary_Entry_Value_GetMember( Dictionary_Entry_Value_GetMember(testStruct, (Dictionary_Entry_Key)"geom" ), "starty");
pcu_check_true( data->testDD->testStruct->geom.starty == Dictionary_Entry_Value_AsDouble( yValue ) );
}
@@ -252,9 +252,9 @@ void DictionarySuite_TestSet( Dictionary
DictionarySuite_PopulateDictWithTestValues( data->dict, data->testDD );
- listValue = Dictionary_Get( data->dict, "test_list" );
+ listValue = Dictionary_Get( data->dict, (Dictionary_Entry_Key)"test_list" );
/* getting dictionary out of a list */
- currValue = Dictionary_Entry_Value_GetFirstElement( listValue );
+ currValue = Dictionary_Entry_Value_GetFirstElement( listValue );
/* do something to this value */
Dictionary_Entry_Value_SetFromDouble( currValue, newVal1 );
currValue = currValue->next;
@@ -284,8 +284,8 @@ void DictionarySuite_TestAddElement( Dic
DictionarySuite_PopulateDictWithTestValues( data->dict, data->testDD );
/* turning the starty value into a list using add element */
- testStruct = Dictionary_Get( data->dict, "test_struct" );
- yValue = Dictionary_Entry_Value_GetMember( Dictionary_Entry_Value_GetMember(testStruct, "geom"), "starty");
+ testStruct = Dictionary_Get( data->dict, (Dictionary_Entry_Key)"test_struct" );
+ yValue = Dictionary_Entry_Value_GetMember( Dictionary_Entry_Value_GetMember(testStruct, (Dictionary_Entry_Key)"geom" ), "starty");
Dictionary_Entry_Value_AddElement( yValue, Dictionary_Entry_Value_FromDouble(newVal) );
pcu_check_true( Dictionary_Entry_Value_Type_List == yValue->type );
@@ -308,26 +308,26 @@ void DictionarySuite_TestShortcuts( Dict
* returned, and a new entry with the given key added to the dict. */
pcu_check_streq( data->testDD->testString, Dictionary_GetString_WithDefault( data->dict, "test_cstring", "heya" ) );
pcu_check_streq( "heya", Dictionary_GetString_WithDefault( data->dict, "test_cstring2", "heya" ) );
- pcu_check_true( NULL != Dictionary_Get( data->dict, "test_cstring2" ) );
- pcu_check_true( data->testDD->testDouble = Dictionary_GetDouble_WithDefault( data->dict, "test_double", 2.8 ) );
- pcu_check_true( 2.8 == Dictionary_GetDouble_WithDefault( data->dict, "test_double2", 2.8 ) );
- pcu_check_true( NULL != Dictionary_Get( data->dict, "test_double2" ) );
+ pcu_check_true( NULL != Dictionary_Get( data->dict, (Dictionary_Entry_Key)"test_cstring2" ) );
+ pcu_check_true( data->testDD->testDouble = Dictionary_GetDouble_WithDefault( data->dict, (Dictionary_Entry_Key)"test_double", 2.8 ) );
+ pcu_check_true( 2.8 == Dictionary_GetDouble_WithDefault( data->dict, (Dictionary_Entry_Key)"test_double2", 2.8 ) );
+ pcu_check_true( NULL != Dictionary_Get( data->dict, (Dictionary_Entry_Key)"test_double2" ) );
pcu_check_true( data->testDD->testUint = Dictionary_GetUnsignedInt_WithDefault( data->dict, "test_uint", 33 ) );
pcu_check_true( 33 == Dictionary_GetUnsignedInt_WithDefault( data->dict, "test_uint2", 33 ) );
- pcu_check_true( NULL != Dictionary_Get( data->dict, "test_uint2" ) );
- pcu_check_true( data->testDD->testInt = Dictionary_GetInt_WithDefault( data->dict, "test_int", -24 ) );
- pcu_check_true( -24 == Dictionary_GetInt_WithDefault( data->dict, "test_int2", -24 ) );
- pcu_check_true( NULL != Dictionary_Get( data->dict, "test_int2" ) );
+ pcu_check_true( NULL != Dictionary_Get( data->dict, (Dictionary_Entry_Key)"test_uint2" ) );
+ pcu_check_true( data->testDD->testInt = Dictionary_GetInt_WithDefault( data->dict, (Dictionary_Entry_Key)"test_int", -24 ) );
+ pcu_check_true( -24 == Dictionary_GetInt_WithDefault( data->dict, (Dictionary_Entry_Key)"test_int2", -24 ) );
+ pcu_check_true( NULL != Dictionary_Get( data->dict, (Dictionary_Entry_Key)"test_int2" ) );
pcu_check_true( data->testDD->testUnsignedlong = Dictionary_GetUnsignedLong_WithDefault( data->dict, "test_unsignedlong", 32433 ) );
pcu_check_true( 32433 == Dictionary_GetUnsignedLong_WithDefault( data->dict, "test_unsignedlong2", 32433 ) );
- pcu_check_true( NULL != Dictionary_Get( data->dict, "test_unsignedlong2" ) );
- pcu_check_true( data->testDD->testBool = Dictionary_GetBool_WithDefault( data->dict, "test_bool", False ) );
- pcu_check_true( False == Dictionary_GetBool_WithDefault( data->dict, "test_bool2", False ) );
- pcu_check_true( NULL != Dictionary_Get( data->dict, "test_bool2" ) );
+ pcu_check_true( NULL != Dictionary_Get( data->dict, (Dictionary_Entry_Key)"test_unsignedlong2" ) );
+ pcu_check_true( data->testDD->testBool = Dictionary_GetBool_WithDefault( data->dict, (Dictionary_Entry_Key)"test_bool", False ) );
+ pcu_check_true( False == Dictionary_GetBool_WithDefault( data->dict, (Dictionary_Entry_Key)"test_bool2", False ) );
+ pcu_check_true( NULL != Dictionary_Get( data->dict, (Dictionary_Entry_Key)"test_bool2" ) );
pcu_check_streq( data->testDD->testString, Dictionary_GetString_WithPrintfDefault( data->dict, "test_cstring", "heya%s%u", "hey", 3 ) );
pcu_check_streq( "heyahey3", Dictionary_GetString_WithPrintfDefault( data->dict, "test_cstring3", "heya%s%u", "hey", 3 ) );
- pcu_check_true( NULL != Dictionary_Get( data->dict, "test_cstring3" ) );
+ pcu_check_true( NULL != Dictionary_Get( data->dict, (Dictionary_Entry_Key)"test_cstring3" ) );
}
@@ -337,14 +337,14 @@ void DictionarySuite_TestMerge( Dictiona
Dictionary_Entry_Value* mergedStruct=NULL;
Dictionary_Entry_Value* expectedMergedStruct=NULL;
- testStruct2 = Dictionary_Entry_Value_NewStruct();
- Dictionary_Entry_Value_AddMember( testStruct2, "height", Dictionary_Entry_Value_FromDouble( data->testDD->testStruct->height ) );
- Dictionary_Entry_Value_AddMember( testStruct2, "anisotropic", Dictionary_Entry_Value_FromBool( False ) );
- Dictionary_Entry_Value_AddMember( testStruct2, "new_person", Dictionary_Entry_Value_FromString( "Luke" ) );
- testGeomStruct2 = Dictionary_Entry_Value_NewStruct();
- Dictionary_Entry_Value_AddMember( testStruct2, "geom", testGeomStruct2 );
- Dictionary_Entry_Value_AddMember( testGeomStruct2, "startx", Dictionary_Entry_Value_FromUnsignedInt( data->testDD->testStruct->geom.startx ) );
- Dictionary_Entry_Value_AddMember( testGeomStruct2, "startz", Dictionary_Entry_Value_FromUnsignedInt( 222 ) );
+ testStruct2 = Dictionary_Entry_Value_NewStruct( );
+ Dictionary_Entry_Value_AddMember( testStruct2, (Dictionary_Entry_Key)"height", Dictionary_Entry_Value_FromDouble( data->testDD->testStruct->height ) );
+ Dictionary_Entry_Value_AddMember( testStruct2, (Dictionary_Entry_Key)"anisotropic", Dictionary_Entry_Value_FromBool( False ) );
+ Dictionary_Entry_Value_AddMember( testStruct2, (Dictionary_Entry_Key)"new_person", Dictionary_Entry_Value_FromString( "Luke" ) );
+ testGeomStruct2 = Dictionary_Entry_Value_NewStruct( );
+ Dictionary_Entry_Value_AddMember( testStruct2, (Dictionary_Entry_Key)"geom", testGeomStruct2 );
+ Dictionary_Entry_Value_AddMember( testGeomStruct2, (Dictionary_Entry_Key)"startx", Dictionary_Entry_Value_FromUnsignedInt( data->testDD->testStruct->geom.startx ) );
+ Dictionary_Entry_Value_AddMember( testGeomStruct2, (Dictionary_Entry_Key)"startz", Dictionary_Entry_Value_FromUnsignedInt( 222 ) );
/* Testing Merge_Append */
DictionarySuite_PopulateDictWithTestValues( data->dict, data->testDD );
@@ -353,7 +353,7 @@ void DictionarySuite_TestMerge( Dictiona
/* OK: since this was an append, we expect _two_ entries called "test_struct",
* one preceding the other, one with the orig data, one with new data */
pcu_check_true( (data->testDD->testEntriesCount+1) == data->dict->count );
- pcu_check_true( Dictionary_Entry_Value_Compare( data->testDD->testValues[7], Dictionary_Get( data->dict, "test_struct" ) ) );
+ pcu_check_true( Dictionary_Entry_Value_Compare( data->testDD->testValues[7], Dictionary_Get( data->dict, (Dictionary_Entry_Key)"test_struct" ) ) );
pcu_check_true( Dictionary_Entry_Value_Compare( testStruct2, data->dict->entryPtr[8]->value ) );
Dictionary_Empty( data->dict );
@@ -363,14 +363,14 @@ void DictionarySuite_TestMerge( Dictiona
/* The nicest way for this test I think is to manually build a merged struct
* to compare against */
expectedMergedStruct = Dictionary_Entry_Value_Copy( data->testDD->testValues[7], True );
- Dictionary_Set( expectedMergedStruct->as.typeStruct, "anisotropic", Dictionary_Entry_Value_FromBool( False ) );
- Dictionary_Add( expectedMergedStruct->as.typeStruct, "new_person", Dictionary_Entry_Value_FromString( "Luke" ) );
- Dictionary_Set( (Dictionary_Get( expectedMergedStruct->as.typeStruct, "geom" ))->as.typeStruct, "startz", Dictionary_Entry_Value_FromUnsignedInt( 222 ) );
+ Dictionary_Set( expectedMergedStruct->as.typeStruct, (Dictionary_Entry_Key)"anisotropic", Dictionary_Entry_Value_FromBool( False ) );
+ Dictionary_Add( expectedMergedStruct->as.typeStruct, (Dictionary_Entry_Key)"new_person", Dictionary_Entry_Value_FromString( "Luke" ) );
+ Dictionary_Set( (Dictionary_Get( expectedMergedStruct->as.typeStruct, (Dictionary_Entry_Key)"geom" ) )->as.typeStruct, "startz", Dictionary_Entry_Value_FromUnsignedInt( 222 ) );
Dictionary_AddMerge( data->dict, "test_struct", Dictionary_Entry_Value_Copy( testStruct2, True ), Dictionary_MergeType_Merge );
/* This time, the new struct should be merged into the existing one */
pcu_check_true( data->testDD->testEntriesCount == data->dict->count );
- mergedStruct = Dictionary_Get( data->dict, "test_struct" );
+ mergedStruct = Dictionary_Get( data->dict, (Dictionary_Entry_Key)"test_struct" );
pcu_check_true( Dictionary_Entry_Value_Compare( mergedStruct, expectedMergedStruct ) );
Dictionary_Empty( data->dict );
Dictionary_Entry_Value_Delete( expectedMergedStruct );
@@ -379,14 +379,14 @@ void DictionarySuite_TestMerge( Dictiona
DictionarySuite_PopulateDictWithTestValues( data->dict, data->testDD );
Dictionary_AddMerge( data->dict, "test_struct", Dictionary_Entry_Value_Copy( testStruct2, True ), Dictionary_MergeType_Replace );
pcu_check_true( data->testDD->testEntriesCount == data->dict->count );
- pcu_check_true( Dictionary_Entry_Value_Compare( testStruct2, Dictionary_Get( data->dict, "test_struct" ) ) );
+ pcu_check_true( Dictionary_Entry_Value_Compare( testStruct2, Dictionary_Get( data->dict, (Dictionary_Entry_Key)"test_struct" ) ) );
Dictionary_Empty( data->dict );
Dictionary_Entry_Value_Delete( testStruct2 );
}
-void DictionarySuite_TestReadAllParamFromCommandLine( DictionarySuiteData* data ) {
+void DictionarySuite_TestReadAllParamFromCommandLine( DictionarySuiteData* data ) {
int argc;
char** argv;
char** expectedKeys;
@@ -419,15 +419,15 @@ void DictionarySuite_TestReadAllParamFro
Stg_asprintf( &expectedKeys[2], "foo" );
expectedVals[2] = Dictionary_Entry_Value_NewStruct();
- Dictionary_Entry_Value_AddMember( expectedVals[2], "bar", Dictionary_Entry_Value_FromDouble( 5 ) );
+ Dictionary_Entry_Value_AddMember( expectedVals[2], (Dictionary_Entry_Key)"bar", Dictionary_Entry_Value_FromDouble( 5 ) );
Stg_asprintf( &argv[6], "--vpac.csd.steve=cool");
Stg_asprintf( &expectedKeys[3], "vpac" );
expectedVals[3] = Dictionary_Entry_Value_NewStruct();
- Dictionary_Entry_Value_AddMember( expectedVals[3], "csd", tmpStruct = Dictionary_Entry_Value_NewStruct() );
- Dictionary_Entry_Value_AddMember( tmpStruct, "steve", Dictionary_Entry_Value_FromString( "cool" ) );
+ Dictionary_Entry_Value_AddMember( expectedVals[3], (Dictionary_Entry_Key)"csd", tmpStruct = Dictionary_Entry_Value_NewStruct() );
+ Dictionary_Entry_Value_AddMember( tmpStruct, (Dictionary_Entry_Key)"steve", Dictionary_Entry_Value_FromString( "cool" ) );
Stg_asprintf( &argv[7], "--foo.bot=7");
- Dictionary_Entry_Value_AddMember( expectedVals[2], "bot", Dictionary_Entry_Value_FromDouble( 7 ) );
+ Dictionary_Entry_Value_AddMember( expectedVals[2], (Dictionary_Entry_Key)"bot", Dictionary_Entry_Value_FromDouble( 7 ) );
Stg_asprintf( &argv[8], "--sports[]=hockey");
Stg_asprintf( &expectedKeys[4], "sports" );
@@ -442,21 +442,21 @@ void DictionarySuite_TestReadAllParamFro
expectedVals[5] = Dictionary_Entry_Value_NewList();
Dictionary_Entry_Value_AddElement( expectedVals[5], tmpStruct = Dictionary_Entry_Value_NewStruct() );
- Dictionary_Entry_Value_AddMember( tmpStruct, "name", Dictionary_Entry_Value_FromString( "pressure" ) );
+ Dictionary_Entry_Value_AddMember( tmpStruct, (Dictionary_Entry_Key)"name", Dictionary_Entry_Value_FromString( "pressure" ) );
Stg_asprintf( &argv[12], "--sles[].name=temperature");
Dictionary_Entry_Value_AddElement( expectedVals[5], tmpStruct2 = Dictionary_Entry_Value_NewStruct() );
- Dictionary_Entry_Value_AddMember( tmpStruct2, "name", Dictionary_Entry_Value_FromString( "temperature" ) );
+ Dictionary_Entry_Value_AddMember( tmpStruct2, (Dictionary_Entry_Key)"name", Dictionary_Entry_Value_FromString( "temperature" ) );
Stg_asprintf( &argv[13], "--sles[0].solver=mg");
- Dictionary_Entry_Value_AddMember( tmpStruct, "solver", Dictionary_Entry_Value_FromString( "mg" ) );
+ Dictionary_Entry_Value_AddMember( tmpStruct, (Dictionary_Entry_Key)"solver", Dictionary_Entry_Value_FromString( "mg" ) );
Stg_asprintf( &argv[14], "--sles[1].solver=direct");
- Dictionary_Entry_Value_AddMember( tmpStruct2, "solver", Dictionary_Entry_Value_FromString( "direct" ) );
+ Dictionary_Entry_Value_AddMember( tmpStruct2, (Dictionary_Entry_Key)"solver", Dictionary_Entry_Value_FromString( "direct" ) );
Stg_asprintf( &argv[15], "--some.crazy[].shit=here");
Stg_asprintf( &expectedKeys[6], "some" );
expectedVals[6] = Dictionary_Entry_Value_NewStruct();
- Dictionary_Entry_Value_AddMember( expectedVals[6], "crazy", tmpList = Dictionary_Entry_Value_NewList() );
+ Dictionary_Entry_Value_AddMember( expectedVals[6], (Dictionary_Entry_Key)"crazy", tmpList = Dictionary_Entry_Value_NewList() );
Dictionary_Entry_Value_AddElement( tmpList, tmpStruct = Dictionary_Entry_Value_NewStruct() );
- Dictionary_Entry_Value_AddMember( tmpStruct, "shit", Dictionary_Entry_Value_FromString( "here" ) );
+ Dictionary_Entry_Value_AddMember( tmpStruct, (Dictionary_Entry_Key)"shit", Dictionary_Entry_Value_FromString( "here" ) );
Dictionary_ReadAllParamFromCommandLine( data->dict, argc, argv );
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/IO/tests/IO_HandlerSuite.c
--- a/Base/IO/tests/IO_HandlerSuite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/IO/tests/IO_HandlerSuite.c Thu Feb 04 15:13:37 2010 -0800
@@ -80,8 +80,8 @@ void IO_HandlerSuite_Setup( IO_HandlerSu
data->io_handler = XML_IO_Handler_New();
/* We don't want output in the tests by default */
- Stream_Enable( Journal_Register( Debug_Type, XML_IO_Handler_Type ), False );
- Stream_Enable( Journal_Register( Info_Type, XML_IO_Handler_Type ), False );
+ Stream_Enable( Journal_Register( Debug_Type, (Name)XML_IO_Handler_Type ), False );
+ Stream_Enable( Journal_Register( Info_Type, (Name)XML_IO_Handler_Type ), False );
data->dict1 = Dictionary_New();
data->dict2 = Dictionary_New();
data->testDD = Memory_Alloc_Unnamed( DictionarySuite_TestDictData );
@@ -384,12 +384,12 @@ void IO_HandlerSuite_TestReadRawDataEntr
pcu_check_true( Dictionary_Entry_Value_Type_List == data->dict2->entryPtr[0]->value->type );
for (ii=0; ii < list1EntryCount; ii++ ) {
dev = Dictionary_Entry_Value_GetElement( data->dict2->entryPtr[0]->value, ii );
- intVal = Dictionary_Entry_Value_AsInt( Dictionary_Entry_Value_GetMember( dev, "0" ) );
- pcu_check_true( intVal == list1Vals[ii][0] );
- intVal = Dictionary_Entry_Value_AsInt( Dictionary_Entry_Value_GetMember( dev, "1" ) );
- pcu_check_true( intVal == list1Vals[ii][1] );
- intVal = Dictionary_Entry_Value_AsInt( Dictionary_Entry_Value_GetMember( dev, "2" ) );
- pcu_check_true( intVal == list1Vals[ii][2] );
+ intVal = Dictionary_Entry_Value_AsInt( Dictionary_Entry_Value_GetMember( dev, (Dictionary_Entry_Key)"0" ) );
+ pcu_check_true( intVal == list1Vals[ii][0] );
+ intVal = Dictionary_Entry_Value_AsInt( Dictionary_Entry_Value_GetMember( dev, (Dictionary_Entry_Key)"1" ) );
+ pcu_check_true( intVal == list1Vals[ii][1] );
+ intVal = Dictionary_Entry_Value_AsInt( Dictionary_Entry_Value_GetMember( dev, (Dictionary_Entry_Key)"2" ) );
+ pcu_check_true( intVal == list1Vals[ii][2] );
}
pcu_check_true( Dictionary_Entry_Compare( data->dict2->entryPtr[1],
(Dictionary_Entry_Key)list2Name) );
@@ -397,20 +397,15 @@ void IO_HandlerSuite_TestReadRawDataEntr
data->dict2->entryPtr[1]->value->type );
for (ii=0; ii < list2EntryCount; ii++ ) {
dev = Dictionary_Entry_Value_GetElement( data->dict2->entryPtr[1]->value, ii );
- strVal = Dictionary_Entry_Value_AsString( Dictionary_Entry_Value_GetMember(
- dev, (Dictionary_Entry_Key)list2CompNames[0] ) );
+ strVal = Dictionary_Entry_Value_AsString( Dictionary_Entry_Value_GetMember( dev, (Dictionary_Entry_Key)(Dictionary_Entry_Key)list2CompNames[0] ) );
pcu_check_streq( list2StringVals[ii], strVal );
- intVal = Dictionary_Entry_Value_AsInt( Dictionary_Entry_Value_GetMember(
- dev, (Dictionary_Entry_Key)list2CompNames[1] ) );
- pcu_check_true( intVal == list2CoordVals[ii][0] );
- intVal = Dictionary_Entry_Value_AsInt( Dictionary_Entry_Value_GetMember(
- dev, (Dictionary_Entry_Key)list2CompNames[2] ) );
- pcu_check_true( intVal == list2CoordVals[ii][1] );
- intVal = Dictionary_Entry_Value_AsInt( Dictionary_Entry_Value_GetMember(
- dev, (Dictionary_Entry_Key)list2CompNames[3] ) );
- pcu_check_true( intVal == list2CoordVals[ii][2] );
- boolVal = Dictionary_Entry_Value_AsBool( Dictionary_Entry_Value_GetMember(
- dev, (Dictionary_Entry_Key)list2CompNames[4] ) );
+ intVal = Dictionary_Entry_Value_AsInt( Dictionary_Entry_Value_GetMember( dev, (Dictionary_Entry_Key)(Dictionary_Entry_Key)list2CompNames[1] ) );
+ pcu_check_true( intVal == list2CoordVals[ii][0] );
+ intVal = Dictionary_Entry_Value_AsInt( Dictionary_Entry_Value_GetMember( dev, (Dictionary_Entry_Key)(Dictionary_Entry_Key)list2CompNames[2] ) );
+ pcu_check_true( intVal == list2CoordVals[ii][1] );
+ intVal = Dictionary_Entry_Value_AsInt( Dictionary_Entry_Value_GetMember( dev, (Dictionary_Entry_Key)(Dictionary_Entry_Key)list2CompNames[3] ) );
+ pcu_check_true( intVal == list2CoordVals[ii][2] );
+ boolVal = Dictionary_Entry_Value_AsBool( Dictionary_Entry_Value_GetMember( dev, (Dictionary_Entry_Key)(Dictionary_Entry_Key)list2CompNames[4] ) );
pcu_check_true( boolVal == list2BoolVals[ii] );
}
}
@@ -420,7 +415,7 @@ void IO_HandlerSuite_TestReadRawDataEntr
}
-void IO_HandlerSuite_TestReadAllFromCommandLine( IO_HandlerSuiteData* data ) {
+void IO_HandlerSuite_TestReadAllFromCommandLine( IO_HandlerSuiteData* data ) {
Index ii;
char** xmlTestFilenames;
int argc;
@@ -521,10 +516,10 @@ void IO_HandlerSuite_TestReadDuplicateEn
pcu_check_true( Dictionary_Entry_Value_Type_Struct == structDev->type );
pcu_check_true( struct1_OrigParamCount == Dictionary_Entry_Value_GetCount( structDev ) );
for (ii=0; ii < struct1_OrigParamCount; ii++ ) {
- elementDev = Dictionary_Entry_Value_GetMember( structDev, (Dictionary_Entry_Key)paramNames2[ii] );
+ elementDev = Dictionary_Entry_Value_GetMember( structDev, (Dictionary_Entry_Key)(Dictionary_Entry_Key)paramNames2[ii] );
pcu_check_true( paramVals2[ii] == Dictionary_Entry_Value_AsUnsignedInt( elementDev ) );
}
- Dictionary_Empty( data->dict2 );
+ Dictionary_Empty( data->dict2 );
/* Sub-test 2: with mergeType as "append", the 2 structs should be 2 separate entries */
pcu_filename_input( "testXML-dupKeys-2.xml", xmlTestFilename2 );
@@ -537,8 +532,8 @@ void IO_HandlerSuite_TestReadDuplicateEn
pcu_check_true( Dictionary_Entry_Value_Type_Struct == structDev->type );
pcu_check_true( struct1_OrigParamCount == Dictionary_Entry_Value_GetCount( structDev ) );
for (ii=0; ii < struct1_OrigParamCount; ii++ ) {
- elementDev = Dictionary_Entry_Value_GetMember( structDev, (Dictionary_Entry_Key)paramNames[ii] );
- pcu_check_true( paramVals[ii] == Dictionary_Entry_Value_AsUnsignedInt( elementDev ) );
+ elementDev = Dictionary_Entry_Value_GetMember( structDev, (Dictionary_Entry_Key)(Dictionary_Entry_Key)paramNames[ii] );
+ pcu_check_true( paramVals[ii] == Dictionary_Entry_Value_AsUnsignedInt( elementDev ) );
}
/* Second entry should be struct2 */
pcu_check_true( Dictionary_Entry_Compare( data->dict2->entryPtr[1], (Dictionary_Entry_Key)struct1Name) );
@@ -546,10 +541,10 @@ void IO_HandlerSuite_TestReadDuplicateEn
pcu_check_true( Dictionary_Entry_Value_Type_Struct == structDev->type );
pcu_check_true( struct1_OrigParamCount == Dictionary_Entry_Value_GetCount( structDev ) );
for (ii=0; ii < struct1_OrigParamCount; ii++ ) {
- elementDev = Dictionary_Entry_Value_GetMember( structDev, (Dictionary_Entry_Key)paramNames[ii] );
+ elementDev = Dictionary_Entry_Value_GetMember( structDev, (Dictionary_Entry_Key)(Dictionary_Entry_Key)paramNames[ii] );
pcu_check_true( paramVals2[ii] == Dictionary_Entry_Value_AsUnsignedInt( elementDev ) );
}
- Dictionary_Empty( data->dict2 );
+ Dictionary_Empty( data->dict2 );
/* Sub-test 3.1: with mergeType as "merge", structs to be merged.
* However, default childrenMergeType is "append", so all entries added */
@@ -608,10 +603,10 @@ void IO_HandlerSuite_TestReadNonExistent
char expectedErrorMsg[MAXLINE];
Stg_asprintf( &errorFilename, "./errorMsg-NonExist-%d.txt", data->rank );
- Stream_RedirectFile( Journal_Register( Error_Type, XML_IO_Handler_Type ), errorFilename );
- Stream_ClearCustomFormatters( Journal_Register( Error_Type, XML_IO_Handler_Type ) );
+ Stream_RedirectFile( Journal_Register( Error_Type, (Name)XML_IO_Handler_Type ), errorFilename );
+ Stream_ClearCustomFormatters( Journal_Register( Error_Type, (Name)XML_IO_Handler_Type ) );
- if (0 == data->rank) {
+ if (0 == data->rank ) {
#ifdef DEBUG
pcu_check_assert( IO_Handler_ReadAllFromFile( data->io_handler, notExistFilename, data->dict2 ) );
#else
@@ -636,10 +631,10 @@ void IO_HandlerSuite_TestReadInvalid( IO
pcu_filename_input( "Invalid.xml", invalidXMLFilename );
pcu_filename_expected( errorFilename, expectedErrorFilename );
- Stream_RedirectFile( Journal_Register( Error_Type, XML_IO_Handler_Type ), errorFilename );
- Stream_ClearCustomFormatters( Journal_Register( Error_Type, XML_IO_Handler_Type ) );
+ Stream_RedirectFile( Journal_Register( Error_Type, (Name)XML_IO_Handler_Type ), errorFilename );
+ Stream_ClearCustomFormatters( Journal_Register( Error_Type, (Name)XML_IO_Handler_Type ) );
- if ( 0 == data->rank ) {
+ if ( 0 == data->rank ) {
#ifdef DEBUG
pcu_check_assert( IO_Handler_ReadAllFromFile( data->io_handler, invalidXMLFilename, data->dict2 ) );
#else
@@ -659,10 +654,10 @@ void IO_HandlerSuite_TestReadWrongNS( IO
pcu_filename_input( "WrongNS.xml", wrongNS_XMLFilename );
pcu_filename_expected( errorFilename, expectedErrorFilename );
- Stream_RedirectFile( Journal_Register( Error_Type, XML_IO_Handler_Type ), errorFilename );
- Stream_ClearCustomFormatters( Journal_Register( Error_Type, XML_IO_Handler_Type ) );
+ Stream_RedirectFile( Journal_Register( Error_Type, (Name)XML_IO_Handler_Type ), errorFilename );
+ Stream_ClearCustomFormatters( Journal_Register( Error_Type, (Name)XML_IO_Handler_Type ) );
- if ( 0 == data->rank ) {
+ if ( 0 == data->rank ) {
#ifdef DEBUG
pcu_check_assert( IO_Handler_ReadAllFromFile( data->io_handler, wrongNS_XMLFilename, data->dict2 ) );
#else
@@ -682,10 +677,10 @@ void IO_HandlerSuite_TestReadWrongRootNo
pcu_filename_input( "WrongRootNode.xml", wrongRootNode_XMLFilename );
pcu_filename_expected( errorFilename, expectedErrorFilename );
- Stream_RedirectFile( Journal_Register( Error_Type, XML_IO_Handler_Type ), errorFilename );
- Stream_ClearCustomFormatters( Journal_Register( Error_Type, XML_IO_Handler_Type ) );
+ Stream_RedirectFile( Journal_Register( Error_Type, (Name)XML_IO_Handler_Type ), errorFilename );
+ Stream_ClearCustomFormatters( Journal_Register( Error_Type, (Name)XML_IO_Handler_Type ) );
- if ( 0 == data->rank ) {
+ if ( 0 == data->rank ) {
#ifdef DEBUG
pcu_check_assert( IO_Handler_ReadAllFromFile( data->io_handler, wrongRootNode_XMLFilename, data->dict2 ) );
#else
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/IO/tests/JournalSuite.c
--- a/Base/IO/tests/JournalSuite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/IO/tests/JournalSuite.c Thu Feb 04 15:13:37 2010 -0800
@@ -99,11 +99,11 @@ void JournalSuite_TestRegister( JournalS
testJournal = stJournal;
stJournal = data->savedJournal;
- myInfo = Journal_Register( Info_Type, "MyInfo" );
- myDebug = Journal_Register( Debug_Type, "MyDebug" );
- myDump = Journal_Register( Dump_Type, "MyDump" );
- myError = Journal_Register( Error_Type, "MyError" );
- allNew = Journal_Register( "New_Type", "allNew" );
+ myInfo = Journal_Register( Info_Type, (Name)"MyInfo" );
+ myDebug = Journal_Register( Debug_Type, (Name)"MyDebug" );
+ myDump = Journal_Register( Dump_Type, (Name)"MyDump" );
+ myError = Journal_Register( Error_Type, (Name)"MyError" );
+ allNew = Journal_Register( "New_Type", (Name)"allNew" );
/* Check the streams themselves were created properly */
/* Including Louis' requirement that they default to have printingRank 0 */
@@ -130,11 +130,11 @@ void JournalSuite_TestRegister( JournalS
pcu_check_true( STREAM_ALL_RANKS == Stream_GetPrintingRank( allNew ));
/* Now check they were inserted in Journal hierarchy correctly */
- pcu_check_true( Stg_ObjectList_Get( Journal_GetTypedStream(Info_Type)->_children, "MyInfo" ) == myInfo );
- pcu_check_true( Stg_ObjectList_Get( Journal_GetTypedStream(Debug_Type)->_children, "MyDebug" ) == myDebug );
- pcu_check_true( Stg_ObjectList_Get( Journal_GetTypedStream(Dump_Type)->_children, "MyDump" ) == myDump );
- pcu_check_true( Stg_ObjectList_Get( Journal_GetTypedStream(Error_Type)->_children, "MyError" ) == myError );
- pcu_check_true( Stg_ObjectList_Get( Journal_GetTypedStream("New_Type")->_children, "allNew" ) == allNew );
+ pcu_check_true( Stg_ObjectList_Get( Journal_GetTypedStream(Info_Type)->_children, (Name)"MyInfo" ) == myInfo );
+ pcu_check_true( Stg_ObjectList_Get( Journal_GetTypedStream(Debug_Type )->_children, "MyDebug" ) == myDebug );
+ pcu_check_true( Stg_ObjectList_Get( Journal_GetTypedStream(Dump_Type)->_children, (Name)"MyDump" ) == myDump );
+ pcu_check_true( Stg_ObjectList_Get( Journal_GetTypedStream(Error_Type )->_children, "MyError" ) == myError );
+ pcu_check_true( Stg_ObjectList_Get( Journal_GetTypedStream("New_Type")->_children, (Name)"allNew" ) == allNew );
/* Ok, restore the testing journal */
stJournal = testJournal;
@@ -146,7 +146,7 @@ void JournalSuite_TestRegister2( Journal
Stream* register2Test;
register2Stream = Journal_Register2( Info_Type, "Component", "Instance" );
- register2Test = Journal_Register( Info_Type, "Component.Instance" );
+ register2Test = Journal_Register( Info_Type, (Name)"Component.Instance" );
pcu_check_true( register2Stream == register2Test );
}
@@ -164,12 +164,12 @@ void JournalSuite_TestPrintBasics( Journ
pcu_check_true( Stream_IsEnable( Journal_GetTypedStream(Info_Type)) == True );
pcu_check_true( Stream_IsEnable( Journal_GetTypedStream(Debug_Type)) == False );
pcu_check_true( Stream_IsEnable( Journal_GetTypedStream(Dump_Type)) == False );
- pcu_check_true( Stream_IsEnable( Journal_GetTypedStream(Error_Type)) == True ) ;
+ pcu_check_true( Stream_IsEnable( Journal_GetTypedStream(Error_Type)) == True ) ;
- myInfo = Journal_Register( InfoStream_Type, "MyInfo");
- myDebug = Journal_Register( DebugStream_Type, "MyDebug" );
- myDump = Journal_Register( Dump_Type, "MyDump" );
- myError = Journal_Register( ErrorStream_Type, "MyError" );
+ myInfo = Journal_Register( InfoStream_Type, (Name)"MyInfo" );
+ myDebug = Journal_Register( DebugStream_Type, (Name)"MyDebug" );
+ myDump = Journal_Register( Dump_Type, (Name)"MyDump" );
+ myError = Journal_Register( ErrorStream_Type, (Name)"MyError" );
Journal_Printf( myInfo, "%s\n", "HELLOInfo" );
pcu_check_true( fgets( outLine, MAXLINE, data->testStdOutFile ));
@@ -213,7 +213,7 @@ void JournalSuite_TestPrintfL( JournalSu
#define MAXLINE 1000
char outLine[MAXLINE];
- myStream = Journal_Register( InfoStream_Type, "myComponent");
+ myStream = Journal_Register( InfoStream_Type, (Name)"myComponent" );
Journal_PrintfL( myStream, 1, "Hello\n" );
pcu_check_true( fgets( outLine, MAXLINE, data->testStdOutFile ));
pcu_check_streq( outLine, "Hello\n" );
@@ -234,7 +234,7 @@ void JournalSuite_TestDPrintf( JournalSu
#define MAXLINE 1000
char outLine[MAXLINE];
- myInfo = Journal_Register( InfoStream_Type, "MyInfo");
+ myInfo = Journal_Register( InfoStream_Type, (Name)"MyInfo" );
Journal_DPrintf( myInfo, "DPrintf\n" );
#ifdef DEBUG
pcu_check_true( fgets( outLine, MAXLINE, data->testStdOutFile ));
@@ -253,7 +253,7 @@ void JournalSuite_TestPrintChildStreams(
char outLine[MAXLINE];
/* Make sure the hierarchy works*/
- myStream = Journal_Register( InfoStream_Type, "myComponent");
+ myStream = Journal_Register( InfoStream_Type, (Name)"myComponent" );
childStream1 = Stream_RegisterChild( myStream, "child1" );
childStream2 = Stream_RegisterChild( childStream1, "child2" );
@@ -300,47 +300,41 @@ void JournalSuite_TestReadFromDictionary
const char* testNewTypeFilename1 = "./testJournal-out1.txt";
const char* testNewTypeFilename2 = "./testJournal-out2.txt";
- infoTest1 = Journal_Register( Info_Type, "test1" );
- infoTest2 = Journal_Register( Info_Type, "test2" );
- debugTest1 = Journal_Register( Debug_Type, "test1" );
- debugTest2 = Journal_Register( Debug_Type, "test2" );
- dumpTest1 = Journal_Register( Dump_Type, "test1" );
- dumpTest2 = Journal_Register( Dump_Type, "test2" );
+ infoTest1 = Journal_Register( Info_Type, (Name)"test1" );
+ infoTest2 = Journal_Register( Info_Type, (Name)"test2" );
+ debugTest1 = Journal_Register( Debug_Type, (Name)"test1" );
+ debugTest2 = Journal_Register( Debug_Type, (Name)"test2" );
+ dumpTest1 = Journal_Register( Dump_Type, (Name)"test1" );
+ dumpTest2 = Journal_Register( Dump_Type, (Name)"test2" );
- Dictionary_Add( testDict, "journal.debug.test1", Dictionary_Entry_Value_FromBool( True ));
- Dictionary_Add( testDict, "journal.dump.test1", Dictionary_Entry_Value_FromBool( True ));
- Dictionary_Add( testDict, "journal.info.test2", Dictionary_Entry_Value_FromBool( False ));
- Dictionary_Add( testDict, "journal.info.test2", Dictionary_Entry_Value_FromBool( False ));
- Dictionary_Add( testDict, "journal.info.test1.new1", Dictionary_Entry_Value_FromBool( True ));
- Dictionary_Add( testDict, "journal.info.test1.new2", Dictionary_Entry_Value_FromBool( False ));
- Dictionary_Add( testDict, "journal-level.info.test1.new1",
- Dictionary_Entry_Value_FromUnsignedInt( 3 ));
- Dictionary_Add( testDict, "journal.newtype", Dictionary_Entry_Value_FromBool( True ));
- Dictionary_Add( testDict, "journal-file.newtype",
- Dictionary_Entry_Value_FromString( testNewTypeFilename1 ));
- Dictionary_Add( testDict, "journal-file.newtype.other",
- Dictionary_Entry_Value_FromString( testNewTypeFilename2 ));
- Dictionary_Add( testDict, "journal-rank.info.propertiestest1",
- Dictionary_Entry_Value_FromUnsignedInt( 0 ));
- Dictionary_Add( testDict, "journal-rank.info.propertiestest2",
- Dictionary_Entry_Value_FromUnsignedInt( 5 ));
- Dictionary_Add( testDict, "journal-autoflush.info.propertiestest1",
- Dictionary_Entry_Value_FromBool( False ));
+ Dictionary_Add( testDict, (Dictionary_Entry_Key)"journal.debug.test1", Dictionary_Entry_Value_FromBool( True ) );
+ Dictionary_Add( testDict, (Dictionary_Entry_Key)"journal.dump.test1", Dictionary_Entry_Value_FromBool( True ) );
+ Dictionary_Add( testDict, (Dictionary_Entry_Key)"journal.info.test2", Dictionary_Entry_Value_FromBool( False ) );
+ Dictionary_Add( testDict, (Dictionary_Entry_Key)"journal.info.test2", Dictionary_Entry_Value_FromBool( False ) );
+ Dictionary_Add( testDict, (Dictionary_Entry_Key)"journal.info.test1.new1", Dictionary_Entry_Value_FromBool( True ) );
+ Dictionary_Add( testDict, (Dictionary_Entry_Key)"journal.info.test1.new2", Dictionary_Entry_Value_FromBool( False ) );
+ Dictionary_Add( testDict, (Dictionary_Entry_Key)"journal-level.info.test1.new1", Dictionary_Entry_Value_FromUnsignedInt( 3 ) );
+ Dictionary_Add( testDict, (Dictionary_Entry_Key)"journal.newtype", Dictionary_Entry_Value_FromBool( True ) );
+ Dictionary_Add( testDict, (Dictionary_Entry_Key)"journal-file.newtype", Dictionary_Entry_Value_FromString( testNewTypeFilename1 ) );
+ Dictionary_Add( testDict, (Dictionary_Entry_Key)"journal-file.newtype.other", Dictionary_Entry_Value_FromString( testNewTypeFilename2 ) );
+ Dictionary_Add( testDict, (Dictionary_Entry_Key)"journal-rank.info.propertiestest1", Dictionary_Entry_Value_FromUnsignedInt( 0 ) );
+ Dictionary_Add( testDict, (Dictionary_Entry_Key)"journal-rank.info.propertiestest2", Dictionary_Entry_Value_FromUnsignedInt( 5 ) );
+ Dictionary_Add( testDict, (Dictionary_Entry_Key)"journal-autoflush.info.propertiestest1", Dictionary_Entry_Value_FromBool( False ));
Journal_ReadFromDictionary( testDict );
pcu_check_true( True == debugTest1->_enable );
pcu_check_true( True == dumpTest1->_enable );
- pcu_check_true( False == infoTest2->_enable );
+ pcu_check_true( False == infoTest2->_enable );
- newTest1 = Journal_Register( Info_Type, "test1.new1" );
- newTest2 = Journal_Register( Info_Type, "test1.new2" );
+ newTest1 = Journal_Register( Info_Type, (Name)"test1.new1" );
+ newTest2 = Journal_Register( Info_Type, (Name)"test1.new2" );
pcu_check_true( True == newTest1->_enable );
pcu_check_true( False == newTest2->_enable );
pcu_check_true( 3 == newTest1->_level );
/* Just do the rest of this test with 1 proc to avoid parallel I/O problems */
- if ( data->rank==0 ) {
+ if ( data->rank==0 ) {
FILE* testNewTypeFile1;
FILE* testNewTypeFile2;
#define MAXLINE 1000
@@ -348,8 +342,8 @@ void JournalSuite_TestReadFromDictionary
/* We do actually need to do some printing to the newtype streams, as the filename isn't stored
* on the CFile or JournalFile struct*/
- fileTest1 = Journal_Register( "newtype", "hello" );
- fileTest2 = Journal_Register( "newtype", "other" );
+ fileTest1 = Journal_Register( "newtype", (Name)"hello" );
+ fileTest2 = Journal_Register( "newtype", (Name)"other" );
Journal_Printf( fileTest1, "yay!\n" );
Journal_Printf( fileTest2, "double yay!\n" );
Stream_Flush( fileTest1 );
@@ -361,8 +355,8 @@ void JournalSuite_TestReadFromDictionary
pcu_check_true( fgets( outLine, MAXLINE, testNewTypeFile2 ));
pcu_check_streq( outLine, "double yay!\n" );
- propTest1 = Journal_Register( Info_Type, "propertiestest1" );
- propTest2 = Journal_Register( Info_Type, "propertiestest2" );
+ propTest1 = Journal_Register( Info_Type, (Name)"propertiestest1" );
+ propTest2 = Journal_Register( Info_Type, (Name)"propertiestest2" );
pcu_check_true( 0 == Stream_GetPrintingRank( propTest1 ));
pcu_check_true( 5 == Stream_GetPrintingRank( propTest2 ));
pcu_check_true( False == Stream_GetAutoFlush( propTest1 ));
@@ -376,15 +370,15 @@ void JournalSuite_TestReadFromDictionary
}
-void JournalSuite_TestPrintString_WithLength( JournalSuiteData* data ) {
- Stream* myStream = Journal_Register( Info_Type, "TestStream" );
+void JournalSuite_TestPrintString_WithLength( JournalSuiteData* data ) {
+ Stream* myStream = Journal_Register( Info_Type, (Name)"TestStream" );
char* string = "helloWorldHowDoYouDo";
int char_I;
const Name stringLengthTestFilename = "testJournalPrintStringWithLength.txt" ;
char expectedFilename[PCU_PATH_MAX];
/* Just do this test with rank 0 */
- if (data->rank != 0) return;
+ if (data->rank != 0 ) return;
Stream_RedirectFile( myStream, stringLengthTestFilename );
@@ -401,7 +395,7 @@ void JournalSuite_TestPrintString_WithLe
void JournalSuite_TestShortcuts( JournalSuiteData* data ) {
- Stream* myStream = Journal_Register( Info_Type, "TestStream" );
+ Stream* myStream = Journal_Register( Info_Type, (Name)"TestStream" );
char* string = "helloWorldHowDoYouDo";
double doubleValue = 3142e20;
double floatValue = 2.173425;
@@ -436,11 +430,11 @@ void JournalSuite_TestFirewall( JournalS
void JournalSuite_TestFirewall( JournalSuiteData* data ) {
Stream* myInfo = NULL;
- myInfo = Journal_Register( Info_Type, "MyInfo" );
+ myInfo = Journal_Register( Info_Type, (Name)"MyInfo" );
stJournal->firewallProducesAssert = True;
- /* We expect nothing to happen on this first run - in effect the test would "fail" if an uncaught assert()
+ /* We expect nothing to happen on this first run - in effect the test would "fail" if an uncaught assert( )
* terminated the program */
Journal_Firewall( 1, myInfo, "Firewall\n" );
/* We can use pcu_check_assert to make sure a pcu_assert is generated. This is actually quite important
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/IO/tests/MPIStreamSuite.c
--- a/Base/IO/tests/MPIStreamSuite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/IO/tests/MPIStreamSuite.c Thu Feb 04 15:13:37 2010 -0800
@@ -75,11 +75,11 @@ void MPIStreamSuite_TestWriteAllProcesso
Dictionary_AddFromUnsignedInt( data->dict, "journal-mpi-offset.MPIStream.one", 100 );
Journal_ReadFromDictionary( data->dict );
- stream1 = Journal_Register( MPIStream_Type, "one" );
+ stream1 = Journal_Register( MPIStream_Type, (Name)"one" );
pcu_check_true( STREAM_ALL_RANKS == Stream_GetPrintingRank( stream1 ) );
/* Write half the alphabet to each process */
- for ( ii = 0; ii < PER_RANK_COUNT; ++ii ) {
+ for ( ii = 0; ii < PER_RANK_COUNT; ++ii ) {
dataArray[ii] = 'a' + PER_RANK_COUNT * data->rank + ii;
}
@@ -131,7 +131,7 @@ void MPIStreamSuite_TestPrintWithOffset(
Dictionary_AddFromString( data->dict, "journal-file.MPIStream.two", testMPIFilename );
Journal_ReadFromDictionary( data->dict );
- stream2 = Journal_Register( MPIStream_Type, "two" );
+ stream2 = Journal_Register( MPIStream_Type, (Name)"two" );
pcu_check_true( STREAM_ALL_RANKS == Stream_GetPrintingRank( stream2 ) );
for( ii=0; ii <10*(data->rank+1); ii++ ) {
@@ -139,7 +139,7 @@ void MPIStreamSuite_TestPrintWithOffset(
}
rankPrintString[10*(data->rank+1)] = '\0';
- stringLength = 10*(data->rank+1);
+ stringLength = 10*(data->rank+1 );
MPIStream_SetOffset( stream2, stringLength*sizeof(char), data->comm );
diff -r c16613f1fc54 -r 69f4dc15d8a6 Base/IO/tests/RankFormatterSuite.c
--- a/Base/IO/tests/RankFormatterSuite.c Tue Jan 26 16:30:16 2010 -0800
+++ b/Base/IO/tests/RankFormatterSuite.c Thu Feb 04 15:13:37 2010 -0800
@@ -71,7 +71,7 @@ void RankFormatterSuite_TestPrintWithRan
Stg_asprintf( &prefixStr, "%d: ", data->myRank );
}
- myInfo = Journal_Register( Info_Type, "MyInfo" );
+ myInfo = Journal_Register( Info_Type, (Name)"MyInfo" );
Stream_AddFormatter( myInfo, RankFormatter_New() );
Stream_SetPrintingRank( myInfo, STREAM_ALL_RANKS );
Stream_RedirectFile( myInfo, testOutFilename );
More information about the CIG-COMMITS
mailing list