forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -133,6 +133,7 @@ void BoostCodeParser::handleSuiteBegin(bool isFixture)
|
|||||||
m_currentSuite.prepend(m_suites.last().fullName + '/');
|
m_currentSuite.prepend(m_suites.last().fullName + '/');
|
||||||
|
|
||||||
if (isFixture) { // fixture suites have a (fixture) class name as 2nd parameter
|
if (isFixture) { // fixture suites have a (fixture) class name as 2nd parameter
|
||||||
|
m_currentState.setFlag(BoostTestTreeItem::Fixture);
|
||||||
if (!skipCommentsUntil(T_COMMA))
|
if (!skipCommentsUntil(T_COMMA))
|
||||||
return;
|
return;
|
||||||
if (!skipCommentsUntil(T_IDENTIFIER))
|
if (!skipCommentsUntil(T_IDENTIFIER))
|
||||||
@@ -279,8 +280,11 @@ void BoostCodeParser::handleDecorators()
|
|||||||
} else {
|
} else {
|
||||||
// FIXME we have a const(expr) bool? currently not easily achievable
|
// 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_LPAREN);
|
||||||
skipCommentsUntil(T_RPAREN);
|
skipCommentsUntil(T_RPAREN);
|
||||||
|
|||||||
Reference in New Issue
Block a user