List:Commits« Previous MessageNext Message »
From:pharvey Date:November 15 2006 11:22am
Subject:Connector/ODBC 5 commit: r678 - trunk/Driver/Driver/Tests
View as plain text  
Modified:
   trunk/Driver/Driver/Tests/TSTNumericStruct.c
   trunk/Driver/Driver/Tests/TSTTables.c
Log:
FIX: SQLTables test now accounts for extra table from SQL_NUMERIC_STRUCT
FIX: Removed a printf from SQL_NUMERIC_STRUCT test

Modified: trunk/Driver/Driver/Tests/TSTNumericStruct.c
===================================================================
--- trunk/Driver/Driver/Tests/TSTNumericStruct.c	2006-11-15 10:12:03 UTC (rev 677)
+++ trunk/Driver/Driver/Tests/TSTNumericStruct.c	2006-11-15 10:22:31 UTC (rev 678)
@@ -68,6 +68,7 @@
     long        nScaled;
     long        nDivisor;
     float       nValue;
+    BOOL        bReturn = TRUE;
 
     /* INIT 1 */
     nReturn = MYODBCTstAllocHandle( SQL_HANDLE_ENV, NULL, &hEnv );
@@ -96,10 +97,7 @@
     {
         nReturn = MYODBCTstGetData( hStm, 1, SQL_ARD_TYPE, &structNumeric, 19,
&nStrLenOrInd2 ); 
         if ( SQL_NULL_DATA == nStrLenOrInd2 )
-        {
-            printf( "The final value: NULL\n" );
             continue;
-        }
 
         nScaled = TSTNumericStruct_toScaled( structNumeric.val );
 
@@ -117,7 +115,8 @@
             nSign = 1;
 
         nValue *= nSign;
-        printf( "The final value: %f\n", nValue );
+        if ( nValue != 25.212L )
+            bReturn = FALSE;
     }
 
     /* FINI 1 */
@@ -126,7 +125,7 @@
     nReturn = MYODBCTstFreeHandle( SQL_HANDLE_DBC, hDbc );
     nReturn = MYODBCTstFreeHandle( SQL_HANDLE_ENV, hEnv );
 
-    return TRUE;
+    return bReturn;
 }
 
 

Modified: trunk/Driver/Driver/Tests/TSTTables.c
===================================================================
--- trunk/Driver/Driver/Tests/TSTTables.c	2006-11-15 10:12:03 UTC (rev 677)
+++ trunk/Driver/Driver/Tests/TSTTables.c	2006-11-15 10:22:31 UTC (rev 678)
@@ -34,7 +34,7 @@
     SQLTCHAR *      pszTable        = TEXT("%");
     SQLTCHAR *      pszTableType    = TEXT("TABLE");
     SQLSMALLINT     nColsExpected   = 5L;
-    SQLINTEGER      nRowsExpected   = 9L; /* Northwind + 1 */
+    SQLINTEGER      nRowsExpected   = 10L; /* Northwind + 1 */
     SQLSMALLINT     nCol            = 0;
     SQLINTEGER      nRows           = 0;
 

Thread
Connector/ODBC 5 commit: r678 - trunk/Driver/Driver/Testspharvey15 Nov