Implement ft_col_count() along with corresponding unit tests

This pairs with the existing ft_row_count() using the same column
counting method used elsewhere in the code (i.e., iterate over rows
and find the biggest).

Added unit tests for ft_row_count(), ft_col_count(), ft_is_empty(),
and use a myriad of insertion methods to increase coverage.
This commit is contained in:
Sean Morrison
2020-11-29 12:38:31 -05:00
parent b1c32b6751
commit c4be1ca649
5 changed files with 116 additions and 0 deletions

View File

@@ -1172,6 +1172,18 @@ public:
return ft_row_count(table_);
}
/**
* Get number of columns in the table.
*
* @return
* Number of columns in the table.
*/
std::size_t
col_count() const noexcept
{
return ft_col_count(table_);
}
/**
* Get current cell.
*