Skip to content
Snippets Groups Projects
Commit 57f84dcf authored by Steven Murray's avatar Steven Murray
Browse files

Added unit-test testSplitStringOnlySeparators

parent edf5c3f2
No related branches found
No related tags found
No related merge requests found
......@@ -520,6 +520,21 @@ TEST_F(cta_UtilsTest, testGoodDaySplitString) {
ASSERT_EQ(std::string("col7"), columns[7]);
}
/**
* Tests passing only separators to the splitString() method.
*/
TEST_F(cta_UtilsTest, testSplitStringOnlySeparators) {
using namespace cta;
const std::string line(":::::");
std::vector<std::string> columns;
ASSERT_NO_THROW(utils::splitString(line, ':', columns));
ASSERT_EQ((std::vector<std::string>::size_type)6, columns.size());
for(uint32_t i = 0 ; i < 6; i++) {
ASSERT_TRUE(columns[i].empty());
}
}
/**
* Test the case of an empty string being passed to the splitString() method.
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment