#2031 Curve Calculator : Sort variable names by the order they first appear

This commit is contained in:
Magne Sjaastad
2017-10-23 13:31:57 +02:00
parent dd01863240
commit f61c83a659
3 changed files with 21 additions and 4 deletions

View File

@@ -41,8 +41,8 @@ TEST(RicExpressionParserTest, DetectVariables)
std::vector<QString> variables = ExpressionParser::detectReferencedVariables(expr);
EXPECT_STREQ(variables[0].toStdString().data(), "a");
EXPECT_STREQ(variables[1].toStdString().data(), "c");
EXPECT_STREQ(variables[0].toStdString().data(), "c");
EXPECT_STREQ(variables[1].toStdString().data(), "a");
EXPECT_STREQ(variables[2].toStdString().data(), "x");
EXPECT_STREQ(variables[3].toStdString().data(), "y");
}