forked from qt-creator/qt-creator
AutoTest: Add convenient function to modify line and column.
Change-Id: Ica5fe4a8048b8faf75767bddb36a062ec438fcfe Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
committed by
Christian Stenger
parent
36f6a5580f
commit
8e5af55b55
@@ -138,7 +138,7 @@ bool TestTreeItem::modifyTestCaseContent(const QString &name, unsigned line, uns
|
||||
bool TestTreeItem::modifyTestFunctionContent(const TestCodeLocationAndType &location)
|
||||
{
|
||||
bool hasBeenModified = modifyFilePath(location.m_name);
|
||||
hasBeenModified |= modifyLineAndColumn(location.m_line, location.m_column);
|
||||
hasBeenModified |= modifyLineAndColumn(location);
|
||||
return hasBeenModified;
|
||||
}
|
||||
|
||||
@@ -147,10 +147,15 @@ bool TestTreeItem::modifyDataTagContent(const QString &fileName,
|
||||
{
|
||||
bool hasBeenModified = modifyFilePath(fileName);
|
||||
hasBeenModified |= modifyName(location.m_name);
|
||||
hasBeenModified |= modifyLineAndColumn(location.m_line, location.m_column);
|
||||
hasBeenModified |= modifyLineAndColumn(location);
|
||||
return hasBeenModified;
|
||||
}
|
||||
|
||||
bool TestTreeItem::modifyLineAndColumn(const TestCodeLocationAndType &location)
|
||||
{
|
||||
return modifyLineAndColumn(location.m_line, location.m_column);
|
||||
}
|
||||
|
||||
bool TestTreeItem::modifyLineAndColumn(unsigned line, unsigned column)
|
||||
{
|
||||
bool hasBeenModified = false;
|
||||
@@ -420,7 +425,7 @@ bool GoogleTestTreeItem::modifyTestSetContent(const QString &fileName,
|
||||
const TestCodeLocationAndType &location)
|
||||
{
|
||||
bool hasBeenModified = modifyFilePath(fileName);
|
||||
hasBeenModified |= modifyLineAndColumn(location.m_line, location.m_column);
|
||||
hasBeenModified |= modifyLineAndColumn(location);
|
||||
if (m_state != location.m_state) {
|
||||
m_state = location.m_state;
|
||||
hasBeenModified = true;
|
||||
|
||||
Reference in New Issue
Block a user