Index: /trunk/psLib/test/astronomy/tst_psMetadata_05.c
===================================================================
--- /trunk/psLib/test/astronomy/tst_psMetadata_05.c	(revision 1444)
+++ /trunk/psLib/test/astronomy/tst_psMetadata_05.c	(revision 1445)
@@ -11,6 +11,6 @@
 *  @author  Ross Harman, MHPCC
 *
-*  @version $Revision: 1.1 $  $Name: not supported by cvs2svn $
-*  @date  $Date: 2004-08-10 01:14:46 $
+*  @version $Revision: 1.2 $  $Name: not supported by cvs2svn $
+*  @date  $Date: 2004-08-10 01:39:37 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -59,4 +59,5 @@
 int main( int argc, char* argv[] )
 {
+    long data;
     psMetadataItem *item1 = NULL;
     psMetadataItem *item2 = NULL;
@@ -131,52 +132,62 @@
         printf("ERROR: Couldn't open file for writing\n");
     }
-    psMetadataItemPrint(fd, "Item value: %ld", item2);
+    psMetadataItemPrint(fd, "%ld", item2);
     printFooter(stdout, "psMetadata", "Test F - Write metadata item to file", true);
-
-
-    // Test F - Attempt to use null metadata with setIterator
-    printNegativeTestHeader(stdout,"psMetadata", "Test F - Attempt to use null metadata with setIterator",
+    fclose(fd);
+    fd = fopen("./tst_psMetadata05_OUT", "r");
+    if(fd == NULL) {
+        printf("ERROR: Couldn't open file for reading\n");
+    }
+    fscanf(fd, "%ld", &data);
+    fclose(fd);
+    if(data != 55) {
+        printf("ERROR: Data in file is not as expected. Value: %ld. Should be: 55.\n", data);
+    }
+
+
+    // Test G - Attempt to use null metadata with setIterator
+    printNegativeTestHeader(stdout,"psMetadata", "Test G - Attempt to use null metadata with setIterator",
                             "Null metadata collection not allowed", 0);
     psMetadataSetIterator(NULL, 0);
-    printFooter(stdout, "psMetadata", "Test F - Attempt to use null metadata with setIterator", true);
-
-
-    // Test G - Attempt to use null metadata with getNext
-    printNegativeTestHeader(stdout,"psMetadata", "Test G - Attempt to use null metadata with getNext",
+    printFooter(stdout, "psMetadata", "Test G - Attempt to use null metadata with setIterator", true);
+
+
+    // Test H - Attempt to use null metadata with getNext
+    printNegativeTestHeader(stdout,"psMetadata", "Test H - Attempt to use null metadata with getNext",
                             "Null metadata collection not allowed", 0);
     psMetadataGetNext(NULL, "myItem2", 0);
-    printFooter(stdout, "psMetadata", "Test G - Attempt to use null metadata with getNext", true);
-
-
-    // Test H - Attempt to use null metadata with getPrevious
-    printNegativeTestHeader(stdout,"psMetadata", "Test H - Attempt to use null metadata with getPrevious",
+    printFooter(stdout, "psMetadata", "Test H - Attempt to use null metadata with getNext", true);
+
+
+    // Test I - Attempt to use null metadata with getPrevious
+    printNegativeTestHeader(stdout,"psMetadata", "Test I - Attempt to use null metadata with getPrevious",
                             "Null metadata collection not allowed", 0);
     psMetadataGetPrevious(NULL, "myItem2", 0);
-    printFooter(stdout, "psMetadata", "Test H - Attempt to use null metadata with getPrevious", true);
-
-
-    // Test I - Attempt to use null file with itemPrint
-    printNegativeTestHeader(stdout,"psMetadata", "Test I - Attempt to use null file with itemPrint",
+    printFooter(stdout, "psMetadata", "Test I - Attempt to use null metadata with getPrevious", true);
+
+
+    // Test J - Attempt to use null file with itemPrint
+    printNegativeTestHeader(stdout,"psMetadata", "Test J - Attempt to use null file with itemPrint",
                             "Null file descriptor not allowed", 0);
     psMetadataItemPrint(NULL, "Item value: %ld", item2);
-    printFooter(stdout, "psMetadata", "Test I - Attempt to use null file with itemPrint", true);
-
-
-    // Test J - Attempt to use null format with itemPrint
-    printNegativeTestHeader(stdout,"psMetadata", "Test J - Attempt to use null format with itemPrint",
+    printFooter(stdout, "psMetadata", "Test J - Attempt to use null file with itemPrint", true);
+
+
+    // Test K - Attempt to use null format with itemPrint
+    printNegativeTestHeader(stdout,"psMetadata", "Test K - Attempt to use null format with itemPrint",
                             "Null format not allowed", 0);
     psMetadataItemPrint(fd, NULL, item2);
-    printFooter(stdout, "psMetadata", "Test J - Attempt to use null format with itemPrint", true);
-
-
-    // Test K - Attempt to use null item with itemPrint
-    printNegativeTestHeader(stdout,"psMetadata", "Test K - Attempt to use null item with itemPrint",
+    printFooter(stdout, "psMetadata", "Test K - Attempt to use null format with itemPrint", true);
+
+
+    // Test L - Attempt to use null item with itemPrint
+    printNegativeTestHeader(stdout,"psMetadata", "Test L - Attempt to use null item with itemPrint",
                             "Null metadata not allowed", 0);
     psMetadataItemPrint(fd, "Item value: %ld", NULL);
-    printFooter(stdout, "psMetadata", "Test K - Attempt to use null item with itemPrint", true);
-
-
-    // Test L - Free psMetadata
-    printPositiveTestHeader(stdout, "psMetadata", "Test I - Free psMetadata");
+    printFooter(stdout, "psMetadata", "Test L - Attempt to use null item with itemPrint", true);
+
+
+    // Test M - Free psMetadata
+    printPositiveTestHeader(stdout, "psMetadata", "Test M - Free psMetadata");
     psFree(metadata);
     psFree(item1);
@@ -190,5 +201,5 @@
         printf("ERROR: Found %d bad memory blocks\n", nBad);
     }
-    printFooter(stdout, "psMetadata", "Test L - Free psMetadata", true);
+    printFooter(stdout, "psMetadata", "Test M - Free psMetadata", true);
 
 
Index: /trunk/psLib/test/collections/tst_psMetadata_05.c
===================================================================
--- /trunk/psLib/test/collections/tst_psMetadata_05.c	(revision 1444)
+++ /trunk/psLib/test/collections/tst_psMetadata_05.c	(revision 1445)
@@ -11,6 +11,6 @@
 *  @author  Ross Harman, MHPCC
 *
-*  @version $Revision: 1.1 $  $Name: not supported by cvs2svn $
-*  @date  $Date: 2004-08-10 01:14:46 $
+*  @version $Revision: 1.2 $  $Name: not supported by cvs2svn $
+*  @date  $Date: 2004-08-10 01:39:37 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -59,4 +59,5 @@
 int main( int argc, char* argv[] )
 {
+    long data;
     psMetadataItem *item1 = NULL;
     psMetadataItem *item2 = NULL;
@@ -131,52 +132,62 @@
         printf("ERROR: Couldn't open file for writing\n");
     }
-    psMetadataItemPrint(fd, "Item value: %ld", item2);
+    psMetadataItemPrint(fd, "%ld", item2);
     printFooter(stdout, "psMetadata", "Test F - Write metadata item to file", true);
-
-
-    // Test F - Attempt to use null metadata with setIterator
-    printNegativeTestHeader(stdout,"psMetadata", "Test F - Attempt to use null metadata with setIterator",
+    fclose(fd);
+    fd = fopen("./tst_psMetadata05_OUT", "r");
+    if(fd == NULL) {
+        printf("ERROR: Couldn't open file for reading\n");
+    }
+    fscanf(fd, "%ld", &data);
+    fclose(fd);
+    if(data != 55) {
+        printf("ERROR: Data in file is not as expected. Value: %ld. Should be: 55.\n", data);
+    }
+
+
+    // Test G - Attempt to use null metadata with setIterator
+    printNegativeTestHeader(stdout,"psMetadata", "Test G - Attempt to use null metadata with setIterator",
                             "Null metadata collection not allowed", 0);
     psMetadataSetIterator(NULL, 0);
-    printFooter(stdout, "psMetadata", "Test F - Attempt to use null metadata with setIterator", true);
-
-
-    // Test G - Attempt to use null metadata with getNext
-    printNegativeTestHeader(stdout,"psMetadata", "Test G - Attempt to use null metadata with getNext",
+    printFooter(stdout, "psMetadata", "Test G - Attempt to use null metadata with setIterator", true);
+
+
+    // Test H - Attempt to use null metadata with getNext
+    printNegativeTestHeader(stdout,"psMetadata", "Test H - Attempt to use null metadata with getNext",
                             "Null metadata collection not allowed", 0);
     psMetadataGetNext(NULL, "myItem2", 0);
-    printFooter(stdout, "psMetadata", "Test G - Attempt to use null metadata with getNext", true);
-
-
-    // Test H - Attempt to use null metadata with getPrevious
-    printNegativeTestHeader(stdout,"psMetadata", "Test H - Attempt to use null metadata with getPrevious",
+    printFooter(stdout, "psMetadata", "Test H - Attempt to use null metadata with getNext", true);
+
+
+    // Test I - Attempt to use null metadata with getPrevious
+    printNegativeTestHeader(stdout,"psMetadata", "Test I - Attempt to use null metadata with getPrevious",
                             "Null metadata collection not allowed", 0);
     psMetadataGetPrevious(NULL, "myItem2", 0);
-    printFooter(stdout, "psMetadata", "Test H - Attempt to use null metadata with getPrevious", true);
-
-
-    // Test I - Attempt to use null file with itemPrint
-    printNegativeTestHeader(stdout,"psMetadata", "Test I - Attempt to use null file with itemPrint",
+    printFooter(stdout, "psMetadata", "Test I - Attempt to use null metadata with getPrevious", true);
+
+
+    // Test J - Attempt to use null file with itemPrint
+    printNegativeTestHeader(stdout,"psMetadata", "Test J - Attempt to use null file with itemPrint",
                             "Null file descriptor not allowed", 0);
     psMetadataItemPrint(NULL, "Item value: %ld", item2);
-    printFooter(stdout, "psMetadata", "Test I - Attempt to use null file with itemPrint", true);
-
-
-    // Test J - Attempt to use null format with itemPrint
-    printNegativeTestHeader(stdout,"psMetadata", "Test J - Attempt to use null format with itemPrint",
+    printFooter(stdout, "psMetadata", "Test J - Attempt to use null file with itemPrint", true);
+
+
+    // Test K - Attempt to use null format with itemPrint
+    printNegativeTestHeader(stdout,"psMetadata", "Test K - Attempt to use null format with itemPrint",
                             "Null format not allowed", 0);
     psMetadataItemPrint(fd, NULL, item2);
-    printFooter(stdout, "psMetadata", "Test J - Attempt to use null format with itemPrint", true);
-
-
-    // Test K - Attempt to use null item with itemPrint
-    printNegativeTestHeader(stdout,"psMetadata", "Test K - Attempt to use null item with itemPrint",
+    printFooter(stdout, "psMetadata", "Test K - Attempt to use null format with itemPrint", true);
+
+
+    // Test L - Attempt to use null item with itemPrint
+    printNegativeTestHeader(stdout,"psMetadata", "Test L - Attempt to use null item with itemPrint",
                             "Null metadata not allowed", 0);
     psMetadataItemPrint(fd, "Item value: %ld", NULL);
-    printFooter(stdout, "psMetadata", "Test K - Attempt to use null item with itemPrint", true);
-
-
-    // Test L - Free psMetadata
-    printPositiveTestHeader(stdout, "psMetadata", "Test I - Free psMetadata");
+    printFooter(stdout, "psMetadata", "Test L - Attempt to use null item with itemPrint", true);
+
+
+    // Test M - Free psMetadata
+    printPositiveTestHeader(stdout, "psMetadata", "Test M - Free psMetadata");
     psFree(metadata);
     psFree(item1);
@@ -190,5 +201,5 @@
         printf("ERROR: Found %d bad memory blocks\n", nBad);
     }
-    printFooter(stdout, "psMetadata", "Test L - Free psMetadata", true);
+    printFooter(stdout, "psMetadata", "Test M - Free psMetadata", true);
 
 
