diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-11-08 02:39:36 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-11-08 02:39:36 +0000 |
commit | c76d1d4c339d7379b31ac516930d8bf3e5a4f61f (patch) | |
tree | 4fe1c624521d6089694b9c6b0254f1090ccf41e0 | |
parent | Add connection error test (diff) | |
download | libdbpp-c76d1d4c339d7379b31ac516930d8bf3e5a4f61f.tar.bz2 libdbpp-c76d1d4c339d7379b31ac516930d8bf3e5a4f61f.tar.xz libdbpp-c76d1d4c339d7379b31ac516930d8bf3e5a4f61f.zip |
Add tests over col count and ordinal
-rw-r--r-- | libdbpp/unittests/testUtils.cpp | 2 |
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); |