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:
12
src/fort.hpp
12
src/fort.hpp
@@ -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.
|
||||
*
|
||||
|
Reference in New Issue
Block a user