diff options
| -rw-r--r-- | project2/sql/unittests/pqschema.sql | 3 | ||||
| -rw-r--r-- | project2/sql/unittests/testpq.cpp | 7 | 
2 files changed, 4 insertions, 6 deletions
| diff --git a/project2/sql/unittests/pqschema.sql b/project2/sql/unittests/pqschema.sql index b51a279..a097419 100644 --- a/project2/sql/unittests/pqschema.sql +++ b/project2/sql/unittests/pqschema.sql @@ -3,6 +3,5 @@ CREATE TABLE test(  		fl numeric(5,2),  		string text,  		dt timestamp without time zone, -		tf boolean,  		ts interval); -INSERT INTO test VALUES(4, 123.45, 'some text', '2015-04-27 23:06:03', true, '1 day 14:13:12'); +INSERT INTO test VALUES(4, 123.45, 'some text', '2015-04-27 23:06:03', '1 day 14:13:12'); diff --git a/project2/sql/unittests/testpq.cpp b/project2/sql/unittests/testpq.cpp index 9218612..03ae252 100644 --- a/project2/sql/unittests/testpq.cpp +++ b/project2/sql/unittests/testpq.cpp @@ -46,13 +46,12 @@ BOOST_AUTO_TEST_CASE( bindAndSend )  	RdbmsDataSource * ds = CommonObjects::dataSource<RdbmsDataSource>("pqmock");  	auto rw = ds->getWritable(); -	auto mod = rw->newModifyCommand("INSERT INTO test VALUES(?, ?, ?, ?, ?, ?)"); +	auto mod = rw->newModifyCommand("INSERT INTO test VALUES(?, ?, ?, ?, ?)");  	mod->bindParamI(0, testInt);  	mod->bindParamF(1, testDouble);  	mod->bindParamS(2, testString);  	mod->bindParamT(3, testDateTime); -	mod->bindParamT(5, testInterval); -	mod->bindNull(4); +	mod->bindParamT(4, testInterval);  	mod->execute();  	delete mod;  	ds->commit(); @@ -82,7 +81,7 @@ BOOST_AUTO_TEST_CASE( bindAndSelect )  		assertColumnValueHelper(*select, 1, testDouble);  		assertColumnValueHelper(*select, 2, testString);  		assertColumnValueHelper(*select, 3, testDateTime); -		assertColumnValueHelper(*select, 5, testInterval); +		assertColumnValueHelper(*select, 4, testInterval);  		rows += 1;  	}  	delete select; | 
