test/util/TokenizedLineReaderTester.cpp
/**This operation checks the TokenizedLineReader when the delimiter is changed
 * to a the equal sign.*/
This operation checks the TokenizedLineReader when the delimiter is changed
to a the equal sign.
This operation checks the TokenizedLineReader when the delimiter is changed to a the equal sign .
BOOST_AUTO_TEST_CASE(checkDelimiterParsing)
{
	TokenizedLineReader<std::string> stringReader;
	vector<std::string> iLine;
	auto stringTestStream = std::make_shared<stringstream>(ios::in | ios::out);
	*stringTestStream << equalDelimiterString;
	stringReader.setDelimiter("=");
	stringReader.setInputStream(stringTestStream);
	iLine = stringReader.loadLine();
	BOOST_REQUIRE(!iLine.empty());
	BOOST_REQUIRE_EQUAL(2U, iLine.size());
	BOOST_REQUIRE_EQUAL("arg", iLine.at(0));
	BOOST_REQUIRE_EQUAL("many different strings", iLine.at(1));
	iLine = stringReader.loadLine();
	BOOST_REQUIRE_EQUAL(1U, iLine.size());
	BOOST_REQUIRE_EQUAL("no equal sign here", iLine.at(0));
	return;
}
BOOST_AUTO_TEST_CASE ( checkDelimiterParsing ) { TokenizedLineReader < std :: string > stringReader ; vector < std :: string > iLine ; auto stringTestStream = std :: make_shared < stringstream > ( ios :: in | ios :: out ) ; * stringTestStream << equalDelimiterString ; stringReader . setDelimiter ( " " ) ; stringReader . setInputStream ( stringTestStream ) ; iLine = stringReader . loadLine ( ) ; BOOST_REQUIRE ( ! iLine . empty ( ) ) ; BOOST_REQUIRE_EQUAL ( 2U , iLine . size ( ) ) ; BOOST_REQUIRE_EQUAL ( " " , iLine . at ( 0 ) ) ; BOOST_REQUIRE_EQUAL ( " " , iLine . at ( 1 ) ) ; iLine = stringReader . loadLine ( ) ; BOOST_REQUIRE_EQUAL ( 1U , iLine . size ( ) ) ; BOOST_REQUIRE_EQUAL ( " " , iLine . at ( 0 ) ) ; return ; }
This operation checks the TokenizedLineReader when the delimiter is changed
 to a the equal sign.
This operation checks the TokenizedLineReader when the delimiter is changed to a the equal sign .
// Local Declarations // Create the input stream // Configure the delimiter // Load the int reader // Get the first line and check it // Get the second line and check it