From 70883aa9da5c10b6604147b7f99c56dadffe8ca4 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 2 May 2015 02:42:41 +0100 Subject: Remove the untested boolean column --- project2/sql/unittests/pqschema.sql | 3 +-- 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("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; -- cgit v1.2.3