[fdo-commits] r708 - trunk/Providers/GenericRdbms/Src/UnitTest/Odbc
svn_fdo at osgeo.org
svn_fdo at osgeo.org
Mon Jan 29 15:13:27 EST 2007
Author: gavincramer
Date: 2007-01-29 15:13:27 -0500 (Mon, 29 Jan 2007)
New Revision: 708
Modified:
trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.cpp
trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.h
Log:
Port ODBC WCHAR fix from 3.2.x to trunk
Modified: trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.cpp
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.cpp 2007-01-29 20:04:04 UTC (rev 707)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.cpp 2007-01-29 20:13:27 UTC (rev 708)
@@ -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: trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.h
===================================================================
--- trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.h 2007-01-29 20:04:04 UTC (rev 707)
+++ trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoSelectTest.h 2007-01-29 20:13:27 UTC (rev 708)
@@ -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