DateTime binding & I/O parameters fix

This commit is contained in:
Aleksandar Fabijanic
2007-06-06 01:26:58 +00:00
parent 0bde32efac
commit 7944f7868b
36 changed files with 1004 additions and 729 deletions

View File

@@ -758,6 +758,21 @@ void ODBCMySQLTest::testBLOBStmt()
}
void ODBCMySQLTest::testDateTime()
{
if (!_pSession) fail ("Test not available.");
for (int i = 0; i < 8;)
{
recreatePersonDateTimeTable();
_pSession->setFeature("autoBind", bindValues[i]);
_pSession->setFeature("autoExtract", bindValues[i+1]);
_pExecutor->dateTime();
i += 2;
}
}
void ODBCMySQLTest::testFloat()
{
if (!_pSession) fail ("Test not available.");
@@ -888,6 +903,15 @@ void ODBCMySQLTest::recreatePersonBLOBTable()
}
void ODBCMySQLTest::recreatePersonDateTimeTable()
{
dropObject("TABLE", "Person");
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Born DATETIME)", now; }
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail ("recreatePersonDateTimeTable()"); }
}
void ODBCMySQLTest::recreateIntsTable()
{
dropObject("TABLE", "Strings");
@@ -1070,6 +1094,7 @@ CppUnit::Test* ODBCMySQLTest::suite()
CppUnit_addTest(pSuite, ODBCMySQLTest, testEmptyDB);
CppUnit_addTest(pSuite, ODBCMySQLTest, testBLOB);
CppUnit_addTest(pSuite, ODBCMySQLTest, testBLOBStmt);
CppUnit_addTest(pSuite, ODBCMySQLTest, testDateTime);
CppUnit_addTest(pSuite, ODBCMySQLTest, testFloat);
CppUnit_addTest(pSuite, ODBCMySQLTest, testDouble);
CppUnit_addTest(pSuite, ODBCMySQLTest, testTuple);