summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-05-02 02:42:41 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2015-05-02 02:42:41 +0100
commit70883aa9da5c10b6604147b7f99c56dadffe8ca4 (patch)
tree697da1591e7cc9356d55c6a584da7154d91007a2
parentAdds support for SQLite, SQLite mocking and some basic tests (diff)
downloadproject2-70883aa9da5c10b6604147b7f99c56dadffe8ca4.tar.bz2
project2-70883aa9da5c10b6604147b7f99c56dadffe8ca4.tar.xz
project2-70883aa9da5c10b6604147b7f99c56dadffe8ca4.zip
Remove the untested boolean column
-rw-r--r--project2/sql/unittests/pqschema.sql3
-rw-r--r--project2/sql/unittests/testpq.cpp7
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;