Index: trunk/ippdb/tests/metadatafromobject.c
===================================================================
--- trunk/ippdb/tests/metadatafromobject.c	(revision 11720)
+++ trunk/ippdb/tests/metadatafromobject.c	(revision 11733)
@@ -590,5 +590,5 @@
         bool            status;
 
-        object = p1PendingExpRowAlloc("a string", "a string", -32);
+        object = p1PendingExpRowAlloc("a string", -32, "a string");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -606,34 +606,46 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
         }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        p2PendingExpRow *object;
+        bool            status;
+
+        object = p2PendingExpRowAlloc("a string", -32, -32, "a string", "a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = p2PendingExpMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+        if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
             psFree(md);
             exit(EXIT_FAILURE);
         }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        p2PendingExpRow *object;
-        bool            status;
-
-        object = p2PendingExpRowAlloc("a string", "a string", -32, -32, "a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = p2PendingExpMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-        if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
+        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -643,12 +655,82 @@
             exit(EXIT_FAILURE);
         }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        p2PendingImfileRow *object;
+        bool            status;
+
+        object = p2PendingImfileRowAlloc("a string", -32, -32, "a string", "a string", "a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = p2PendingImfileMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+        if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
             psFree(md);
             exit(EXIT_FAILURE);
         }
+        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        p2ProcessedExpRow *object;
+        bool            status;
+
+        object = p2ProcessedExpRowAlloc("a string", -32, -32, "a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = p2ProcessedExpMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+        if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
             psFree(md);
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
@@ -661,20 +743,53 @@
     {
         psMetadata      *md;
-        p2PendingImfileRow *object;
-        bool            status;
-
-        object = p2PendingImfileRowAlloc("a string", "a string", "a string", "a string", -32, -32);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = p2PendingImfileMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-        if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
+        p2MaskRow       *object;
+        bool            status;
+
+        object = p2MaskRowAlloc("a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = p2MaskMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        p2ProcessedImfileRow *object;
+        bool            status;
+
+        object = p2ProcessedImfileRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = p2ProcessedImfileMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+        if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -684,119 +799,117 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataLookupF64(&status, md, "bg") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "bg_stdev") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF64(&status, md, "bg_mean_stdev") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "b1_uri"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "b2_uri"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        p3PendingExpRow *object;
+        bool            status;
+
+        object = p3PendingExpRowAlloc("a string", -32, -32, "a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = p3PendingExpMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+        if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "p3_version") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        p3ProcessedExpRow *object;
+        bool            status;
+
+        object = p3ProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", "a string", 32.32, 32.32, -16);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = p3ProcessedExpMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+        if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "p3_version") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
         }
-        if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        p2ProcessedExpRow *object;
-        bool            status;
-
-        object = p2ProcessedExpRowAlloc("a string", -32, -32, "a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = p2ProcessedExpMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-        if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        p2MaskRow       *object;
-        bool            status;
-
-        object = p2MaskRowAlloc("a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = p2MaskMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        p2ProcessedImfileRow *object;
-        bool            status;
-
-        object = p2ProcessedImfileRowAlloc("a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -32, -32, -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = p2ProcessedImfileMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-        if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
         if (!psMetadataLookupF64(&status, md, "bg") == 64.64) {
             psFree(md);
@@ -811,4 +924,16 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataLookupF32(&status, md, "sigma_ra") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupF32(&status, md, "sigma_dec") == 32.32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "nastro") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(psMetadataLookupPtr(&status, md, "b1_uri"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
@@ -819,117 +944,4 @@
             exit(EXIT_FAILURE);
         }
-        if (!psMetadataLookupS32(&status, md, "p1_version") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        p3PendingExpRow *object;
-        bool            status;
-
-        object = p3PendingExpRowAlloc("a string", -32, -32, "a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = p3PendingExpMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-        if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "p3_version") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        p3ProcessedExpRow *object;
-        bool            status;
-
-        object = p3ProcessedExpRowAlloc("a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", "a string", 32.32, 32.32, -32, -32, "a string", -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = p3ProcessedExpMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-        if (strncmp(psMetadataLookupPtr(&status, md, "exp_tag"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "recipe"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "bg") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "bg_stdev") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF64(&status, md, "bg_mean_stdev") == 64.64) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "sigma_ra") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupF32(&status, md, "sigma_dec") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "nastro") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "b1_uri"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "b2_uri"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
         if (!psMetadataLookupF32(&status, md, "zp_mean") == 32.32) {
             psFree(md);
@@ -937,16 +949,4 @@
         }
         if (!psMetadataLookupF32(&status, md, "zp_stdev") == 32.32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "p2_version") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataLookupS32(&status, md, "p3_version") == -32) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
