[fdo-commits] r632 - branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Odbc

svn_fdo at osgeo.org svn_fdo at osgeo.org
Mon Jan 15 15:20:10 EST 2007


Author: gavincramer
Date: 2007-01-15 15:20:10 -0500 (Mon, 15 Jan 2007)
New Revision: 632

Modified:
   branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.cpp
   branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.h
Log:


Modified: branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.cpp
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.cpp	2007-01-15 20:18:12 UTC (rev 631)
+++ branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.cpp	2007-01-15 20:20:10 UTC (rev 632)
@@ -229,6 +229,37 @@
     }
 }
 
+void OdbcAccessFdoSelectTest::TestDefect889655()
+{
+    if( mConnection != NULL )
+    {
+        try
+        {
+            // This works much like any other Select, but includes a column (NAME) that internally
+            // maps to an ODBC SQL_WCHAR column type.
+            FdoPtr<FdoISelect> selectCmd = (FdoISelect*)mConnection->CreateCommand(FdoCommandType_Select);
+            selectCmd->SetFeatureClassName(L"hospital");
+            FdoPtr<FdoIFeatureReader> reader = selectCmd->Execute();
+            FdoPtr<FdoClassDefinition> classDef = reader->GetClassDefinition();
+            int numFeatures = 0;
+            while (reader->ReadNext())
+            {
+                numFeatures++;
+                UnitTestUtil::ProcessFeature(reader);
+            }
+
+            printf("   %i feature(s) read\n", numFeatures);
+
+            // close the reader
+            reader->Close();
+        }
+        catch (FdoException* e)
+        {
+            TestCommonFail (e);
+        }
+    }
+}
+
 void OdbcAccessFdoSelectTest::ComparisonFilterTable1Test()
 {
     if( mConnection != NULL )

Modified: branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.h
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.h	2007-01-15 20:18:12 UTC (rev 631)
+++ branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.h	2007-01-15 20:20:10 UTC (rev 632)
@@ -135,6 +135,7 @@
 class OdbcAccessFdoSelectTest : public OdbcFdoSelectTest
 {
     CPPUNIT_TEST_SUB_SUITE (OdbcAccessFdoSelectTest, OdbcFdoSelectTest);
+    CPPUNIT_TEST (TestDefect889655);
     CPPUNIT_TEST (Table1Test);
     //CPPUNIT_TEST (Table2Test);
     CPPUNIT_TEST (ComparisonFilterTable1Test);
@@ -147,6 +148,7 @@
 
 public:
     virtual void Table1Test();
+    virtual void TestDefect889655();
     void Table2Test();
     void ComparisonFilterTable1Test();  // Contains a spatial query
     void RestrictedPropertiesTable1Test();



More information about the fdo-commits mailing list