summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-11-08 02:39:36 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2015-11-08 02:39:36 +0000
commitc76d1d4c339d7379b31ac516930d8bf3e5a4f61f (patch)
tree4fe1c624521d6089694b9c6b0254f1090ccf41e0
parentAdd connection error test (diff)
downloadlibdbpp-c76d1d4c339d7379b31ac516930d8bf3e5a4f61f.tar.bz2
libdbpp-c76d1d4c339d7379b31ac516930d8bf3e5a4f61f.tar.xz
libdbpp-c76d1d4c339d7379b31ac516930d8bf3e5a4f61f.zip
Add tests over col count and ordinal
-rw-r--r--libdbpp/unittests/testUtils.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libdbpp/unittests/testUtils.cpp b/libdbpp/unittests/testUtils.cpp
index ba09580..e43faae 100644
--- a/libdbpp/unittests/testUtils.cpp
+++ b/libdbpp/unittests/testUtils.cpp
@@ -51,6 +51,8 @@ BOOST_AUTO_TEST_CASE( columns )
BOOST_REQUIRE_EQUAL("c", (*sel)[2].name);
BOOST_REQUIRE_EQUAL(0, (*sel)["a"].colNo);
BOOST_REQUIRE_EQUAL(4, (*sel)["e"].colNo);
+ BOOST_REQUIRE_EQUAL(5, sel->columnCount());
+ BOOST_REQUIRE_EQUAL(1, sel->getOrdinal("b"));
BOOST_REQUIRE_THROW((*sel)["f"], DB::ColumnDoesNotExist);
BOOST_REQUIRE_THROW((*sel)["aa"], DB::ColumnDoesNotExist);
BOOST_REQUIRE_THROW((*sel)[""], DB::ColumnDoesNotExist);