mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-24 17:30:44 +02:00
separate tests for Date/Time
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user