diff options
author | Christian Stenger <christian.stenger@qt.io> | 2019-06-03 13:14:05 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2019-06-07 06:40:39 +0000 |
commit | 6b124b580e857f7767f817700a42ad41f364a92f (patch) | |
tree | 4b17c262ed5249c2dda710b12a8f83caf65b4bbf | |
parent | 77902649a8dc432e8bf3cb7865ac076be8678884 (diff) | |
download | qt-creator-6b124b580e857f7767f817700a42ad41f364a92f.tar.gz |
AutoTest: Add support for decorator fixture
Boost tests and suites can have the fixture decorator.
Detect this and reflect it on the test tree view.
Change-Id: I16e0ddefcdc433647aa41810040d9d7cd0c4bf2d
Reviewed-by: David Schulz <david.schulz@qt.io>
-rw-r--r-- | src/plugins/autotest/boost/boostcodeparser.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/autotest/boost/boostcodeparser.cpp b/src/plugins/autotest/boost/boostcodeparser.cpp index 43af677159..95d8ac6be6 100644 --- a/src/plugins/autotest/boost/boostcodeparser.cpp +++ b/src/plugins/autotest/boost/boostcodeparser.cpp @@ -133,6 +133,7 @@ void BoostCodeParser::handleSuiteBegin(bool isFixture) m_currentSuite.prepend(m_suites.last().fullName + '/'); if (isFixture) { // fixture suites have a (fixture) class name as 2nd parameter + m_currentState.setFlag(BoostTestTreeItem::Fixture); if (!skipCommentsUntil(T_COMMA)) return; if (!skipCommentsUntil(T_IDENTIFIER)) @@ -279,8 +280,11 @@ void BoostCodeParser::handleDecorators() } else { // FIXME we have a const(expr) bool? currently not easily achievable } + } else if (symbolName == "decorator::fixture" + || (aliasedOrReal && simplifiedName.startsWith("::fixture"))){ + m_currentState.setFlag(BoostTestTreeItem::Fixture); } - // TODO.. fixture, label, depends_on, label, precondition, timeout,... + // TODO.. depends_on, label, precondition, timeout,... skipCommentsUntil(T_LPAREN); skipCommentsUntil(T_RPAREN); |