Lexer: Switched argument order for ::decomposePair
This commit is contained in:
@@ -1226,8 +1226,8 @@ bool Lexer::decomposePair (
|
||||
const std::string& text,
|
||||
std::string& name,
|
||||
std::string& modifier,
|
||||
std::string& value,
|
||||
std::string& separator)
|
||||
std::string& separator,
|
||||
std::string& value)
|
||||
{
|
||||
// Look for the required elements.
|
||||
std::string::size_type dot = text.find ('.');
|
||||
|
||||
@@ -200,7 +200,7 @@ int main (int argc, char** argv)
|
||||
for (auto& value : {"", "value", "a:b", "a::b", "a=b", "a:=b"})
|
||||
{
|
||||
std::string input = std::string ("name") + (strlen (mod) ? "." : "") + mod + sep + value;
|
||||
t.ok (Lexer::decomposePair (input, outName, outMod, outValue, outSep), "decomposePair '" + input + "' --> true");
|
||||
t.ok (Lexer::decomposePair (input, outName, outMod, outSep, outValue), "decomposePair '" + input + "' --> true");
|
||||
t.is (name, outName, " '" + input + "' --> name '" + name + "'");
|
||||
t.is (mod, outMod, " '" + input + "' --> mod '" + mod + "'");
|
||||
t.is (value, outValue, " '" + input + "' --> value '" + value + "'");
|
||||
|
||||
Reference in New Issue
Block a user