forked from qt-creator/qt-creator
Clang: Rename reparseNeeded to isDirty
...because the flag can be set for needed parses, too. Change-Id: I8b328afefb282cb6bd1cf88711af3d08a56808db Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -213,12 +213,12 @@ TEST_F(Document, DeletedFileShouldNotNeedReparsing)
|
||||
|
||||
document.setDirtyIfDependencyIsMet(document.filePath());
|
||||
|
||||
ASSERT_FALSE(document.isNeedingReparse());
|
||||
ASSERT_FALSE(document.isDirty());
|
||||
}
|
||||
|
||||
TEST_F(Document, NeedsNoReparseAfterCreation)
|
||||
{
|
||||
ASSERT_FALSE(document.isNeedingReparse());
|
||||
ASSERT_FALSE(document.isDirty());
|
||||
}
|
||||
|
||||
TEST_F(DocumentSlowTest, NeedsReparseAfterChangeOfMainFile)
|
||||
@@ -227,7 +227,7 @@ TEST_F(DocumentSlowTest, NeedsReparseAfterChangeOfMainFile)
|
||||
|
||||
document.setDirtyIfDependencyIsMet(documentFilePath);
|
||||
|
||||
ASSERT_TRUE(document.isNeedingReparse());
|
||||
ASSERT_TRUE(document.isDirty());
|
||||
}
|
||||
|
||||
TEST_F(DocumentSlowTest, NoNeedForReparsingForIndependendFile)
|
||||
@@ -236,7 +236,7 @@ TEST_F(DocumentSlowTest, NoNeedForReparsingForIndependendFile)
|
||||
|
||||
document.setDirtyIfDependencyIsMet(Utf8StringLiteral(TESTDATA_DIR"/otherfiles.h"));
|
||||
|
||||
ASSERT_FALSE(document.isNeedingReparse());
|
||||
ASSERT_FALSE(document.isDirty());
|
||||
}
|
||||
|
||||
TEST_F(DocumentSlowTest, NeedsReparsingForDependendFile)
|
||||
@@ -245,7 +245,7 @@ TEST_F(DocumentSlowTest, NeedsReparsingForDependendFile)
|
||||
|
||||
document.setDirtyIfDependencyIsMet(Utf8StringLiteral(TESTDATA_DIR"/translationunits.h"));
|
||||
|
||||
ASSERT_TRUE(document.isNeedingReparse());
|
||||
ASSERT_TRUE(document.isDirty());
|
||||
}
|
||||
|
||||
TEST_F(DocumentSlowTest, NeedsNoReparsingAfterReparsing)
|
||||
@@ -255,7 +255,7 @@ TEST_F(DocumentSlowTest, NeedsNoReparsingAfterReparsing)
|
||||
|
||||
document.reparse();
|
||||
|
||||
ASSERT_FALSE(document.isNeedingReparse());
|
||||
ASSERT_FALSE(document.isDirty());
|
||||
}
|
||||
|
||||
TEST_F(DocumentSlowTest, IsIntactAfterParsing)
|
||||
@@ -276,7 +276,7 @@ TEST_F(DocumentSlowTest, DoesNotNeedReparseAfterParse)
|
||||
{
|
||||
document.parse();
|
||||
|
||||
ASSERT_FALSE(document.isNeedingReparse());
|
||||
ASSERT_FALSE(document.isDirty());
|
||||
}
|
||||
|
||||
TEST_F(DocumentSlowTest, NeedsReparseAfterMainFileChanged)
|
||||
@@ -285,7 +285,7 @@ TEST_F(DocumentSlowTest, NeedsReparseAfterMainFileChanged)
|
||||
|
||||
document.setDirtyIfDependencyIsMet(documentFilePath);
|
||||
|
||||
ASSERT_TRUE(document.isNeedingReparse());
|
||||
ASSERT_TRUE(document.isDirty());
|
||||
}
|
||||
|
||||
TEST_F(DocumentSlowTest, NeedsReparseAfterIncludedFileChanged)
|
||||
@@ -294,7 +294,7 @@ TEST_F(DocumentSlowTest, NeedsReparseAfterIncludedFileChanged)
|
||||
|
||||
document.setDirtyIfDependencyIsMet(Utf8StringLiteral(TESTDATA_DIR"/translationunits.h"));
|
||||
|
||||
ASSERT_TRUE(document.isNeedingReparse());
|
||||
ASSERT_TRUE(document.isDirty());
|
||||
}
|
||||
|
||||
TEST_F(DocumentSlowTest, DoesNotNeedReparseAfterNotIncludedFileChanged)
|
||||
@@ -303,7 +303,7 @@ TEST_F(DocumentSlowTest, DoesNotNeedReparseAfterNotIncludedFileChanged)
|
||||
|
||||
document.setDirtyIfDependencyIsMet(Utf8StringLiteral(TESTDATA_DIR"/otherfiles.h"));
|
||||
|
||||
ASSERT_FALSE(document.isNeedingReparse());
|
||||
ASSERT_FALSE(document.isDirty());
|
||||
}
|
||||
|
||||
TEST_F(DocumentSlowTest, DoesNotNeedReparseAfterReparse)
|
||||
@@ -313,7 +313,7 @@ TEST_F(DocumentSlowTest, DoesNotNeedReparseAfterReparse)
|
||||
|
||||
document.reparse();
|
||||
|
||||
ASSERT_FALSE(document.isNeedingReparse());
|
||||
ASSERT_FALSE(document.isDirty());
|
||||
}
|
||||
|
||||
TEST_F(Document, SetDirtyIfProjectPartIsOutdated)
|
||||
@@ -324,7 +324,7 @@ TEST_F(Document, SetDirtyIfProjectPartIsOutdated)
|
||||
|
||||
document.setDirtyIfProjectPartIsOutdated();
|
||||
|
||||
ASSERT_TRUE(document.isNeedingReparse());
|
||||
ASSERT_TRUE(document.isDirty());
|
||||
}
|
||||
|
||||
TEST_F(DocumentSlowTest, SetNotDirtyIfProjectPartIsNotOutdated)
|
||||
@@ -333,7 +333,7 @@ TEST_F(DocumentSlowTest, SetNotDirtyIfProjectPartIsNotOutdated)
|
||||
|
||||
document.setDirtyIfProjectPartIsOutdated();
|
||||
|
||||
ASSERT_FALSE(document.isNeedingReparse());
|
||||
ASSERT_FALSE(document.isDirty());
|
||||
}
|
||||
|
||||
TEST_F(Document, IncorporateUpdaterResultResetsDirtyness)
|
||||
@@ -341,12 +341,12 @@ TEST_F(Document, IncorporateUpdaterResultResetsDirtyness)
|
||||
document.setDirtyIfDependencyIsMet(document.filePath());
|
||||
TranslationUnitUpdateResult result;
|
||||
result.reparseTimePoint = Clock::now();
|
||||
result.needsToBeReparsedChangeTimePoint = document.isNeededReparseChangeTimePoint();
|
||||
result.needsToBeReparsedChangeTimePoint = document.isDirtyTimeChangePoint();
|
||||
result.translationUnitId = document.translationUnit().id();
|
||||
|
||||
document.incorporateUpdaterResult(result);
|
||||
|
||||
ASSERT_FALSE(document.isNeedingReparse());
|
||||
ASSERT_FALSE(document.isDirty());
|
||||
}
|
||||
|
||||
TEST_F(Document, IncorporateUpdaterResultDoesNotResetDirtynessIfItWasChanged)
|
||||
@@ -359,7 +359,7 @@ TEST_F(Document, IncorporateUpdaterResultDoesNotResetDirtynessIfItWasChanged)
|
||||
|
||||
document.incorporateUpdaterResult(result);
|
||||
|
||||
ASSERT_TRUE(document.isNeedingReparse());
|
||||
ASSERT_TRUE(document.isDirty());
|
||||
}
|
||||
|
||||
TEST_F(Document, IncorporateUpdaterResultUpdatesTranslationUnitsReparseTimePoint)
|
||||
|
||||
Reference in New Issue
Block a user