Index: trunk/psLib/test/dataIO/tst_psDB.c
===================================================================
--- trunk/psLib/test/dataIO/tst_psDB.c	(revision 4257)
+++ trunk/psLib/test/dataIO/tst_psDB.c	(revision 4263)
@@ -9,6 +9,6 @@
  *  @author Aaron Culliney, MHPCC
  *
- *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-15 01:02:08 $
+ *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-15 01:48:25 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -70,6 +70,6 @@
 
 testDescription tests[] = {
-                              {TPDBInit,            -1,  "dbInit",            0, false},
-                              {TPDBChange,          -2,  "dbChange",          0, false},
+                              {TPDBInit,           841,  "dbInit",            0, false},
+                              {TPDBChange,         842,  "dbChange",          0, false},
                               {TPDBCreateTable,     -3,  "dbCreateTable",     0, false},
                               {TPDBDropTable,       -4,  "dbDropTable",       0, false},
@@ -317,22 +317,38 @@
 }
 
-// Testpoint #XXX, psDBChange shall change databases.
+// Testpoint #842, psDBChange shall change databases.
 psS32 TPDBChange( void )
 {
-    psS32 failed = 0;
-    psDB *dbh = NULL;
-
-    dbh = _init_psDB();
-    if (dbh == NULL) {
-        return 1;
-    }
-
-    psLogMsg( __func__, PS_LOG_INFO, "psDBChange shall change to a new test database.\n" );
-
-    failed = ! psDBChange(dbh, dbname);
-
-    psDBCleanup(dbh);
-
-    return failed;
+    psDB *dbh = NULL;
+
+    // Initialize database connection
+    dbh = _init_psDB();
+    if (dbh == NULL) {
+        psError(PS_ERR_UNKNOWN,true,"Did not expect NULL for valid arguments");
+        return 1;
+    }
+
+    // Attempt to change database with valid arguments
+    if(!psDBChange(dbh, dbname)) {
+        psError(PS_ERR_UNKNOWN,true,"Did not expect return false for valid arguments");
+        return 2;
+    }
+
+    // Attemp to change database to invalid database name
+    if(psDBChange(dbh,"abc")) {
+        psError(PS_ERR_UNKNOWN,true,"Did not expect return true for unknown database name");
+        return 3;
+    }
+
+    // Cleanup database connection
+    psDBCleanup(dbh);
+
+    // Attempt to change database with NULL database object
+    if(psDBChange(NULL,dbname)) {
+        psError(PS_ERR_UNKNOWN,true,"Did not expect return true for NULL database object");
+        return 4;
+    }
+
+    return 0;
 }
 
