summaryrefslogtreecommitdiff
path: root/src/plugins/autotest/boost/boostcodeparser.cpp
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2019-10-14 09:54:28 +0200
committerChristian Stenger <christian.stenger@qt.io>2019-10-17 05:53:55 +0000
commit418c7d108ac2324d1a10c7f769618eecae01f399 (patch)
treec8693b659f6142d3a34f874db732bf23c252e96d /src/plugins/autotest/boost/boostcodeparser.cpp
parentf7808af946d13d97731ada3b1e3e6e73143a233c (diff)
downloadqt-creator-418c7d108ac2324d1a10c7f769618eecae01f399.tar.gz
AutoTest: Fix handling of parameterized boost tests
Setting the parameterized flag after the test case may have been added to the found tests is useless. Do it as early as possible to take it into account when gathering information for location and type. Beside this the filter for parameterized boost tests had been wrong which in turn led to not executing them at all. Change-Id: I1a4345b2a751c79cc4fc6df8e201e9606c961aaf Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/autotest/boost/boostcodeparser.cpp')
-rw-r--r--src/plugins/autotest/boost/boostcodeparser.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/autotest/boost/boostcodeparser.cpp b/src/plugins/autotest/boost/boostcodeparser.cpp
index 79c612285b..526bbf1388 100644
--- a/src/plugins/autotest/boost/boostcodeparser.cpp
+++ b/src/plugins/autotest/boost/boostcodeparser.cpp
@@ -105,6 +105,7 @@ void BoostCodeParser::handleIdentifier()
} else if (identifier == "BOOST_TEST_CASE") {
handleTestCase(TestCaseType::Functions);
} else if (identifier == "BOOST_PARAM_TEST_CASE") {
+ m_currentState.setFlag(BoostTestTreeItem::Parameterized);
handleTestCase(TestCaseType::Parameter);
} else if (identifier == "BOOST_AUTO_TEST_CASE") {
handleTestCase(TestCaseType::Auto);
@@ -203,8 +204,6 @@ void BoostCodeParser::handleTestCase(TestCaseType testCaseType)
m_currentState = BoostTestTreeItem::Enabled;
return;
}
- if (testCaseType == TestCaseType::Parameter)
- m_currentState |= BoostTestTreeItem::Parameterized;
} else if (m_currentState.testFlag(BoostTestTreeItem::Fixture)) {
// ignore first parameter (fixture) and first comma
if (!skipCommentsUntil(T_IDENTIFIER))