separate tests for Date/Time

This commit is contained in:
aleks-f
2012-12-15 10:22:34 -06:00
parent 8832c2e70e
commit e837015176
6 changed files with 118 additions and 28 deletions

View File

@@ -423,6 +423,10 @@ void MySQLTest::testDateTime()
recreatePersonDateTimeTable();
_pExecutor->dateTime();
recreatePersonDateTable();
_pExecutor->date();
recreatePersonTimeTable();
_pExecutor->time();
}
@@ -715,6 +719,24 @@ void MySQLTest::recreatePersonDateTimeTable()
}
void MySQLTest::recreatePersonDateTable()
{
dropTable("Person");
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Birthday DATE)", now; }
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail ("recreatePersonDateTable()"); }
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail ("recreatePersonDateTable()"); }
}
void MySQLTest::recreatePersonTimeTable()
{
dropTable("Person");
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Birthday TIME)", now; }
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail ("recreatePersonTimeTable()"); }
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail ("recreatePersonTimeTable()"); }
}
void MySQLTest::recreateIntsTable()
{
dropTable("Strings");