src/hg/lib/tests/customTrackTester.c 1.5

1.5 2010/05/11 01:43:30 kent
Refactoring to split the trackDb.tableName field into separate track and table fields. Similarly track.mapName field goes to the same track and table fields.
Index: src/hg/lib/tests/customTrackTester.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/tests/customTrackTester.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -b -B -U 4 -r1.4 -r1.5
--- src/hg/lib/tests/customTrackTester.c	3 Sep 2008 19:19:28 -0000	1.4
+++ src/hg/lib/tests/customTrackTester.c	11 May 2010 01:43:30 -0000	1.5
@@ -70,16 +70,16 @@
 struct customTrack *expCts = customFactoryParse(db, expectedFile, TRUE, NULL);
 verbose(3, "found %d tracks in output file %s, %d tracks in expected file %s\n",
                 slCount(newCts), outFile, slCount(expCts), expectedFile);
 for (ct = expCts; ct != NULL; ct = ct->next)
-    hashAdd(expHash, ct->tdb->tableName, ct);
+    hashAdd(expHash, ct->tdb->track, ct);
 for (ct = newCts; ct != NULL; ct = ct->next)
     {
-    if ((expCt = hashFindVal(expHash, ct->tdb->tableName)) == NULL)
-        errAbort("ct %s not found in expected", ct->tdb->tableName);
-    verbose(3, "output settings: %s %s\n%s\n", ct->tdb->tableName, 
+    if ((expCt = hashFindVal(expHash, ct->tdb->track)) == NULL)
+        errAbort("ct %s not found in expected", ct->tdb->track);
+    verbose(3, "output settings: %s %s\n%s\n", ct->tdb->track, 
                                 ct->tdb->shortLabel, ct->tdb->settings);
-    verbose(3, "expected settings: %s %s\n%s\n", expCt->tdb->tableName,
+    verbose(3, "expected settings: %s %s\n%s\n", expCt->tdb->track,
                                 expCt->tdb->shortLabel, expCt->tdb->settings);
     struct hash *newSettings = trackDbHashSettings(ct->tdb);
     struct hash *expSettings = trackDbHashSettings(expCt->tdb);
     struct hashCookie hc = hashFirst(expSettings);
@@ -93,12 +93,12 @@
         char *expVal = (char *)hel->val;
         char *newVal = NULL;
         if ((newVal = (char *)hashFindVal(newSettings, setting)) == NULL)
             errAbort("ct %s setting %s not found in new", 
-                        ct->tdb->tableName, setting);
+                        ct->tdb->track, setting);
         if (differentString(newVal, expVal))
             errAbort("ct %s setting %s differs from expected: %s should be %s",
-                        ct->tdb->tableName, setting, newVal, expVal);
+                        ct->tdb->track, setting, newVal, expVal);
         }
     }
 }