Skip to content

Commit

Permalink
Updating test case to include empty rowset constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
cstiborg committed Oct 11, 2023
1 parent c024d33 commit b0eed04
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/common-tests.h
Original file line number Diff line number Diff line change
Expand Up @@ -2889,6 +2889,11 @@ TEST_CASE_METHOD(common_tests, "Rowset creation and copying", "[core][rowset]")
auto_table_creator tableCreator(tc_.table_creator_1(sql));
{
// Open empty rowset
rowset<row> rs1;
CHECK(rs1.begin() == rs1.end());
}
{
// Load empty rowset
rowset<row> rs1 = (sql.prepare << "select * from soci_test");
CHECK(rs1.begin() == rs1.end());
}
Expand All @@ -2909,7 +2914,7 @@ TEST_CASE_METHOD(common_tests, "Rowset creation and copying", "[core][rowset]")
if (!tc_.has_multiple_select_bug())
{
// Assignment
rowset<row> rs1 = (sql.prepare << "select * from soci_test");
rowset<row> rs1;
rowset<row> rs2 = (sql.prepare << "select * from soci_test");
rowset<row> rs3 = (sql.prepare << "select * from soci_test");
rs1 = rs2;
Expand Down

0 comments on commit b0eed04

Please sign in to comment.