forked from qt-creator/qt-creator
UnitTests: Fix names and disable slow tests by default
Slow and very slow tests have now their own test category. We add SlowTest for tests which are slower than ~5ms and VerySlowTest if they are slower than ~100ms. They are disabled them by "-*SlowTest.*". If you have a faster machine than most developers simply try lower values. The aim is that most developers can execute the tests in under ~2s. In the long run we should use dependency breaking and data sharing to reduce the count of the slow tests. Change-Id: I8578071258d7f89b2052709f3dd526ced811483f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -40,7 +40,7 @@ using ContextProcessor = ClangCodeModel::Internal::ActivationSequenceContextPro
|
||||
using TextEditor::AssistInterface;
|
||||
using ClangCodeModel::Internal::ClangCompletionAssistInterface;
|
||||
|
||||
TEST(ActivationSequeneContextProcessor, TextCursorPosition)
|
||||
TEST(ActivationSequenceContextProcessorSlowTest, TextCursorPosition)
|
||||
{
|
||||
ClangCompletionAssistInterface interface("foobar", 4);
|
||||
ContextProcessor processor{&interface};
|
||||
@@ -48,7 +48,7 @@ TEST(ActivationSequeneContextProcessor, TextCursorPosition)
|
||||
ASSERT_THAT(processor.textCursor_forTestOnly().position(), 0);
|
||||
}
|
||||
|
||||
TEST(ActivationSequeneContextProcessor, StringLiteral)
|
||||
TEST(ActivationSequenceContextProcessor, StringLiteral)
|
||||
{
|
||||
ClangCompletionAssistInterface interface("auto foo = \"bar\"", 12);
|
||||
ContextProcessor processor{&interface};
|
||||
@@ -56,7 +56,7 @@ TEST(ActivationSequeneContextProcessor, StringLiteral)
|
||||
ASSERT_THAT(processor.completionKind(), CPlusPlus::T_EOF_SYMBOL);
|
||||
}
|
||||
|
||||
TEST(ActivationSequeneContextProcessor, EndOfStringLiteral)
|
||||
TEST(ActivationSequenceContextProcessor, EndOfStringLiteral)
|
||||
{
|
||||
ClangCompletionAssistInterface interface("auto foo = \"bar\"", 16);
|
||||
ContextProcessor processor{&interface};
|
||||
@@ -64,7 +64,7 @@ TEST(ActivationSequeneContextProcessor, EndOfStringLiteral)
|
||||
ASSERT_THAT(processor.completionKind(), CPlusPlus::T_EOF_SYMBOL);
|
||||
}
|
||||
|
||||
TEST(ActivationSequeneContextProcessor, FunctionCallComma)
|
||||
TEST(ActivationSequenceContextProcessor, FunctionCallComma)
|
||||
{
|
||||
ClangCompletionAssistInterface interface("f(x, ", 4);
|
||||
ContextProcessor processor{&interface};
|
||||
@@ -72,7 +72,7 @@ TEST(ActivationSequeneContextProcessor, FunctionCallComma)
|
||||
ASSERT_THAT(processor.completionKind(), CPlusPlus::T_COMMA);
|
||||
}
|
||||
|
||||
TEST(ActivationSequeneContextProcessor, NonFunctionCallComma)
|
||||
TEST(ActivationSequenceContextProcessor, NonFunctionCallComma)
|
||||
{
|
||||
ClangCompletionAssistInterface interface("int x, ", 6);
|
||||
ContextProcessor processor{&interface};
|
||||
@@ -80,7 +80,7 @@ TEST(ActivationSequeneContextProcessor, NonFunctionCallComma)
|
||||
ASSERT_THAT(processor.completionKind(), CPlusPlus::T_EOF_SYMBOL);
|
||||
}
|
||||
|
||||
TEST(ActivationSequeneContextProcessor, DoxygenComment)
|
||||
TEST(ActivationSequenceContextProcessor, DoxygenComment)
|
||||
{
|
||||
ClangCompletionAssistInterface interface("//! @", 5);
|
||||
ContextProcessor processor{&interface};
|
||||
@@ -88,7 +88,7 @@ TEST(ActivationSequeneContextProcessor, DoxygenComment)
|
||||
ASSERT_THAT(processor.completionKind(), CPlusPlus::T_DOXY_COMMENT);
|
||||
}
|
||||
|
||||
TEST(ActivationSequeneContextProcessor, NonDoxygenComment)
|
||||
TEST(ActivationSequenceContextProcessor, NonDoxygenComment)
|
||||
{
|
||||
ClangCompletionAssistInterface interface("// @", 4);
|
||||
ContextProcessor processor{&interface};
|
||||
@@ -96,7 +96,7 @@ TEST(ActivationSequeneContextProcessor, NonDoxygenComment)
|
||||
ASSERT_THAT(processor.completionKind(), CPlusPlus::T_EOF_SYMBOL);
|
||||
}
|
||||
|
||||
TEST(ActivationSequeneContextProcessor, Comment)
|
||||
TEST(ActivationSequenceContextProcessor, Comment)
|
||||
{
|
||||
ClangCompletionAssistInterface interface("//", 2);
|
||||
ContextProcessor processor{&interface};
|
||||
@@ -104,7 +104,7 @@ TEST(ActivationSequeneContextProcessor, Comment)
|
||||
ASSERT_THAT(processor.completionKind(), CPlusPlus::T_EOF_SYMBOL);
|
||||
}
|
||||
|
||||
TEST(ActivationSequeneContextProcessor, InsideALiteral)
|
||||
TEST(ActivationSequenceContextProcessor, InsideALiteral)
|
||||
{
|
||||
ClangCompletionAssistInterface interface("\"foo\"", 2);
|
||||
ContextProcessor processor{&interface};
|
||||
@@ -112,7 +112,7 @@ TEST(ActivationSequeneContextProcessor, InsideALiteral)
|
||||
ASSERT_THAT(processor.completionKind(), CPlusPlus::T_EOF_SYMBOL);
|
||||
}
|
||||
|
||||
TEST(ActivationSequeneContextProcessor, ShlashInsideAString)
|
||||
TEST(ActivationSequenceContextProcessor, ShlashInsideAString)
|
||||
{
|
||||
ClangCompletionAssistInterface interface("\"foo/bar\"", 5);
|
||||
ContextProcessor processor{&interface};
|
||||
@@ -120,7 +120,7 @@ TEST(ActivationSequeneContextProcessor, ShlashInsideAString)
|
||||
ASSERT_THAT(processor.completionKind(), CPlusPlus::T_EOF_SYMBOL);
|
||||
}
|
||||
|
||||
TEST(ActivationSequeneContextProcessor, ShlashOutsideAString)
|
||||
TEST(ActivationSequenceContextProcessor, ShlashOutsideAString)
|
||||
{
|
||||
ClangCompletionAssistInterface interface("foo/bar", 4);
|
||||
ContextProcessor processor{&interface};
|
||||
@@ -128,7 +128,7 @@ TEST(ActivationSequeneContextProcessor, ShlashOutsideAString)
|
||||
ASSERT_THAT(processor.completionKind(), CPlusPlus::T_EOF_SYMBOL);
|
||||
}
|
||||
|
||||
TEST(ActivationSequeneContextProcessor, FunctionLeftParen)
|
||||
TEST(ActivationSequenceContextProcessor, FunctionLeftParen)
|
||||
{
|
||||
ClangCompletionAssistInterface interface("foo(", 4);
|
||||
ContextProcessor processor{&interface};
|
||||
@@ -136,7 +136,7 @@ TEST(ActivationSequeneContextProcessor, FunctionLeftParen)
|
||||
ASSERT_THAT(processor.completionKind(), CPlusPlus::T_LPAREN);
|
||||
}
|
||||
|
||||
TEST(ActivationSequeneContextProcessor, TemplateFunctionLeftParen)
|
||||
TEST(ActivationSequenceContextProcessor, TemplateFunctionLeftParen)
|
||||
{
|
||||
ClangCompletionAssistInterface interface("foo<X>(", 7);
|
||||
ContextProcessor processor{&interface};
|
||||
@@ -144,7 +144,7 @@ TEST(ActivationSequeneContextProcessor, TemplateFunctionLeftParen)
|
||||
ASSERT_THAT(processor.completionKind(), CPlusPlus::T_LPAREN);
|
||||
}
|
||||
|
||||
TEST(ActivationSequeneContextProcessor, ExpressionLeftParen)
|
||||
TEST(ActivationSequenceContextProcessor, ExpressionLeftParen)
|
||||
{
|
||||
ClangCompletionAssistInterface interface("x * (", 5);
|
||||
ContextProcessor processor{&interface};
|
||||
@@ -152,7 +152,7 @@ TEST(ActivationSequeneContextProcessor, ExpressionLeftParen)
|
||||
ASSERT_THAT(processor.completionKind(), CPlusPlus::T_EOF_SYMBOL);
|
||||
}
|
||||
|
||||
TEST(ActivationSequeneContextProcessor, AngleInclude)
|
||||
TEST(ActivationSequenceContextProcessor, AngleInclude)
|
||||
{
|
||||
ClangCompletionAssistInterface interface("#include <foo/bar>", 10);
|
||||
ContextProcessor processor{&interface};
|
||||
@@ -160,7 +160,7 @@ TEST(ActivationSequeneContextProcessor, AngleInclude)
|
||||
ASSERT_THAT(processor.completionKind(), CPlusPlus::T_ANGLE_STRING_LITERAL);
|
||||
}
|
||||
|
||||
TEST(ActivationSequeneContextProcessor, SlashInclude)
|
||||
TEST(ActivationSequenceContextProcessor, SlashInclude)
|
||||
{
|
||||
ClangCompletionAssistInterface interface("#include <foo/bar>", 14);
|
||||
ContextProcessor processor{&interface};
|
||||
@@ -168,7 +168,7 @@ TEST(ActivationSequeneContextProcessor, SlashInclude)
|
||||
ASSERT_THAT(processor.completionKind(), CPlusPlus::T_SLASH);
|
||||
}
|
||||
|
||||
TEST(ActivationSequeneContextProcessor, QuoteInclude)
|
||||
TEST(ActivationSequenceContextProcessor, QuoteInclude)
|
||||
{
|
||||
ClangCompletionAssistInterface interface("#include \"foo/bar\"", 10);
|
||||
ContextProcessor processor{&interface};
|
||||
@@ -176,7 +176,7 @@ TEST(ActivationSequeneContextProcessor, QuoteInclude)
|
||||
ASSERT_THAT(processor.completionKind(), CPlusPlus::T_STRING_LITERAL);
|
||||
}
|
||||
|
||||
TEST(ActivationSequeneContextProcessor, SlashInExlude)
|
||||
TEST(ActivationSequenceContextProcessor, SlashInExlude)
|
||||
{
|
||||
ClangCompletionAssistInterface interface("#exclude <foo/bar>", 14);
|
||||
ContextProcessor processor{&interface};
|
||||
@@ -184,7 +184,7 @@ TEST(ActivationSequeneContextProcessor, SlashInExlude)
|
||||
ASSERT_THAT(processor.completionKind(), CPlusPlus::T_EOF_SYMBOL);
|
||||
}
|
||||
|
||||
TEST(ActivationSequeneContextProcessor, QuoteExclude)
|
||||
TEST(ActivationSequenceContextProcessor, QuoteExclude)
|
||||
{
|
||||
ClangCompletionAssistInterface interface("#exclude \"foo/bar\"", 10);
|
||||
ContextProcessor processor{&interface};
|
||||
@@ -192,7 +192,7 @@ TEST(ActivationSequeneContextProcessor, QuoteExclude)
|
||||
ASSERT_THAT(processor.completionKind(), CPlusPlus::T_EOF_SYMBOL);
|
||||
}
|
||||
|
||||
TEST(ActivationSequeneContextProcessor, SkipeWhiteSpacesBeforeCursor)
|
||||
TEST(ActivationSequenceContextProcessor, SkipeWhiteSpacesBeforeCursor)
|
||||
{
|
||||
ClangCompletionAssistInterface interface("x-> ", 7);
|
||||
ContextProcessor processor{&interface};
|
||||
@@ -200,7 +200,7 @@ TEST(ActivationSequeneContextProcessor, SkipeWhiteSpacesBeforeCursor)
|
||||
ASSERT_THAT(processor.completionKind(), CPlusPlus::T_ARROW);
|
||||
}
|
||||
|
||||
TEST(ActivationSequeneContextProcessor, SkipIdentifier)
|
||||
TEST(ActivationSequenceContextProcessor, SkipIdentifier)
|
||||
{
|
||||
ClangCompletionAssistInterface interface("x->foo_", 7);
|
||||
ContextProcessor processor{&interface};
|
||||
|
@@ -54,7 +54,7 @@ static unsigned completionOptions()
|
||||
: 0;
|
||||
}
|
||||
|
||||
TEST(ClangCodeCompleteResults, GetData)
|
||||
TEST(ClangCodeCompleteResultsSlowTest, GetData)
|
||||
{
|
||||
ProjectPart projectPart(Utf8StringLiteral("projectPartId"));
|
||||
ClangBackEnd::ProjectParts projects;
|
||||
@@ -86,7 +86,7 @@ TEST(ClangCodeCompleteResults, GetInvalidData)
|
||||
ASSERT_THAT(codeCompleteResults.data(), cxCodeCompleteResults);
|
||||
}
|
||||
|
||||
TEST(ClangCodeCompleteResults, MoveClangCodeCompleteResults)
|
||||
TEST(ClangCodeCompleteResultsSlowTest, MoveClangCodeCompleteResults)
|
||||
{
|
||||
ProjectPart projectPart(Utf8StringLiteral("projectPartId"));
|
||||
ClangBackEnd::ProjectParts projects;
|
||||
|
@@ -40,6 +40,8 @@ protected:
|
||||
ClangBackEnd::CreateInitialDocumentPreambleJob job;
|
||||
};
|
||||
|
||||
using CreateInitialDocumentPreambleJobSlowTest = CreateInitialDocumentPreambleJob;
|
||||
|
||||
TEST_F(CreateInitialDocumentPreambleJob, PrepareAsyncRun)
|
||||
{
|
||||
job.setContext(jobContext);
|
||||
@@ -47,7 +49,7 @@ TEST_F(CreateInitialDocumentPreambleJob, PrepareAsyncRun)
|
||||
ASSERT_TRUE(job.prepareAsyncRun());
|
||||
}
|
||||
|
||||
TEST_F(CreateInitialDocumentPreambleJob, RunAsync)
|
||||
TEST_F(CreateInitialDocumentPreambleJobSlowTest, RunAsync)
|
||||
{
|
||||
document.parse();
|
||||
document.setDirtyIfDependencyIsMet(document.filePath());
|
||||
|
@@ -90,6 +90,8 @@ protected:
|
||||
::Document document;
|
||||
};
|
||||
|
||||
using DocumentSlowTest = Document;
|
||||
|
||||
TEST_F(Document, DefaultDocumentIsInvalid)
|
||||
{
|
||||
::Document document;
|
||||
@@ -135,7 +137,7 @@ TEST_F(Document, ThrowExceptionForGettingCxTranslationUnitForInvalidUnit)
|
||||
ASSERT_THROW(document.translationUnit().cxIndex(), ClangBackEnd::DocumentIsNullException);
|
||||
}
|
||||
|
||||
TEST_F(Document, CxTranslationUnitGetterIsNonNullForParsedUnit)
|
||||
TEST_F(DocumentSlowTest, CxTranslationUnitGetterIsNonNullForParsedUnit)
|
||||
{
|
||||
document.parse();
|
||||
|
||||
@@ -164,7 +166,7 @@ TEST_F(Document, LastCommandLineArgumentIsFilePath)
|
||||
ASSERT_THAT(arguments.at(arguments.count() - 1), Eq(nativeFilePath));
|
||||
}
|
||||
|
||||
TEST_F(Document, TimeStampForProjectPartChangeIsUpdatedAsNewCxTranslationUnitIsGenerated)
|
||||
TEST_F(DocumentSlowTest, TimeStampForProjectPartChangeIsUpdatedAsNewCxTranslationUnitIsGenerated)
|
||||
{
|
||||
auto lastChangeTimePoint = document.lastProjectPartChangeTimePoint();
|
||||
std::this_thread::sleep_for(Duration(1));
|
||||
@@ -174,7 +176,7 @@ TEST_F(Document, TimeStampForProjectPartChangeIsUpdatedAsNewCxTranslationUnitIsG
|
||||
ASSERT_THAT(document.lastProjectPartChangeTimePoint(), Gt(lastChangeTimePoint));
|
||||
}
|
||||
|
||||
TEST_F(Document, TimeStampForProjectPartChangeIsUpdatedAsProjectPartIsCleared)
|
||||
TEST_F(DocumentSlowTest, TimeStampForProjectPartChangeIsUpdatedAsProjectPartIsCleared)
|
||||
{
|
||||
ProjectPart projectPart = document.projectPart();
|
||||
document.parse();
|
||||
@@ -194,7 +196,7 @@ TEST_F(Document, DocumentRevisionInFileContainerGetter)
|
||||
ASSERT_THAT(document.fileContainer().documentRevision(), 74);
|
||||
}
|
||||
|
||||
TEST_F(Document, DependedFilePaths)
|
||||
TEST_F(DocumentSlowTest, DependedFilePaths)
|
||||
{
|
||||
document.parse();
|
||||
|
||||
@@ -217,7 +219,7 @@ TEST_F(Document, NeedsNoReparseAfterCreation)
|
||||
ASSERT_FALSE(document.isNeedingReparse());
|
||||
}
|
||||
|
||||
TEST_F(Document, NeedsReparseAfterChangeOfMainFile)
|
||||
TEST_F(DocumentSlowTest, NeedsReparseAfterChangeOfMainFile)
|
||||
{
|
||||
document.parse();
|
||||
|
||||
@@ -226,7 +228,7 @@ TEST_F(Document, NeedsReparseAfterChangeOfMainFile)
|
||||
ASSERT_TRUE(document.isNeedingReparse());
|
||||
}
|
||||
|
||||
TEST_F(Document, NoNeedForReparsingForIndependendFile)
|
||||
TEST_F(DocumentSlowTest, NoNeedForReparsingForIndependendFile)
|
||||
{
|
||||
document.parse();
|
||||
|
||||
@@ -235,7 +237,7 @@ TEST_F(Document, NoNeedForReparsingForIndependendFile)
|
||||
ASSERT_FALSE(document.isNeedingReparse());
|
||||
}
|
||||
|
||||
TEST_F(Document, NeedsReparsingForDependendFile)
|
||||
TEST_F(DocumentSlowTest, NeedsReparsingForDependendFile)
|
||||
{
|
||||
document.parse();
|
||||
|
||||
@@ -244,7 +246,7 @@ TEST_F(Document, NeedsReparsingForDependendFile)
|
||||
ASSERT_TRUE(document.isNeedingReparse());
|
||||
}
|
||||
|
||||
TEST_F(Document, NeedsNoReparsingAfterReparsing)
|
||||
TEST_F(DocumentSlowTest, NeedsNoReparsingAfterReparsing)
|
||||
{
|
||||
document.parse();
|
||||
document.setDirtyIfDependencyIsMet(Utf8StringLiteral(TESTDATA_DIR"/translationunits.h"));
|
||||
@@ -254,7 +256,7 @@ TEST_F(Document, NeedsNoReparsingAfterReparsing)
|
||||
ASSERT_FALSE(document.isNeedingReparse());
|
||||
}
|
||||
|
||||
TEST_F(Document, IsIntactAfterParsing)
|
||||
TEST_F(DocumentSlowTest, IsIntactAfterParsing)
|
||||
{
|
||||
document.parse();
|
||||
|
||||
@@ -268,14 +270,14 @@ TEST_F(Document, IsNotIntactForDeletedFile)
|
||||
ASSERT_FALSE(document.isIntact());
|
||||
}
|
||||
|
||||
TEST_F(Document, DoesNotNeedReparseAfterParse)
|
||||
TEST_F(DocumentSlowTest, DoesNotNeedReparseAfterParse)
|
||||
{
|
||||
document.parse();
|
||||
|
||||
ASSERT_FALSE(document.isNeedingReparse());
|
||||
}
|
||||
|
||||
TEST_F(Document, NeedsReparseAfterMainFileChanged)
|
||||
TEST_F(DocumentSlowTest, NeedsReparseAfterMainFileChanged)
|
||||
{
|
||||
document.parse();
|
||||
|
||||
@@ -284,7 +286,7 @@ TEST_F(Document, NeedsReparseAfterMainFileChanged)
|
||||
ASSERT_TRUE(document.isNeedingReparse());
|
||||
}
|
||||
|
||||
TEST_F(Document, NeedsReparseAfterIncludedFileChanged)
|
||||
TEST_F(DocumentSlowTest, NeedsReparseAfterIncludedFileChanged)
|
||||
{
|
||||
document.parse();
|
||||
|
||||
@@ -293,7 +295,7 @@ TEST_F(Document, NeedsReparseAfterIncludedFileChanged)
|
||||
ASSERT_TRUE(document.isNeedingReparse());
|
||||
}
|
||||
|
||||
TEST_F(Document, DoesNotNeedReparseAfterNotIncludedFileChanged)
|
||||
TEST_F(DocumentSlowTest, DoesNotNeedReparseAfterNotIncludedFileChanged)
|
||||
{
|
||||
document.parse();
|
||||
|
||||
@@ -302,7 +304,7 @@ TEST_F(Document, DoesNotNeedReparseAfterNotIncludedFileChanged)
|
||||
ASSERT_FALSE(document.isNeedingReparse());
|
||||
}
|
||||
|
||||
TEST_F(Document, DoesNotNeedReparseAfterReparse)
|
||||
TEST_F(DocumentSlowTest, DoesNotNeedReparseAfterReparse)
|
||||
{
|
||||
document.parse();
|
||||
document.setDirtyIfDependencyIsMet(documentFilePath);
|
||||
@@ -323,7 +325,7 @@ TEST_F(Document, SetDirtyIfProjectPartIsOutdated)
|
||||
ASSERT_TRUE(document.isNeedingReparse());
|
||||
}
|
||||
|
||||
TEST_F(Document, SetNotDirtyIfProjectPartIsNotOutdated)
|
||||
TEST_F(DocumentSlowTest, SetNotDirtyIfProjectPartIsNotOutdated)
|
||||
{
|
||||
document.parse();
|
||||
|
||||
|
@@ -72,6 +72,8 @@ protected:
|
||||
dummyIpcClient};
|
||||
};
|
||||
|
||||
using DocumentProcessorSlowTest = DocumentProcessor;
|
||||
|
||||
TEST_F(DocumentProcessor, ProcessEmpty)
|
||||
{
|
||||
const JobRequests jobsStarted = documentProcessor.process();
|
||||
@@ -79,7 +81,7 @@ TEST_F(DocumentProcessor, ProcessEmpty)
|
||||
ASSERT_THAT(jobsStarted.size(), 0);
|
||||
}
|
||||
|
||||
TEST_F(DocumentProcessor, ProcessSingleJob)
|
||||
TEST_F(DocumentProcessorSlowTest, ProcessSingleJob)
|
||||
{
|
||||
const JobRequest jobRequest = createJobRequest(JobRequest::Type::UpdateDocumentAnnotations);
|
||||
documentProcessor.addJob(jobRequest);
|
||||
|
@@ -78,6 +78,8 @@ protected:
|
||||
dummyIpcClient};
|
||||
};
|
||||
|
||||
using DocumentProcessorsSlowTest = DocumentProcessors;
|
||||
|
||||
TEST_F(DocumentProcessors, HasNoItemsInitially)
|
||||
{
|
||||
ASSERT_TRUE(documentProcessors.processors().empty());
|
||||
@@ -144,7 +146,7 @@ TEST_F(DocumentProcessors, ProcessEmpty)
|
||||
ASSERT_TRUE(jobsStarted.isEmpty());
|
||||
}
|
||||
|
||||
TEST_F(DocumentProcessors, ProcessSingle)
|
||||
TEST_F(DocumentProcessorsSlowTest, ProcessSingle)
|
||||
{
|
||||
DocumentProcessor documentProcessor = documentProcessors.create(document);
|
||||
const JobRequest jobRequest = createJobRequest(JobRequest::Type::UpdateDocumentAnnotations);
|
||||
|
@@ -83,6 +83,8 @@ protected:
|
||||
const ClangBackEnd::FileContainer headerContainer{headerPath, projectPartId};
|
||||
};
|
||||
|
||||
using DocumentsSlowTest = Documents;
|
||||
|
||||
TEST_F(Documents, ThrowForGettingWithWrongFilePath)
|
||||
{
|
||||
ASSERT_THROW(documents.document(nonExistingFilePath, projectPartId),
|
||||
@@ -199,7 +201,7 @@ TEST_F(Documents, UpdateMultiple)
|
||||
IsDocument(filePath, otherProjectPartId, 75u));
|
||||
}
|
||||
|
||||
TEST_F(Documents, UpdateUnsavedFileAndCheckForReparse)
|
||||
TEST_F(DocumentsSlowTest, UpdateUnsavedFileAndCheckForReparse)
|
||||
{
|
||||
ClangBackEnd::FileContainer fileContainer(filePath, projectPartId, Utf8StringVector(), 74u);
|
||||
ClangBackEnd::FileContainer headerContainer(headerPath, projectPartId, Utf8StringVector(), 74u);
|
||||
@@ -213,7 +215,7 @@ TEST_F(Documents, UpdateUnsavedFileAndCheckForReparse)
|
||||
ASSERT_TRUE(documents.document(filePath, projectPartId).isNeedingReparse());
|
||||
}
|
||||
|
||||
TEST_F(Documents, RemoveFileAndCheckForReparse)
|
||||
TEST_F(DocumentsSlowTest, RemoveFileAndCheckForReparse)
|
||||
{
|
||||
ClangBackEnd::FileContainer fileContainer(filePath, projectPartId, Utf8StringVector(), 74u);
|
||||
ClangBackEnd::FileContainer headerContainer(headerPath, projectPartId, Utf8StringVector(), 74u);
|
||||
|
@@ -95,7 +95,7 @@ MATCHER_P5(HasDirtyDocument,
|
||||
}
|
||||
}
|
||||
|
||||
class ClangClangCodeModelServer : public ::testing::Test
|
||||
class ClangCodeModelServer : public ::testing::Test
|
||||
{
|
||||
protected:
|
||||
void SetUp() override;
|
||||
@@ -171,7 +171,9 @@ protected:
|
||||
const Utf8String aProjectPartId = Utf8StringLiteral("aproject.pro");
|
||||
};
|
||||
|
||||
TEST_F(ClangClangCodeModelServer, GetCodeCompletion)
|
||||
using ClangCodeModelServerSlowTest = ClangCodeModelServer;
|
||||
|
||||
TEST_F(ClangCodeModelServerSlowTest, GetCodeCompletion)
|
||||
{
|
||||
registerProjectAndFile(filePathA);
|
||||
|
||||
@@ -179,7 +181,7 @@ TEST_F(ClangClangCodeModelServer, GetCodeCompletion)
|
||||
completeCodeInFileA();
|
||||
}
|
||||
|
||||
TEST_F(ClangClangCodeModelServer, RequestDocumentAnnotations)
|
||||
TEST_F(ClangCodeModelServerSlowTest, RequestDocumentAnnotations)
|
||||
{
|
||||
registerProjectAndFileAndWaitForFinished(filePathB);
|
||||
|
||||
@@ -187,7 +189,7 @@ TEST_F(ClangClangCodeModelServer, RequestDocumentAnnotations)
|
||||
requestDocumentAnnotations(filePathB);
|
||||
}
|
||||
|
||||
TEST_F(ClangClangCodeModelServer, NoInitialDocumentAnnotationsForClosedDocument)
|
||||
TEST_F(ClangCodeModelServerSlowTest, NoInitialDocumentAnnotationsForClosedDocument)
|
||||
{
|
||||
const int expectedDocumentAnnotationsChangedCount = 0;
|
||||
registerProjectAndFile(filePathA, expectedDocumentAnnotationsChangedCount);
|
||||
@@ -195,7 +197,7 @@ TEST_F(ClangClangCodeModelServer, NoInitialDocumentAnnotationsForClosedDocument)
|
||||
unregisterFile(filePathA);
|
||||
}
|
||||
|
||||
TEST_F(ClangClangCodeModelServer, NoDocumentAnnotationsForClosedDocument)
|
||||
TEST_F(ClangCodeModelServerSlowTest, NoDocumentAnnotationsForClosedDocument)
|
||||
{
|
||||
const int expectedDocumentAnnotationsChangedCount = 1; // Only for registration.
|
||||
registerProjectAndFileAndWaitForFinished(filePathA, expectedDocumentAnnotationsChangedCount);
|
||||
@@ -204,7 +206,7 @@ TEST_F(ClangClangCodeModelServer, NoDocumentAnnotationsForClosedDocument)
|
||||
unregisterFile(filePathA);
|
||||
}
|
||||
|
||||
TEST_F(ClangClangCodeModelServer, NoInitialDocumentAnnotationsForOutdatedDocumentRevision)
|
||||
TEST_F(ClangCodeModelServerSlowTest, NoInitialDocumentAnnotationsForOutdatedDocumentRevision)
|
||||
{
|
||||
const int expectedDocumentAnnotationsChangedCount = 1; // Only for registration.
|
||||
registerProjectAndFile(filePathA, expectedDocumentAnnotationsChangedCount);
|
||||
@@ -212,7 +214,7 @@ TEST_F(ClangClangCodeModelServer, NoInitialDocumentAnnotationsForOutdatedDocumen
|
||||
updateUnsavedContent(filePathA, Utf8String(), 1);
|
||||
}
|
||||
|
||||
TEST_F(ClangClangCodeModelServer, NoCompletionsForClosedDocument)
|
||||
TEST_F(ClangCodeModelServerSlowTest, NoCompletionsForClosedDocument)
|
||||
{
|
||||
const int expectedDocumentAnnotationsChangedCount = 1; // Only for registration.
|
||||
registerProjectAndFileAndWaitForFinished(filePathA, expectedDocumentAnnotationsChangedCount);
|
||||
@@ -221,7 +223,7 @@ TEST_F(ClangClangCodeModelServer, NoCompletionsForClosedDocument)
|
||||
unregisterFile(filePathA);
|
||||
}
|
||||
|
||||
TEST_F(ClangClangCodeModelServer, CodeCompletionDependingOnProject)
|
||||
TEST_F(ClangCodeModelServerSlowTest, CodeCompletionDependingOnProject)
|
||||
{
|
||||
const int expectedDocumentAnnotationsChangedCount = 2; // For registration and due to project change.
|
||||
registerProjectAndFileAndWaitForFinished(filePathB, expectedDocumentAnnotationsChangedCount);
|
||||
@@ -231,7 +233,7 @@ TEST_F(ClangClangCodeModelServer, CodeCompletionDependingOnProject)
|
||||
completeCodeInFileB();
|
||||
}
|
||||
|
||||
TEST_F(ClangClangCodeModelServer, GetCodeCompletionForUnsavedFile)
|
||||
TEST_F(ClangCodeModelServerSlowTest, GetCodeCompletionForUnsavedFile)
|
||||
{
|
||||
registerProjectPart();
|
||||
expectDocumentAnnotationsChanged(1);
|
||||
@@ -241,7 +243,7 @@ TEST_F(ClangClangCodeModelServer, GetCodeCompletionForUnsavedFile)
|
||||
completeCodeInFileA();
|
||||
}
|
||||
|
||||
TEST_F(ClangClangCodeModelServer, GetNoCodeCompletionAfterRemovingUnsavedFile)
|
||||
TEST_F(ClangCodeModelServerSlowTest, GetNoCodeCompletionAfterRemovingUnsavedFile)
|
||||
{
|
||||
const int expectedDocumentAnnotationsChangedCount = 2; // For registration and update/removal.
|
||||
registerProjectAndFileAndWaitForFinished(filePathA, expectedDocumentAnnotationsChangedCount);
|
||||
@@ -251,7 +253,7 @@ TEST_F(ClangClangCodeModelServer, GetNoCodeCompletionAfterRemovingUnsavedFile)
|
||||
completeCodeInFileA();
|
||||
}
|
||||
|
||||
TEST_F(ClangClangCodeModelServer, GetNewCodeCompletionAfterUpdatingUnsavedFile)
|
||||
TEST_F(ClangCodeModelServerSlowTest, GetNewCodeCompletionAfterUpdatingUnsavedFile)
|
||||
{
|
||||
const int expectedDocumentAnnotationsChangedCount = 2; // For registration and update/removal.
|
||||
registerProjectAndFileAndWaitForFinished(filePathA, expectedDocumentAnnotationsChangedCount);
|
||||
@@ -261,7 +263,7 @@ TEST_F(ClangClangCodeModelServer, GetNewCodeCompletionAfterUpdatingUnsavedFile)
|
||||
completeCodeInFileA();
|
||||
}
|
||||
|
||||
TEST_F(ClangClangCodeModelServer, TicketNumberIsForwarded)
|
||||
TEST_F(ClangCodeModelServerSlowTest, TicketNumberIsForwarded)
|
||||
{
|
||||
registerProjectAndFile(filePathA, 1);
|
||||
const CompleteCodeMessage message(filePathA, 20, 1, projectPartId);
|
||||
@@ -270,14 +272,14 @@ TEST_F(ClangClangCodeModelServer, TicketNumberIsForwarded)
|
||||
clangServer.completeCode(message);
|
||||
}
|
||||
|
||||
TEST_F(ClangClangCodeModelServer, TranslationUnitAfterCreationIsNotDirty)
|
||||
TEST_F(ClangCodeModelServerSlowTest, TranslationUnitAfterCreationIsNotDirty)
|
||||
{
|
||||
registerProjectAndFile(filePathA, 1);
|
||||
|
||||
ASSERT_THAT(clangServer, HasDirtyDocument(filePathA, projectPartId, 0U, false, false));
|
||||
}
|
||||
|
||||
TEST_F(ClangClangCodeModelServer, SetCurrentAndVisibleEditor)
|
||||
TEST_F(ClangCodeModelServerSlowTest, SetCurrentAndVisibleEditor)
|
||||
{
|
||||
registerProjectAndFilesAndWaitForFinished();
|
||||
auto functionDocument = documents.document(filePathA, projectPartId);
|
||||
@@ -290,7 +292,7 @@ TEST_F(ClangClangCodeModelServer, SetCurrentAndVisibleEditor)
|
||||
ASSERT_TRUE(functionDocument.isVisibleInEditor());
|
||||
}
|
||||
|
||||
TEST_F(ClangClangCodeModelServer, StartCompletionJobFirstOnEditThatTriggersCompletion)
|
||||
TEST_F(ClangCodeModelServerSlowTest, StartCompletionJobFirstOnEditThatTriggersCompletion)
|
||||
{
|
||||
registerProjectAndFile(filePathA, 2);
|
||||
ASSERT_TRUE(waitUntilAllJobsFinished());
|
||||
@@ -304,7 +306,7 @@ TEST_F(ClangClangCodeModelServer, StartCompletionJobFirstOnEditThatTriggersCompl
|
||||
ASSERT_THAT(jobs.first().jobRequest.type, Eq(JobRequest::Type::CompleteCode));
|
||||
}
|
||||
|
||||
TEST_F(ClangClangCodeModelServer, SupportiveTranslationUnitNotInitializedAfterRegister)
|
||||
TEST_F(ClangCodeModelServerSlowTest, SupportiveTranslationUnitNotInitializedAfterRegister)
|
||||
{
|
||||
registerProjectAndFile(filePathA, 1);
|
||||
|
||||
@@ -312,7 +314,7 @@ TEST_F(ClangClangCodeModelServer, SupportiveTranslationUnitNotInitializedAfterRe
|
||||
ASSERT_FALSE(isSupportiveTranslationUnitInitialized(filePathA));
|
||||
}
|
||||
|
||||
TEST_F(ClangClangCodeModelServer, SupportiveTranslationUnitIsSetupAfterFirstEdit)
|
||||
TEST_F(ClangCodeModelServerSlowTest, SupportiveTranslationUnitIsSetupAfterFirstEdit)
|
||||
{
|
||||
registerProjectAndFile(filePathA, 2);
|
||||
ASSERT_TRUE(waitUntilAllJobsFinished());
|
||||
@@ -323,7 +325,7 @@ TEST_F(ClangClangCodeModelServer, SupportiveTranslationUnitIsSetupAfterFirstEdit
|
||||
ASSERT_TRUE(isSupportiveTranslationUnitInitialized(filePathA));
|
||||
}
|
||||
|
||||
TEST_F(ClangClangCodeModelServer, DoNotRunDuplicateJobs)
|
||||
TEST_F(ClangCodeModelServerSlowTest, DoNotRunDuplicateJobs)
|
||||
{
|
||||
registerProjectAndFile(filePathA, 3);
|
||||
ASSERT_TRUE(waitUntilAllJobsFinished());
|
||||
@@ -337,7 +339,7 @@ TEST_F(ClangClangCodeModelServer, DoNotRunDuplicateJobs)
|
||||
updateVisibilty(filePathA, filePathA); // triggers adding + runnings job on next processevents()
|
||||
}
|
||||
|
||||
TEST_F(ClangClangCodeModelServer, OpenDocumentAndEdit)
|
||||
TEST_F(ClangCodeModelServerSlowTest, OpenDocumentAndEdit)
|
||||
{
|
||||
registerProjectAndFile(filePathA, 4);
|
||||
ASSERT_TRUE(waitUntilAllJobsFinished());
|
||||
@@ -348,7 +350,7 @@ TEST_F(ClangClangCodeModelServer, OpenDocumentAndEdit)
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(ClangClangCodeModelServer, IsNotCurrentCurrentAndVisibleEditorAnymore)
|
||||
TEST_F(ClangCodeModelServerSlowTest, IsNotCurrentCurrentAndVisibleEditorAnymore)
|
||||
{
|
||||
registerProjectAndFilesAndWaitForFinished();
|
||||
auto functionDocument = documents.document(filePathA, projectPartId);
|
||||
@@ -363,7 +365,7 @@ TEST_F(ClangClangCodeModelServer, IsNotCurrentCurrentAndVisibleEditorAnymore)
|
||||
ASSERT_TRUE(variableDocument.isVisibleInEditor());
|
||||
}
|
||||
|
||||
TEST_F(ClangClangCodeModelServer, TranslationUnitAfterUpdateNeedsReparse)
|
||||
TEST_F(ClangCodeModelServerSlowTest, TranslationUnitAfterUpdateNeedsReparse)
|
||||
{
|
||||
registerProjectAndFileAndWaitForFinished(filePathA, 2);
|
||||
|
||||
@@ -371,19 +373,19 @@ TEST_F(ClangClangCodeModelServer, TranslationUnitAfterUpdateNeedsReparse)
|
||||
ASSERT_THAT(clangServer, HasDirtyDocument(filePathA, projectPartId, 1U, true, true));
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::SetUp()
|
||||
void ClangCodeModelServer::SetUp()
|
||||
{
|
||||
clangServer.setClient(&mockClangCodeModelClient);
|
||||
clangServer.setUpdateDocumentAnnotationsTimeOutInMsForTestsOnly(0);
|
||||
clangServer.setUpdateVisibleButNotCurrentDocumentsTimeOutInMsForTestsOnly(0);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::TearDown()
|
||||
void ClangCodeModelServer::TearDown()
|
||||
{
|
||||
ASSERT_TRUE(waitUntilAllJobsFinished());
|
||||
}
|
||||
|
||||
bool ClangClangCodeModelServer::waitUntilAllJobsFinished(int timeOutInMs)
|
||||
bool ClangCodeModelServer::waitUntilAllJobsFinished(int timeOutInMs)
|
||||
{
|
||||
const auto noJobsRunningAnymore = [this]() {
|
||||
return clangServer.runningJobsForTestsOnly().isEmpty()
|
||||
@@ -394,7 +396,7 @@ bool ClangClangCodeModelServer::waitUntilAllJobsFinished(int timeOutInMs)
|
||||
return ProcessEventUtilities::processEventsUntilTrue(noJobsRunningAnymore, timeOutInMs);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::registerProjectAndFilesAndWaitForFinished(
|
||||
void ClangCodeModelServer::registerProjectAndFilesAndWaitForFinished(
|
||||
int expectedDocumentAnnotationsChangedMessages)
|
||||
{
|
||||
registerProjectPart();
|
||||
@@ -403,7 +405,7 @@ void ClangClangCodeModelServer::registerProjectAndFilesAndWaitForFinished(
|
||||
ASSERT_TRUE(waitUntilAllJobsFinished());
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::registerFile(const Utf8String &filePath,
|
||||
void ClangCodeModelServer::registerFile(const Utf8String &filePath,
|
||||
int expectedDocumentAnnotationsChangedMessages)
|
||||
{
|
||||
const FileContainer fileContainer(filePath, projectPartId);
|
||||
@@ -414,7 +416,7 @@ void ClangClangCodeModelServer::registerFile(const Utf8String &filePath,
|
||||
clangServer.registerTranslationUnitsForEditor(message);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::registerFiles(int expectedDocumentAnnotationsChangedMessages)
|
||||
void ClangCodeModelServer::registerFiles(int expectedDocumentAnnotationsChangedMessages)
|
||||
{
|
||||
const FileContainer fileContainerA(filePathA, projectPartId);
|
||||
const FileContainer fileContainerB(filePathB, projectPartId);
|
||||
@@ -428,12 +430,12 @@ void ClangClangCodeModelServer::registerFiles(int expectedDocumentAnnotationsCha
|
||||
clangServer.registerTranslationUnitsForEditor(message);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::expectDocumentAnnotationsChanged(int count)
|
||||
void ClangCodeModelServer::expectDocumentAnnotationsChanged(int count)
|
||||
{
|
||||
EXPECT_CALL(mockClangCodeModelClient, documentAnnotationsChanged(_)).Times(count);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::registerFile(const Utf8String &filePath, const Utf8String &projectFilePath)
|
||||
void ClangCodeModelServer::registerFile(const Utf8String &filePath, const Utf8String &projectFilePath)
|
||||
{
|
||||
const FileContainer fileContainer(filePath, projectFilePath);
|
||||
const RegisterTranslationUnitForEditorMessage message({fileContainer}, filePath, {filePath});
|
||||
@@ -441,7 +443,7 @@ void ClangClangCodeModelServer::registerFile(const Utf8String &filePath, const U
|
||||
clangServer.registerTranslationUnitsForEditor(message);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::registerFileWithUnsavedContent(const Utf8String &filePath,
|
||||
void ClangCodeModelServer::registerFileWithUnsavedContent(const Utf8String &filePath,
|
||||
const Utf8String &unsavedContent)
|
||||
{
|
||||
const FileContainer fileContainer(filePath, projectPartId, unsavedContent, true);
|
||||
@@ -450,7 +452,7 @@ void ClangClangCodeModelServer::registerFileWithUnsavedContent(const Utf8String
|
||||
clangServer.registerTranslationUnitsForEditor(message);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::completeCode(const Utf8String &filePath,
|
||||
void ClangCodeModelServer::completeCode(const Utf8String &filePath,
|
||||
uint line,
|
||||
uint column,
|
||||
const Utf8String &projectPartId)
|
||||
@@ -464,17 +466,17 @@ void ClangClangCodeModelServer::completeCode(const Utf8String &filePath,
|
||||
clangServer.completeCode(message);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::completeCodeInFileA()
|
||||
void ClangCodeModelServer::completeCodeInFileA()
|
||||
{
|
||||
completeCode(filePathA, 20, 1);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::completeCodeInFileB()
|
||||
void ClangCodeModelServer::completeCodeInFileB()
|
||||
{
|
||||
completeCode(filePathB, 35, 1);
|
||||
}
|
||||
|
||||
bool ClangClangCodeModelServer::isSupportiveTranslationUnitInitialized(const Utf8String &filePath)
|
||||
bool ClangCodeModelServer::isSupportiveTranslationUnitInitialized(const Utf8String &filePath)
|
||||
{
|
||||
Document document = clangServer.documentsForTestOnly().document(filePath, projectPartId);
|
||||
DocumentProcessor documentProcessor = clangServer.documentProcessors().processor(document);
|
||||
@@ -484,7 +486,7 @@ bool ClangClangCodeModelServer::isSupportiveTranslationUnitInitialized(const Utf
|
||||
&& documentProcessor.isSupportiveTranslationUnitInitialized();
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::expectCompletion(const CodeCompletion &completion)
|
||||
void ClangCodeModelServer::expectCompletion(const CodeCompletion &completion)
|
||||
{
|
||||
EXPECT_CALL(mockClangCodeModelClient,
|
||||
codeCompleted(Property(&CodeCompletedMessage::codeCompletions,
|
||||
@@ -492,7 +494,7 @@ void ClangClangCodeModelServer::expectCompletion(const CodeCompletion &completio
|
||||
.Times(1);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::expectCompletionFromFileBEnabledByMacro()
|
||||
void ClangCodeModelServer::expectCompletionFromFileBEnabledByMacro()
|
||||
{
|
||||
const CodeCompletion completion(Utf8StringLiteral("ArgumentDefinitionVariable"),
|
||||
34,
|
||||
@@ -501,7 +503,7 @@ void ClangClangCodeModelServer::expectCompletionFromFileBEnabledByMacro()
|
||||
expectCompletion(completion);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::expectCompletionFromFileAUnsavedMethodVersion1()
|
||||
void ClangCodeModelServer::expectCompletionFromFileAUnsavedMethodVersion1()
|
||||
{
|
||||
const CodeCompletion completion(Utf8StringLiteral("Method2"),
|
||||
34,
|
||||
@@ -510,7 +512,7 @@ void ClangClangCodeModelServer::expectCompletionFromFileAUnsavedMethodVersion1()
|
||||
expectCompletion(completion);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::expectCompletionFromFileAUnsavedMethodVersion2()
|
||||
void ClangCodeModelServer::expectCompletionFromFileAUnsavedMethodVersion2()
|
||||
{
|
||||
const CodeCompletion completion(Utf8StringLiteral("Method3"),
|
||||
34,
|
||||
@@ -519,7 +521,7 @@ void ClangClangCodeModelServer::expectCompletionFromFileAUnsavedMethodVersion2()
|
||||
expectCompletion(completion);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::expectCompletionWithTicketNumber(quint64 ticketNumber)
|
||||
void ClangCodeModelServer::expectCompletionWithTicketNumber(quint64 ticketNumber)
|
||||
{
|
||||
EXPECT_CALL(mockClangCodeModelClient,
|
||||
codeCompleted(Property(&CodeCompletedMessage::ticketNumber,
|
||||
@@ -527,7 +529,7 @@ void ClangClangCodeModelServer::expectCompletionWithTicketNumber(quint64 ticketN
|
||||
.Times(1);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::expectNoCompletionWithUnsavedMethod()
|
||||
void ClangCodeModelServer::expectNoCompletionWithUnsavedMethod()
|
||||
{
|
||||
const CodeCompletion completion(Utf8StringLiteral("Method2"),
|
||||
34,
|
||||
@@ -539,7 +541,7 @@ void ClangClangCodeModelServer::expectNoCompletionWithUnsavedMethod()
|
||||
.Times(1);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::expectCompletionFromFileA()
|
||||
void ClangCodeModelServer::expectCompletionFromFileA()
|
||||
{
|
||||
const CodeCompletion completion(Utf8StringLiteral("Function"),
|
||||
34,
|
||||
@@ -548,14 +550,14 @@ void ClangClangCodeModelServer::expectCompletionFromFileA()
|
||||
expectCompletion(completion);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::requestDocumentAnnotations(const Utf8String &filePath)
|
||||
void ClangCodeModelServer::requestDocumentAnnotations(const Utf8String &filePath)
|
||||
{
|
||||
const RequestDocumentAnnotationsMessage message({filePath, projectPartId});
|
||||
|
||||
clangServer.requestDocumentAnnotations(message);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::expectDocumentAnnotationsChangedForFileBWithSpecificHighlightingMark()
|
||||
void ClangCodeModelServer::expectDocumentAnnotationsChangedForFileBWithSpecificHighlightingMark()
|
||||
{
|
||||
HighlightingTypes types;
|
||||
types.mainHighlightingType = ClangBackEnd::HighlightingType::Function;
|
||||
@@ -569,7 +571,7 @@ void ClangClangCodeModelServer::expectDocumentAnnotationsChangedForFileBWithSpec
|
||||
.Times(1);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::updateUnsavedContent(const Utf8String &filePath,
|
||||
void ClangCodeModelServer::updateUnsavedContent(const Utf8String &filePath,
|
||||
const Utf8String &fileContent,
|
||||
quint32 revisionNumber)
|
||||
{
|
||||
@@ -579,7 +581,7 @@ void ClangClangCodeModelServer::updateUnsavedContent(const Utf8String &filePath,
|
||||
clangServer.updateTranslationUnitsForEditor(message);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::removeUnsavedFile(const Utf8String &filePath)
|
||||
void ClangCodeModelServer::removeUnsavedFile(const Utf8String &filePath)
|
||||
{
|
||||
const FileContainer fileContainer(filePath, projectPartId, Utf8StringVector(), 74);
|
||||
const UpdateTranslationUnitsForEditorMessage message({fileContainer});
|
||||
@@ -587,7 +589,7 @@ void ClangClangCodeModelServer::removeUnsavedFile(const Utf8String &filePath)
|
||||
clangServer.updateTranslationUnitsForEditor(message);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::unregisterFile(const Utf8String &filePath)
|
||||
void ClangCodeModelServer::unregisterFile(const Utf8String &filePath)
|
||||
{
|
||||
const QVector<FileContainer> fileContainers = {FileContainer(filePath, projectPartId)};
|
||||
const UnregisterTranslationUnitsForEditorMessage message(fileContainers);
|
||||
@@ -595,7 +597,7 @@ void ClangClangCodeModelServer::unregisterFile(const Utf8String &filePath)
|
||||
clangServer.unregisterTranslationUnitsForEditor(message);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::unregisterFile(const Utf8String &filePath, const Utf8String &projectPartId)
|
||||
void ClangCodeModelServer::unregisterFile(const Utf8String &filePath, const Utf8String &projectPartId)
|
||||
{
|
||||
const QVector<FileContainer> fileContainers = {FileContainer(filePath, projectPartId)};
|
||||
const UnregisterTranslationUnitsForEditorMessage message(fileContainers);
|
||||
@@ -603,28 +605,28 @@ void ClangClangCodeModelServer::unregisterFile(const Utf8String &filePath, const
|
||||
clangServer.unregisterTranslationUnitsForEditor(message);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::unregisterProject(const Utf8String &projectPartId)
|
||||
void ClangCodeModelServer::unregisterProject(const Utf8String &projectPartId)
|
||||
{
|
||||
const UnregisterProjectPartsForEditorMessage message({projectPartId});
|
||||
|
||||
clangServer.unregisterProjectPartsForEditor(message);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::registerProjectPart()
|
||||
void ClangCodeModelServer::registerProjectPart()
|
||||
{
|
||||
RegisterProjectPartsForEditorMessage message({ProjectPartContainer(projectPartId)});
|
||||
|
||||
clangServer.registerProjectPartsForEditor(message);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::registerProjectAndFile(const Utf8String &filePath,
|
||||
void ClangCodeModelServer::registerProjectAndFile(const Utf8String &filePath,
|
||||
int expectedDocumentAnnotationsChangedMessages)
|
||||
{
|
||||
registerProjectPart();
|
||||
registerFile(filePath, expectedDocumentAnnotationsChangedMessages);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::registerProjectAndFileAndWaitForFinished(
|
||||
void ClangCodeModelServer::registerProjectAndFileAndWaitForFinished(
|
||||
const Utf8String &filePath,
|
||||
int expectedDocumentAnnotationsChangedMessages)
|
||||
{
|
||||
@@ -632,7 +634,7 @@ void ClangClangCodeModelServer::registerProjectAndFileAndWaitForFinished(
|
||||
ASSERT_TRUE(waitUntilAllJobsFinished());
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::changeProjectPartArguments()
|
||||
void ClangCodeModelServer::changeProjectPartArguments()
|
||||
{
|
||||
const ProjectPartContainer projectPartContainer(projectPartId,
|
||||
{Utf8StringLiteral("-DArgumentDefinition")});
|
||||
@@ -641,7 +643,7 @@ void ClangClangCodeModelServer::changeProjectPartArguments()
|
||||
clangServer.registerProjectPartsForEditor(message);
|
||||
}
|
||||
|
||||
void ClangClangCodeModelServer::updateVisibilty(const Utf8String ¤tEditor,
|
||||
void ClangCodeModelServer::updateVisibilty(const Utf8String ¤tEditor,
|
||||
const Utf8String &additionalVisibleEditor)
|
||||
{
|
||||
const UpdateVisibleTranslationUnitsMessage message(currentEditor,
|
||||
@@ -650,7 +652,7 @@ void ClangClangCodeModelServer::updateVisibilty(const Utf8String ¤tEditor,
|
||||
clangServer.updateVisibleTranslationUnits(message);
|
||||
}
|
||||
|
||||
const Utf8String ClangClangCodeModelServer::unsavedContent(const QString &unsavedFilePath)
|
||||
const Utf8String ClangCodeModelServer::unsavedContent(const QString &unsavedFilePath)
|
||||
{
|
||||
QFile unsavedFileContentFile(unsavedFilePath);
|
||||
const bool isOpen = unsavedFileContentFile.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
|
@@ -74,6 +74,8 @@ protected:
|
||||
ClangBackEnd::Jobs jobs{documents, unsavedFiles, projects, dummyClientInterface};
|
||||
};
|
||||
|
||||
using JobsSlowTest = Jobs;
|
||||
|
||||
TEST_F(Jobs, ProcessEmptyQueue)
|
||||
{
|
||||
const JobRequests jobsStarted = jobs.process();
|
||||
@@ -82,7 +84,7 @@ TEST_F(Jobs, ProcessEmptyQueue)
|
||||
ASSERT_TRUE(jobs.runningJobs().isEmpty());
|
||||
}
|
||||
|
||||
TEST_F(Jobs, ProcessQueueWithSingleJob)
|
||||
TEST_F(JobsSlowTest, ProcessQueueWithSingleJob)
|
||||
{
|
||||
jobs.add(createJobRequest(filePath1, JobRequest::Type::UpdateDocumentAnnotations));
|
||||
|
||||
@@ -92,7 +94,7 @@ TEST_F(Jobs, ProcessQueueWithSingleJob)
|
||||
ASSERT_THAT(jobs.runningJobs().size(), Eq(1));
|
||||
}
|
||||
|
||||
TEST_F(Jobs, ProcessQueueUntilEmpty)
|
||||
TEST_F(JobsSlowTest, ProcessQueueUntilEmpty)
|
||||
{
|
||||
jobs.add(createJobRequest(filePath1, JobRequest::Type::UpdateDocumentAnnotations));
|
||||
jobs.add(createJobRequest(filePath1, JobRequest::Type::UpdateDocumentAnnotations));
|
||||
@@ -103,7 +105,7 @@ TEST_F(Jobs, ProcessQueueUntilEmpty)
|
||||
waitUntilJobChainFinished();
|
||||
}
|
||||
|
||||
TEST_F(Jobs, IsJobRunning)
|
||||
TEST_F(JobsSlowTest, IsJobRunning)
|
||||
{
|
||||
jobs.add(createJobRequest(filePath1, JobRequest::Type::UpdateDocumentAnnotations));
|
||||
jobs.process();
|
||||
|
@@ -47,6 +47,8 @@ protected:
|
||||
ClangBackEnd::ParseSupportiveTranslationUnitJob job;
|
||||
};
|
||||
|
||||
using ParseSupportiveTranslationUnitJobSlowTest = ParseSupportiveTranslationUnitJob;
|
||||
|
||||
TEST_F(ParseSupportiveTranslationUnitJob, PrepareAsyncRun)
|
||||
{
|
||||
job.setContext(jobContext);
|
||||
@@ -54,7 +56,7 @@ TEST_F(ParseSupportiveTranslationUnitJob, PrepareAsyncRun)
|
||||
ASSERT_TRUE(job.prepareAsyncRun());
|
||||
}
|
||||
|
||||
TEST_F(ParseSupportiveTranslationUnitJob, RunAsync)
|
||||
TEST_F(ParseSupportiveTranslationUnitJobSlowTest, RunAsync)
|
||||
{
|
||||
job.setContext(jobContext);
|
||||
job.prepareAsyncRun();
|
||||
@@ -64,7 +66,7 @@ TEST_F(ParseSupportiveTranslationUnitJob, RunAsync)
|
||||
ASSERT_TRUE(waitUntilJobFinished(job));
|
||||
}
|
||||
|
||||
TEST_F(ParseSupportiveTranslationUnitJob, DoNotIncorporateUpdaterResult)
|
||||
TEST_F(ParseSupportiveTranslationUnitJobSlowTest, DoNotIncorporateUpdaterResult)
|
||||
{
|
||||
const TimePoint parseTimePointBefore = parseTimePointOfDocument();
|
||||
job.setContext(jobContext);
|
@@ -47,6 +47,7 @@ protected:
|
||||
::ClangQuery simpleClassQuery;
|
||||
};
|
||||
|
||||
using ClangQuerySlowTest = ClangQuery;
|
||||
|
||||
TEST_F(ClangQuery, NoSourceRangesForDefaultConstruction)
|
||||
{
|
||||
@@ -55,7 +56,7 @@ TEST_F(ClangQuery, NoSourceRangesForDefaultConstruction)
|
||||
ASSERT_THAT(sourceRanges.sourceRangeWithTextContainers(), IsEmpty());
|
||||
}
|
||||
|
||||
TEST_F(ClangQuery, SourceRangesForSimpleFunctionDeclarationAreNotEmpty)
|
||||
TEST_F(ClangQuerySlowTest, SourceRangesForSimpleFunctionDeclarationAreNotEmpty)
|
||||
{
|
||||
simpleFunctionQuery.setQuery("functionDecl()");
|
||||
|
||||
@@ -64,7 +65,7 @@ TEST_F(ClangQuery, SourceRangesForSimpleFunctionDeclarationAreNotEmpty)
|
||||
ASSERT_THAT(simpleFunctionQuery.takeSourceRanges().sourceRangeWithTextContainers(), Not(IsEmpty()));
|
||||
}
|
||||
|
||||
TEST_F(ClangQuery, RootSourceRangeForSimpleFunctionDeclarationRange)
|
||||
TEST_F(ClangQuerySlowTest, RootSourceRangeForSimpleFunctionDeclarationRange)
|
||||
{
|
||||
simpleFunctionQuery.setQuery("functionDecl()");
|
||||
|
||||
@@ -74,7 +75,7 @@ TEST_F(ClangQuery, RootSourceRangeForSimpleFunctionDeclarationRange)
|
||||
IsSourceRangeWithText(1, 1, 8, 2, "int function(int* pointer, int value)\n{\n if (pointer == nullptr) {\n return value + 1;\n } else {\n return value - 1;\n }\n}"));
|
||||
}
|
||||
|
||||
TEST_F(ClangQuery, SourceRangeInUnsavedFileDeclarationRange)
|
||||
TEST_F(ClangQuerySlowTest, SourceRangeInUnsavedFileDeclarationRange)
|
||||
{
|
||||
::ClangQuery query;
|
||||
query.addFile(TESTDATA_DIR, "query_simplefunction.cpp", "#include \"unsaved.h\"", {"cc", "query_simplefunction.cpp", "-std=c++14"});
|
||||
@@ -88,7 +89,7 @@ TEST_F(ClangQuery, SourceRangeInUnsavedFileDeclarationRange)
|
||||
IsSourceRangeWithText(1, 1, 1, 15, "void unsaved();"));
|
||||
}
|
||||
|
||||
TEST_F(ClangQuery, RootSourceRangeForSimpleFieldDeclarationRange)
|
||||
TEST_F(ClangQuerySlowTest, RootSourceRangeForSimpleFieldDeclarationRange)
|
||||
{
|
||||
simpleClassQuery.setQuery("fieldDecl(hasType(isInteger()))");
|
||||
|
||||
@@ -98,14 +99,14 @@ TEST_F(ClangQuery, RootSourceRangeForSimpleFieldDeclarationRange)
|
||||
IsSourceRangeWithText(4, 5, 4, 10, " int x;"));
|
||||
}
|
||||
|
||||
TEST_F(ClangQuery, NoSourceRangesForEmptyQuery)
|
||||
TEST_F(ClangQuerySlowTest, NoSourceRangesForEmptyQuery)
|
||||
{
|
||||
simpleClassQuery.findLocations();
|
||||
|
||||
ASSERT_THAT(simpleClassQuery.takeSourceRanges().sourceRangeWithTextContainers(), IsEmpty());
|
||||
}
|
||||
|
||||
TEST_F(ClangQuery, NoSourceRangesForWrongQuery)
|
||||
TEST_F(ClangQuerySlowTest, NoSourceRangesForWrongQuery)
|
||||
{
|
||||
simpleClassQuery.setQuery("wrongQuery()");
|
||||
|
||||
@@ -114,14 +115,14 @@ TEST_F(ClangQuery, NoSourceRangesForWrongQuery)
|
||||
ASSERT_THAT(simpleClassQuery.takeSourceRanges().sourceRangeWithTextContainers(), IsEmpty());
|
||||
}
|
||||
|
||||
TEST_F(ClangQuery, NoDiagnosticsForDefaultConstruction)
|
||||
TEST_F(ClangQuerySlowTest, NoDiagnosticsForDefaultConstruction)
|
||||
{
|
||||
auto diagnostics = simpleFunctionQuery.takeDiagnosticContainers();
|
||||
|
||||
ASSERT_THAT(diagnostics, IsEmpty());
|
||||
}
|
||||
|
||||
TEST_F(ClangQuery, DiagnosticsForEmptyQuery)
|
||||
TEST_F(ClangQuerySlowTest, DiagnosticsForEmptyQuery)
|
||||
{
|
||||
simpleFunctionQuery.findLocations();
|
||||
|
||||
@@ -129,7 +130,7 @@ TEST_F(ClangQuery, DiagnosticsForEmptyQuery)
|
||||
Not(IsEmpty()));
|
||||
}
|
||||
|
||||
TEST_F(ClangQuery, DiagnosticsForWrongQuery)
|
||||
TEST_F(ClangQuerySlowTest, DiagnosticsForWrongQuery)
|
||||
{
|
||||
simpleClassQuery.setQuery("wrongQuery()");
|
||||
|
||||
@@ -139,7 +140,7 @@ TEST_F(ClangQuery, DiagnosticsForWrongQuery)
|
||||
Not(IsEmpty()));
|
||||
}
|
||||
|
||||
TEST_F(ClangQuery, NoDiagnosticsForAccurateQuery)
|
||||
TEST_F(ClangQuerySlowTest, NoDiagnosticsForAccurateQuery)
|
||||
{
|
||||
simpleFunctionQuery.setQuery("functionDecl()");
|
||||
|
||||
@@ -149,7 +150,7 @@ TEST_F(ClangQuery, NoDiagnosticsForAccurateQuery)
|
||||
IsEmpty());
|
||||
}
|
||||
|
||||
TEST_F(ClangQuery, DiagnosticForWrongQuery)
|
||||
TEST_F(ClangQuerySlowTest, DiagnosticForWrongQuery)
|
||||
{
|
||||
simpleClassQuery.setQuery("wrongQuery()");
|
||||
|
||||
@@ -159,7 +160,7 @@ TEST_F(ClangQuery, DiagnosticForWrongQuery)
|
||||
HasDiagnosticMessage("RegistryMatcherNotFound", 1, 1, 1, 11));
|
||||
}
|
||||
|
||||
TEST_F(ClangQuery, DiagnosticForWrongArgumenType)
|
||||
TEST_F(ClangQuerySlowTest, DiagnosticForWrongArgumenType)
|
||||
{
|
||||
simpleFunctionQuery.setQuery("functionDecl(1)");
|
||||
|
||||
|
@@ -48,6 +48,8 @@ protected:
|
||||
ClangBackEnd::ReparseSupportiveTranslationUnitJob job;
|
||||
};
|
||||
|
||||
using ReparseSupportiveTranslationUnitJobSlowTest = ReparseSupportiveTranslationUnitJob;
|
||||
|
||||
TEST_F(ReparseSupportiveTranslationUnitJob, PrepareAsyncRun)
|
||||
{
|
||||
job.setContext(jobContext);
|
||||
@@ -55,7 +57,7 @@ TEST_F(ReparseSupportiveTranslationUnitJob, PrepareAsyncRun)
|
||||
ASSERT_TRUE(job.prepareAsyncRun());
|
||||
}
|
||||
|
||||
TEST_F(ReparseSupportiveTranslationUnitJob, RunAsync)
|
||||
TEST_F(ReparseSupportiveTranslationUnitJobSlowTest, RunAsync)
|
||||
{
|
||||
parse();
|
||||
job.setContext(jobContext);
|
||||
@@ -66,7 +68,7 @@ TEST_F(ReparseSupportiveTranslationUnitJob, RunAsync)
|
||||
ASSERT_TRUE(waitUntilJobFinished(job));
|
||||
}
|
||||
|
||||
TEST_F(ReparseSupportiveTranslationUnitJob, IncorporateUpdaterResult)
|
||||
TEST_F(ReparseSupportiveTranslationUnitJobSlowTest, IncorporateUpdaterResult)
|
||||
{
|
||||
parse();
|
||||
const TimePoint parseTimePointBefore = parseTimePointOfDocument();
|
||||
@@ -79,7 +81,7 @@ TEST_F(ReparseSupportiveTranslationUnitJob, IncorporateUpdaterResult)
|
||||
ASSERT_THAT(parseTimePointOfDocument(), Not(Eq(parseTimePointBefore)));
|
||||
}
|
||||
|
||||
TEST_F(ReparseSupportiveTranslationUnitJob, DoNotIncorporateUpdaterResultIfDocumentWasClosed)
|
||||
TEST_F(ReparseSupportiveTranslationUnitJobSlowTest, DoNotIncorporateUpdaterResultIfDocumentWasClosed)
|
||||
{
|
||||
parse();
|
||||
const TimePoint parseTimePointBefore = parseTimePointOfDocument();
|
@@ -132,6 +132,8 @@ protected:
|
||||
ClangBackEnd::SupportiveTranslationUnitInitializer &initializer = *d.initializer;
|
||||
};
|
||||
|
||||
using SupportiveTranslationUnitInitializerSlowTest = SupportiveTranslationUnitInitializer;
|
||||
|
||||
TEST_F(SupportiveTranslationUnitInitializer, HasInitiallyNotInitializedState)
|
||||
{
|
||||
ASSERT_THAT(initializer.state(), Eq(ClangBackEnd::SupportiveTranslationUnitInitializer::State::NotInitialized));
|
||||
@@ -147,7 +149,7 @@ TEST_F(SupportiveTranslationUnitInitializer, StartInitializingAbortsIfDocumentIs
|
||||
ASSERT_THAT(initializer.state(), Eq(ClangBackEnd::SupportiveTranslationUnitInitializer::State::Aborted));
|
||||
}
|
||||
|
||||
TEST_F(SupportiveTranslationUnitInitializer, StartInitializingAddsTranslationUnit)
|
||||
TEST_F(SupportiveTranslationUnitInitializerSlowTest, StartInitializingAddsTranslationUnit)
|
||||
{
|
||||
initializer.startInitializing();
|
||||
|
||||
@@ -155,7 +157,7 @@ TEST_F(SupportiveTranslationUnitInitializer, StartInitializingAddsTranslationUni
|
||||
ASSERT_FALSE(document.translationUnits().areAllTranslationUnitsParsed());
|
||||
}
|
||||
|
||||
TEST_F(SupportiveTranslationUnitInitializer, StartInitializingStartsJob)
|
||||
TEST_F(SupportiveTranslationUnitInitializerSlowTest, StartInitializingStartsJob)
|
||||
{
|
||||
initializer.startInitializing();
|
||||
|
||||
@@ -176,7 +178,7 @@ TEST_F(SupportiveTranslationUnitInitializer, CheckIfParseJobFinishedAbortsIfDocu
|
||||
ASSERT_THAT(initializer.state(), Eq(ClangBackEnd::SupportiveTranslationUnitInitializer::State::Aborted));
|
||||
}
|
||||
|
||||
TEST_F(SupportiveTranslationUnitInitializer, CheckIfParseJobFinishedStartsJob)
|
||||
TEST_F(SupportiveTranslationUnitInitializerSlowTest, CheckIfParseJobFinishedStartsJob)
|
||||
{
|
||||
parse();
|
||||
initializer.setState(ClangBackEnd::SupportiveTranslationUnitInitializer::State::WaitingForParseJob);
|
||||
@@ -202,7 +204,7 @@ TEST_F(SupportiveTranslationUnitInitializer, CheckIfReparseJobFinishedAbortsIfDo
|
||||
ASSERT_THAT(initializer.state(), Eq(ClangBackEnd::SupportiveTranslationUnitInitializer::State::Aborted));
|
||||
}
|
||||
|
||||
TEST_F(SupportiveTranslationUnitInitializer, CheckIfReparseJobFinishedStartsJob)
|
||||
TEST_F(SupportiveTranslationUnitInitializerSlowTest, CheckIfReparseJobFinishedStartsJob)
|
||||
{
|
||||
parse();
|
||||
initializer.setState(ClangBackEnd::SupportiveTranslationUnitInitializer::State::WaitingForReparseJob);
|
||||
@@ -215,7 +217,7 @@ TEST_F(SupportiveTranslationUnitInitializer, CheckIfReparseJobFinishedStartsJob)
|
||||
ASSERT_THAT(initializer.state(), Eq(ClangBackEnd::SupportiveTranslationUnitInitializer::State::Initialized));
|
||||
}
|
||||
|
||||
TEST_F(SupportiveTranslationUnitInitializer, FullRun)
|
||||
TEST_F(SupportiveTranslationUnitInitializerSlowTest, FullRun)
|
||||
{
|
||||
parse();
|
||||
initializer.startInitializing();
|
@@ -73,7 +73,9 @@ protected:
|
||||
QVector<DiagnosticContainer> extractedMainFileDiagnostics;
|
||||
};
|
||||
|
||||
TEST_F(TranslationUnit, HasExpectedMainFileDiagnostics)
|
||||
using TranslationUnitSlowTest = TranslationUnit;
|
||||
|
||||
TEST_F(TranslationUnitSlowTest, HasExpectedMainFileDiagnostics)
|
||||
{
|
||||
translationUnit.extractDiagnostics(extractedFirstHeaderErrorDiagnostic,
|
||||
extractedMainFileDiagnostics);
|
||||
@@ -81,7 +83,7 @@ TEST_F(TranslationUnit, HasExpectedMainFileDiagnostics)
|
||||
ASSERT_THAT(extractedMainFileDiagnostics, ContainerEq(diagnosticsFromMainFile()));
|
||||
}
|
||||
|
||||
TEST_F(TranslationUnit, HasExpectedMainFileDiagnosticsAfterReparse)
|
||||
TEST_F(TranslationUnitSlowTest, HasExpectedMainFileDiagnosticsAfterReparse)
|
||||
{
|
||||
reparse();
|
||||
|
||||
@@ -91,7 +93,7 @@ TEST_F(TranslationUnit, HasExpectedMainFileDiagnosticsAfterReparse)
|
||||
ASSERT_THAT(extractedMainFileDiagnostics, ContainerEq(diagnosticsFromMainFile()));
|
||||
}
|
||||
|
||||
TEST_F(TranslationUnit, HasErrorDiagnosticsInHeaders)
|
||||
TEST_F(TranslationUnitSlowTest, HasErrorDiagnosticsInHeaders)
|
||||
{
|
||||
translationUnit.extractDiagnostics(extractedFirstHeaderErrorDiagnostic,
|
||||
extractedMainFileDiagnostics);
|
||||
@@ -100,7 +102,7 @@ TEST_F(TranslationUnit, HasErrorDiagnosticsInHeaders)
|
||||
Eq(errorDiagnosticsFromHeaders().first()));
|
||||
}
|
||||
|
||||
TEST_F(TranslationUnit, HasErrorDiagnosticsInHeadersAfterReparse)
|
||||
TEST_F(TranslationUnitSlowTest, HasErrorDiagnosticsInHeadersAfterReparse)
|
||||
{
|
||||
reparse();
|
||||
|
||||
|
@@ -43,6 +43,8 @@ protected:
|
||||
ClangBackEnd::UpdateDocumentAnnotationsJob job;
|
||||
};
|
||||
|
||||
using UpdateDocumentAnnotationsJobSlowTest = UpdateDocumentAnnotationsJob;
|
||||
|
||||
TEST_F(UpdateDocumentAnnotationsJob, PrepareAsyncRun)
|
||||
{
|
||||
job.setContext(jobContext);
|
||||
@@ -50,7 +52,7 @@ TEST_F(UpdateDocumentAnnotationsJob, PrepareAsyncRun)
|
||||
ASSERT_TRUE(job.prepareAsyncRun());
|
||||
}
|
||||
|
||||
TEST_F(UpdateDocumentAnnotationsJob, RunAsync)
|
||||
TEST_F(UpdateDocumentAnnotationsJobSlowTest, RunAsync)
|
||||
{
|
||||
job.setContext(jobContext);
|
||||
job.prepareAsyncRun();
|
||||
@@ -60,7 +62,7 @@ TEST_F(UpdateDocumentAnnotationsJob, RunAsync)
|
||||
ASSERT_TRUE(waitUntilJobFinished(job));
|
||||
}
|
||||
|
||||
TEST_F(UpdateDocumentAnnotationsJob, SendAnnotations)
|
||||
TEST_F(UpdateDocumentAnnotationsJobSlowTest, SendAnnotations)
|
||||
{
|
||||
job.setContext(jobContextWithMockClient);
|
||||
job.prepareAsyncRun();
|
||||
@@ -71,7 +73,7 @@ TEST_F(UpdateDocumentAnnotationsJob, SendAnnotations)
|
||||
ASSERT_TRUE(waitUntilJobFinished(job));
|
||||
}
|
||||
|
||||
TEST_F(UpdateDocumentAnnotationsJob, DontSendAnnotationsIfDocumentWasClosed)
|
||||
TEST_F(UpdateDocumentAnnotationsJobSlowTest, DontSendAnnotationsIfDocumentWasClosed)
|
||||
{
|
||||
job.setContext(jobContextWithMockClient);
|
||||
job.prepareAsyncRun();
|
||||
@@ -83,7 +85,7 @@ TEST_F(UpdateDocumentAnnotationsJob, DontSendAnnotationsIfDocumentWasClosed)
|
||||
ASSERT_TRUE(waitUntilJobFinished(job));
|
||||
}
|
||||
|
||||
TEST_F(UpdateDocumentAnnotationsJob, DontSendAnnotationsIfDocumentRevisionChanged)
|
||||
TEST_F(UpdateDocumentAnnotationsJobSlowTest, DontSendAnnotationsIfDocumentRevisionChanged)
|
||||
{
|
||||
job.setContext(jobContextWithMockClient);
|
||||
job.prepareAsyncRun();
|
||||
@@ -95,7 +97,7 @@ TEST_F(UpdateDocumentAnnotationsJob, DontSendAnnotationsIfDocumentRevisionChange
|
||||
ASSERT_TRUE(waitUntilJobFinished(job));
|
||||
}
|
||||
|
||||
TEST_F(UpdateDocumentAnnotationsJob, UpdatesTranslationUnit)
|
||||
TEST_F(UpdateDocumentAnnotationsJobSlowTest, UpdatesTranslationUnit)
|
||||
{
|
||||
const TimePoint timePointBefore = document.lastProjectPartChangeTimePoint();
|
||||
const QSet<Utf8String> dependendOnFilesBefore = document.dependedFilePaths();
|
||||
|
@@ -74,7 +74,10 @@ protected:
|
||||
MockClangCodeModelClient ClientServerOutsideProcess::mockClangCodeModelClient;
|
||||
ClangBackEnd::ClangCodeModelConnectionClient ClientServerOutsideProcess::client(&ClientServerOutsideProcess::mockClangCodeModelClient);
|
||||
|
||||
TEST_F(ClientServerOutsideProcess, RestartProcessAsynchronously)
|
||||
using ClientServerOutsideProcessSlowTest = ClientServerOutsideProcess;
|
||||
|
||||
|
||||
TEST_F(ClientServerOutsideProcessSlowTest, RestartProcessAsynchronously)
|
||||
{
|
||||
QSignalSpy clientSpy(&client, &ConnectionClient::connectedToLocalSocket);
|
||||
|
||||
@@ -85,7 +88,7 @@ TEST_F(ClientServerOutsideProcess, RestartProcessAsynchronously)
|
||||
ASSERT_TRUE(client.isConnected());
|
||||
}
|
||||
|
||||
TEST_F(ClientServerOutsideProcess, RestartProcessAfterAliveTimeout)
|
||||
TEST_F(ClientServerOutsideProcessSlowTest, RestartProcessAfterAliveTimeout)
|
||||
{
|
||||
QSignalSpy clientSpy(&client, &ConnectionClient::connectedToLocalSocket);
|
||||
|
||||
@@ -95,7 +98,7 @@ TEST_F(ClientServerOutsideProcess, RestartProcessAfterAliveTimeout)
|
||||
ASSERT_THAT(clientSpy, SizeIs(1));
|
||||
}
|
||||
|
||||
TEST_F(ClientServerOutsideProcess, RestartProcessAfterTermination)
|
||||
TEST_F(ClientServerOutsideProcessSlowTest, RestartProcessAfterTermination)
|
||||
{
|
||||
QSignalSpy clientSpy(&client, &ConnectionClient::connectedToLocalSocket);
|
||||
|
@@ -178,6 +178,8 @@ protected:
|
||||
};
|
||||
};
|
||||
|
||||
using CodeCompleterSlowTest = CodeCompleter;
|
||||
|
||||
Utf8String CodeCompleter::readFileContent(const QString &fileName)
|
||||
{
|
||||
QFile readFileContentFile(QStringLiteral(TESTDATA_DIR) + fileName);
|
||||
@@ -217,7 +219,7 @@ void CodeCompleter::SetUp()
|
||||
document.parse();
|
||||
}
|
||||
|
||||
TEST_F(CodeCompleter, FunctionInUnsavedFile)
|
||||
TEST_F(CodeCompleterSlowTest, FunctionInUnsavedFile)
|
||||
{
|
||||
unsavedFiles.createOrUpdate({unsavedMainFileContainer});
|
||||
documents.update({unsavedMainFileContainer});
|
||||
@@ -236,7 +238,7 @@ TEST_F(CodeCompleter, FunctionInUnsavedFile)
|
||||
CodeCompletion::FunctionCompletionKind)))));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompleter, VariableInUnsavedFile)
|
||||
TEST_F(CodeCompleterSlowTest, VariableInUnsavedFile)
|
||||
{
|
||||
unsavedFiles.createOrUpdate({unsavedMainFileContainer});
|
||||
documents.update({unsavedMainFileContainer});
|
||||
@@ -247,7 +249,7 @@ TEST_F(CodeCompleter, VariableInUnsavedFile)
|
||||
CodeCompletion::VariableCompletionKind)));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompleter, GlobalVariableInUnsavedFile)
|
||||
TEST_F(CodeCompleterSlowTest, GlobalVariableInUnsavedFile)
|
||||
{
|
||||
unsavedFiles.createOrUpdate({unsavedMainFileContainer});
|
||||
documents.update({unsavedMainFileContainer});
|
||||
@@ -258,7 +260,7 @@ TEST_F(CodeCompleter, GlobalVariableInUnsavedFile)
|
||||
CodeCompletion::VariableCompletionKind)));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompleter, Macro)
|
||||
TEST_F(CodeCompleterSlowTest, Macro)
|
||||
{
|
||||
unsavedFiles.createOrUpdate({unsavedMainFileContainer});
|
||||
documents.update({unsavedMainFileContainer});
|
||||
@@ -269,21 +271,21 @@ TEST_F(CodeCompleter, Macro)
|
||||
CodeCompletion::PreProcessorCompletionKind)));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompleter, Keyword)
|
||||
TEST_F(CodeCompleterSlowTest, Keyword)
|
||||
{
|
||||
ASSERT_THAT(completer->complete(27, 1),
|
||||
Contains(IsCodeCompletion(Utf8StringLiteral("switch"),
|
||||
CodeCompletion::KeywordCompletionKind)));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompleter, FunctionInIncludedHeader)
|
||||
TEST_F(CodeCompleterSlowTest, FunctionInIncludedHeader)
|
||||
{
|
||||
ASSERT_THAT(completer->complete(27, 1),
|
||||
Contains(IsCodeCompletion(Utf8StringLiteral("FunctionInIncludedHeader"),
|
||||
CodeCompletion::FunctionCompletionKind)));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompleter, FunctionInUnsavedIncludedHeader)
|
||||
TEST_F(CodeCompleterSlowTest, FunctionInUnsavedIncludedHeader)
|
||||
{
|
||||
unsavedFiles.createOrUpdate({unsavedTargetHeaderFileContainer});
|
||||
documents.create({unsavedTargetHeaderFileContainer});
|
||||
@@ -294,7 +296,7 @@ TEST_F(CodeCompleter, FunctionInUnsavedIncludedHeader)
|
||||
CodeCompletion::FunctionCompletionKind)));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompleter, DISABLED_FunctionInChangedIncludedHeader)
|
||||
TEST_F(CodeCompleterSlowTest, DISABLED_FunctionInChangedIncludedHeader)
|
||||
{
|
||||
copyChangedTargetHeaderToTemporaryIncludeDirecory();
|
||||
|
||||
@@ -303,7 +305,7 @@ TEST_F(CodeCompleter, DISABLED_FunctionInChangedIncludedHeader)
|
||||
CodeCompletion::FunctionCompletionKind)));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompleter, DISABLED_FunctionInChangedIncludedHeaderWithUnsavedContentInMainFile) // it's not that bad because we reparse anyway
|
||||
TEST_F(CodeCompleterSlowTest, DISABLED_FunctionInChangedIncludedHeaderWithUnsavedContentInMainFile) // it's not that bad because we reparse anyway
|
||||
{
|
||||
unsavedFiles.createOrUpdate({unsavedMainFileContainer});
|
||||
documents.update({unsavedMainFileContainer});
|
||||
@@ -316,7 +318,7 @@ TEST_F(CodeCompleter, DISABLED_FunctionInChangedIncludedHeaderWithUnsavedContent
|
||||
CodeCompletion::FunctionCompletionKind)));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompleter, ArrowCompletion)
|
||||
TEST_F(CodeCompleterSlowTest, ArrowCompletion)
|
||||
{
|
||||
auto myCompleter = setupCompleter(arrowFileContainer);
|
||||
|
||||
@@ -329,7 +331,7 @@ TEST_F(CodeCompleter, ArrowCompletion)
|
||||
ClangBackEnd::CompletionCorrection::NoCorrection);
|
||||
}
|
||||
|
||||
TEST_F(CodeCompleter, DotToArrowCompletionForPointer)
|
||||
TEST_F(CodeCompleterSlowTest, DotToArrowCompletionForPointer)
|
||||
{
|
||||
auto myCompleter = setupCompleter(dotArrowCorrectionForPointerFileContainer);
|
||||
|
||||
@@ -342,7 +344,7 @@ TEST_F(CodeCompleter, DotToArrowCompletionForPointer)
|
||||
ClangBackEnd::CompletionCorrection::DotToArrowCorrection);
|
||||
}
|
||||
|
||||
TEST_F(CodeCompleter, DotToArrowCompletionForPointerInOutdatedDocument)
|
||||
TEST_F(CodeCompleterSlowTest, DotToArrowCompletionForPointerInOutdatedDocument)
|
||||
{
|
||||
auto fileContainerBeforeTyping = dotArrowCorrectionForPointerFileContainerBeforeTyping;
|
||||
documents.create({fileContainerBeforeTyping});
|
||||
@@ -363,7 +365,7 @@ TEST_F(CodeCompleter, DotToArrowCompletionForPointerInOutdatedDocument)
|
||||
ClangBackEnd::CompletionCorrection::DotToArrowCorrection);
|
||||
}
|
||||
|
||||
TEST_F(CodeCompleter, NoDotToArrowCompletionForObject)
|
||||
TEST_F(CodeCompleterSlowTest, NoDotToArrowCompletionForObject)
|
||||
{
|
||||
auto myCompleter = setupCompleter(noDotArrowCorrectionForObjectFileContainer);
|
||||
|
||||
@@ -375,7 +377,7 @@ TEST_F(CodeCompleter, NoDotToArrowCompletionForObject)
|
||||
ASSERT_THAT(myCompleter.neededCorrection(), ClangBackEnd::CompletionCorrection::NoCorrection);
|
||||
}
|
||||
|
||||
TEST_F(CodeCompleter, NoDotToArrowCompletionForFloat)
|
||||
TEST_F(CodeCompleterSlowTest, NoDotToArrowCompletionForFloat)
|
||||
{
|
||||
auto myCompleter = setupCompleter(noDotArrowCorrectionForFloatFileContainer);
|
||||
|
||||
@@ -385,7 +387,7 @@ TEST_F(CodeCompleter, NoDotToArrowCompletionForFloat)
|
||||
ASSERT_THAT(myCompleter.neededCorrection(), ClangBackEnd::CompletionCorrection::NoCorrection);
|
||||
}
|
||||
|
||||
TEST_F(CodeCompleter, NoDotArrowCorrectionForObjectWithArrowOperator)
|
||||
TEST_F(CodeCompleterSlowTest, NoDotArrowCorrectionForObjectWithArrowOperator)
|
||||
{
|
||||
auto myCompleter = setupCompleter(noDotArrowCorrectionForObjectWithArrowOperatortFileContainer);
|
||||
|
||||
@@ -397,7 +399,7 @@ TEST_F(CodeCompleter, NoDotArrowCorrectionForObjectWithArrowOperator)
|
||||
ASSERT_THAT(myCompleter.neededCorrection(), ClangBackEnd::CompletionCorrection::NoCorrection);
|
||||
}
|
||||
|
||||
TEST_F(CodeCompleter, NoDotArrowCorrectionForDotDot)
|
||||
TEST_F(CodeCompleterSlowTest, NoDotArrowCorrectionForDotDot)
|
||||
{
|
||||
auto myCompleter = setupCompleter(noDotArrowCorrectionForDotDotFileContainer);
|
||||
|
||||
@@ -407,7 +409,7 @@ TEST_F(CodeCompleter, NoDotArrowCorrectionForDotDot)
|
||||
ASSERT_THAT(myCompleter.neededCorrection(), ClangBackEnd::CompletionCorrection::NoCorrection);
|
||||
}
|
||||
|
||||
TEST_F(CodeCompleter, NoDotArrowCorrectionForArrowDot)
|
||||
TEST_F(CodeCompleterSlowTest, NoDotArrowCorrectionForArrowDot)
|
||||
{
|
||||
auto myCompleter = setupCompleter(noDotArrowCorrectionForArrowDotFileContainer);
|
||||
|
||||
@@ -417,7 +419,7 @@ TEST_F(CodeCompleter, NoDotArrowCorrectionForArrowDot)
|
||||
ASSERT_THAT(myCompleter.neededCorrection(), ClangBackEnd::CompletionCorrection::NoCorrection);
|
||||
}
|
||||
|
||||
TEST_F(CodeCompleter, NoDotArrowCorrectionForOnlyDot)
|
||||
TEST_F(CodeCompleterSlowTest, NoDotArrowCorrectionForOnlyDot)
|
||||
{
|
||||
auto myCompleter = setupCompleter(noDotArrowCorrectionForOnlyDotFileContainer);
|
||||
|
||||
@@ -429,7 +431,7 @@ TEST_F(CodeCompleter, NoDotArrowCorrectionForOnlyDot)
|
||||
ASSERT_THAT(myCompleter.neededCorrection(), ClangBackEnd::CompletionCorrection::NoCorrection);
|
||||
}
|
||||
|
||||
TEST_F(CodeCompleter, NoDotArrowCorrectionForColonColon)
|
||||
TEST_F(CodeCompleterSlowTest, NoDotArrowCorrectionForColonColon)
|
||||
{
|
||||
auto myCompleter = setupCompleter(noDotArrowCorrectionForColonColonFileContainer);
|
||||
const ClangBackEnd::CodeCompletions completions = myCompleter.complete(1, 7);
|
@@ -161,7 +161,9 @@ protected:
|
||||
Document briefCommentDocument{Utf8StringLiteral(TESTDATA_DIR"/complete_extractor_brief_comment.cpp"), project, Utf8StringVector(), documents};
|
||||
};
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, Function)
|
||||
using CodeCompletionsExtractorSlowTest = CodeCompletionsExtractor;
|
||||
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, Function)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(functionDocument, 20));
|
||||
|
||||
@@ -172,7 +174,7 @@ TEST_F(CodeCompletionsExtractor, Function)
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, TemplateFunction)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, TemplateFunction)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(functionDocument, 20));
|
||||
|
||||
@@ -183,7 +185,7 @@ TEST_F(CodeCompletionsExtractor, TemplateFunction)
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, Variable)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, Variable)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(variableDocument, 4));
|
||||
|
||||
@@ -194,7 +196,7 @@ TEST_F(CodeCompletionsExtractor, Variable)
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, DISABLED_ON_WINDOWS(NonTypeTemplateParameter))
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, DISABLED_ON_WINDOWS(NonTypeTemplateParameter))
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(variableDocument, 25, 19));
|
||||
|
||||
@@ -206,7 +208,7 @@ TEST_F(CodeCompletionsExtractor, DISABLED_ON_WINDOWS(NonTypeTemplateParameter))
|
||||
}
|
||||
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, VariableReference)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, VariableReference)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(variableDocument, 12));
|
||||
|
||||
@@ -217,7 +219,7 @@ TEST_F(CodeCompletionsExtractor, VariableReference)
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, Parameter)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, Parameter)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(variableDocument, 4));
|
||||
|
||||
@@ -228,7 +230,7 @@ TEST_F(CodeCompletionsExtractor, Parameter)
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, Field)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, Field)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(variableDocument, 20));
|
||||
|
||||
@@ -239,7 +241,7 @@ TEST_F(CodeCompletionsExtractor, Field)
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, DISABLED_ON_WINDOWS(Class))
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, DISABLED_ON_WINDOWS(Class))
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(classDocument, 20));
|
||||
|
||||
@@ -250,7 +252,7 @@ TEST_F(CodeCompletionsExtractor, DISABLED_ON_WINDOWS(Class))
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, DISABLED_ON_WINDOWS(Struct))
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, DISABLED_ON_WINDOWS(Struct))
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(classDocument, 20));
|
||||
|
||||
@@ -261,7 +263,7 @@ TEST_F(CodeCompletionsExtractor, DISABLED_ON_WINDOWS(Struct))
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, DISABLED_ON_WINDOWS(Union))
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, DISABLED_ON_WINDOWS(Union))
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(classDocument, 20));
|
||||
|
||||
@@ -272,7 +274,7 @@ TEST_F(CodeCompletionsExtractor, DISABLED_ON_WINDOWS(Union))
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, DISABLED_ON_WINDOWS(Typedef))
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, DISABLED_ON_WINDOWS(Typedef))
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(classDocument, 20));
|
||||
|
||||
@@ -283,7 +285,7 @@ TEST_F(CodeCompletionsExtractor, DISABLED_ON_WINDOWS(Typedef))
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, DISABLED_ON_WINDOWS(UsingAsTypeAlias))
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, DISABLED_ON_WINDOWS(UsingAsTypeAlias))
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(classDocument, 20));
|
||||
|
||||
@@ -294,7 +296,7 @@ TEST_F(CodeCompletionsExtractor, DISABLED_ON_WINDOWS(UsingAsTypeAlias))
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, DISABLED_ON_WINDOWS(TemplateTypeParameter))
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, DISABLED_ON_WINDOWS(TemplateTypeParameter))
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(classDocument, 20));
|
||||
|
||||
@@ -305,7 +307,7 @@ TEST_F(CodeCompletionsExtractor, DISABLED_ON_WINDOWS(TemplateTypeParameter))
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, DISABLED_ON_WINDOWS(TemplateClass))
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, DISABLED_ON_WINDOWS(TemplateClass))
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(classDocument, 20));
|
||||
|
||||
@@ -316,7 +318,7 @@ TEST_F(CodeCompletionsExtractor, DISABLED_ON_WINDOWS(TemplateClass))
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, DISABLED_ON_WINDOWS(TemplateTemplateParameter))
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, DISABLED_ON_WINDOWS(TemplateTemplateParameter))
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(classDocument, 20));
|
||||
|
||||
@@ -327,7 +329,7 @@ TEST_F(CodeCompletionsExtractor, DISABLED_ON_WINDOWS(TemplateTemplateParameter))
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, DISABLED_ON_WINDOWS(ClassTemplatePartialSpecialization))
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, DISABLED_ON_WINDOWS(ClassTemplatePartialSpecialization))
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(classDocument, 20));
|
||||
|
||||
@@ -338,7 +340,7 @@ TEST_F(CodeCompletionsExtractor, DISABLED_ON_WINDOWS(ClassTemplatePartialSpecial
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, Namespace)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, Namespace)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(namespaceDocument, 20));
|
||||
|
||||
@@ -349,7 +351,7 @@ TEST_F(CodeCompletionsExtractor, Namespace)
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, NamespaceAlias)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, NamespaceAlias)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(namespaceDocument, 20));
|
||||
|
||||
@@ -360,7 +362,7 @@ TEST_F(CodeCompletionsExtractor, NamespaceAlias)
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, Enumeration)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, Enumeration)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(enumerationDocument, 20));
|
||||
|
||||
@@ -371,7 +373,7 @@ TEST_F(CodeCompletionsExtractor, Enumeration)
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, Enumerator)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, Enumerator)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(enumerationDocument, 20));
|
||||
|
||||
@@ -382,7 +384,7 @@ TEST_F(CodeCompletionsExtractor, Enumerator)
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, DISABLED_Constructor)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, DISABLED_Constructor)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(constructorDocument, 20));
|
||||
|
||||
@@ -393,7 +395,7 @@ TEST_F(CodeCompletionsExtractor, DISABLED_Constructor)
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, Destructor)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, Destructor)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(constructorDocument, 20));
|
||||
|
||||
@@ -404,7 +406,7 @@ TEST_F(CodeCompletionsExtractor, Destructor)
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, Method)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, Method)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(functionDocument, 20));
|
||||
|
||||
@@ -416,7 +418,7 @@ TEST_F(CodeCompletionsExtractor, Method)
|
||||
ASSERT_FALSE(extractor.currentCodeCompletion().hasParameters());
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, MethodWithParameters)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, MethodWithParameters)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(functionDocument, 20));
|
||||
|
||||
@@ -428,7 +430,7 @@ TEST_F(CodeCompletionsExtractor, MethodWithParameters)
|
||||
ASSERT_TRUE(extractor.currentCodeCompletion().hasParameters());
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, Slot)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, Slot)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(functionDocument, 20));
|
||||
|
||||
@@ -439,7 +441,7 @@ TEST_F(CodeCompletionsExtractor, Slot)
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, Signal)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, Signal)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(functionDocument, 20));
|
||||
|
||||
@@ -450,7 +452,7 @@ TEST_F(CodeCompletionsExtractor, Signal)
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, MacroDefinition)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, MacroDefinition)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(variableDocument, 35));
|
||||
|
||||
@@ -461,7 +463,7 @@ TEST_F(CodeCompletionsExtractor, MacroDefinition)
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, FunctionMacro)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, FunctionMacro)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(functionDocument, 20));
|
||||
|
||||
@@ -472,7 +474,7 @@ TEST_F(CodeCompletionsExtractor, FunctionMacro)
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, IntKeyword)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, IntKeyword)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(functionDocument, 20));
|
||||
|
||||
@@ -483,7 +485,7 @@ TEST_F(CodeCompletionsExtractor, IntKeyword)
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, SwitchKeyword)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, SwitchKeyword)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(functionDocument, 20));
|
||||
|
||||
@@ -494,7 +496,7 @@ TEST_F(CodeCompletionsExtractor, SwitchKeyword)
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, ClassKeyword)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, ClassKeyword)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(functionDocument, 20));
|
||||
|
||||
@@ -505,7 +507,7 @@ TEST_F(CodeCompletionsExtractor, ClassKeyword)
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, DeprecatedFunction)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, DeprecatedFunction)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(functionDocument, 20));
|
||||
|
||||
@@ -516,7 +518,7 @@ TEST_F(CodeCompletionsExtractor, DeprecatedFunction)
|
||||
CodeCompletion::Deprecated));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, NotAccessibleFunction)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, NotAccessibleFunction)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(functionDocument, 20));
|
||||
|
||||
@@ -527,7 +529,7 @@ TEST_F(CodeCompletionsExtractor, NotAccessibleFunction)
|
||||
CodeCompletion::NotAccessible));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, NotAvailableFunction)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, NotAvailableFunction)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(functionDocument, 20));
|
||||
|
||||
@@ -538,7 +540,7 @@ TEST_F(CodeCompletionsExtractor, NotAvailableFunction)
|
||||
CodeCompletion::NotAvailable));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, UnsavedFile)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, UnsavedFile)
|
||||
{
|
||||
Document document(Utf8String::fromUtf8(TESTDATA_DIR"/complete_extractor_function.cpp"), project, Utf8StringVector(), documents);
|
||||
unsavedFiles.createOrUpdate({unsavedDataFileContainer(TESTDATA_DIR"/complete_extractor_function.cpp",
|
||||
@@ -552,7 +554,7 @@ TEST_F(CodeCompletionsExtractor, UnsavedFile)
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, ChangeUnsavedFile)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, ChangeUnsavedFile)
|
||||
{
|
||||
Document document(Utf8String::fromUtf8(TESTDATA_DIR"/complete_extractor_function.cpp"), project, Utf8StringVector(), documents);
|
||||
unsavedFiles.createOrUpdate({unsavedDataFileContainer(TESTDATA_DIR"/complete_extractor_function.cpp",
|
||||
@@ -569,7 +571,7 @@ TEST_F(CodeCompletionsExtractor, ChangeUnsavedFile)
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, ArgumentDefinition)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, ArgumentDefinition)
|
||||
{
|
||||
project.setArguments({Utf8StringLiteral("-DArgumentDefinition"), Utf8StringLiteral("-std=gnu++14")});
|
||||
ClangCodeCompleteResults completeResults(getResults(variableDocument, 35));
|
||||
@@ -581,7 +583,7 @@ TEST_F(CodeCompletionsExtractor, ArgumentDefinition)
|
||||
CodeCompletion::Available));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, NoArgumentDefinition)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, NoArgumentDefinition)
|
||||
{
|
||||
project.setArguments({Utf8StringLiteral("-std=gnu++14")});
|
||||
ClangCodeCompleteResults completeResults(getResults(variableDocument, 35));
|
||||
@@ -593,7 +595,7 @@ TEST_F(CodeCompletionsExtractor, NoArgumentDefinition)
|
||||
CodeCompletion::Available)));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, CompletionChunksFunction)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, CompletionChunksFunction)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(functionDocument, 20));
|
||||
|
||||
@@ -606,7 +608,7 @@ TEST_F(CodeCompletionsExtractor, CompletionChunksFunction)
|
||||
{CodeCompletionChunk::RightParen, Utf8StringLiteral(")")}})));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, CompletionChunksFunctionWithOptionalChunks)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, CompletionChunksFunctionWithOptionalChunks)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(functionDocument, 20));
|
||||
|
||||
@@ -624,7 +626,7 @@ TEST_F(CodeCompletionsExtractor, CompletionChunksFunctionWithOptionalChunks)
|
||||
{CodeCompletionChunk::RightParen, Utf8StringLiteral(")")}})));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, CompletionChunksField)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, CompletionChunksField)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(variableDocument, 20));
|
||||
|
||||
@@ -635,7 +637,7 @@ TEST_F(CodeCompletionsExtractor, CompletionChunksField)
|
||||
{CodeCompletionChunk::TypedText, Utf8StringLiteral("Field")}})));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, CompletionChunksEnumerator)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, CompletionChunksEnumerator)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(enumerationDocument, 20));
|
||||
|
||||
@@ -646,7 +648,7 @@ TEST_F(CodeCompletionsExtractor, CompletionChunksEnumerator)
|
||||
{CodeCompletionChunk::TypedText, Utf8StringLiteral("Enumerator")}})));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, CompletionChunksEnumeration)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, CompletionChunksEnumeration)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(enumerationDocument, 20));
|
||||
|
||||
@@ -656,7 +658,7 @@ TEST_F(CodeCompletionsExtractor, CompletionChunksEnumeration)
|
||||
CodeCompletionChunks({{CodeCompletionChunk::TypedText, Utf8StringLiteral("Enumeration")}})));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, DISABLED_ON_WINDOWS(CompletionChunksClass))
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, DISABLED_ON_WINDOWS(CompletionChunksClass))
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(classDocument, 20));
|
||||
|
||||
@@ -666,7 +668,7 @@ TEST_F(CodeCompletionsExtractor, DISABLED_ON_WINDOWS(CompletionChunksClass))
|
||||
CodeCompletionChunks({{CodeCompletionChunk::TypedText, Utf8StringLiteral("Class")}})));
|
||||
}
|
||||
|
||||
TEST_F(CodeCompletionsExtractor, BriefComment)
|
||||
TEST_F(CodeCompletionsExtractorSlowTest, BriefComment)
|
||||
{
|
||||
ClangCodeCompleteResults completeResults(getResults(briefCommentDocument, 10, 1,
|
||||
/*needsReparse=*/ true));
|
||||
|
@@ -71,7 +71,9 @@ protected:
|
||||
const QString dummyProjectPartName;
|
||||
};
|
||||
|
||||
TEST_F(ProjectFileCategorizer, C)
|
||||
using ProjectFileCategorizerVerySlowTest = ProjectFileCategorizer;
|
||||
|
||||
TEST_F(ProjectFileCategorizerVerySlowTest, C)
|
||||
{
|
||||
const QStringList inputFilePaths = QStringList() << "foo.c" << "foo.h";
|
||||
const ProjectFiles expected {
|
||||
@@ -87,7 +89,7 @@ TEST_F(ProjectFileCategorizer, C)
|
||||
ASSERT_TRUE(categorizer.objcxxSources().isEmpty());
|
||||
}
|
||||
|
||||
TEST_F(ProjectFileCategorizer, CxxWithUnambiguousHeaderSuffix)
|
||||
TEST_F(ProjectFileCategorizerVerySlowTest, CxxWithUnambiguousHeaderSuffix)
|
||||
{
|
||||
const QStringList inputFilePaths = QStringList() << "foo.cpp" << "foo.hpp";
|
||||
const ProjectFiles expected {
|
||||
@@ -103,7 +105,7 @@ TEST_F(ProjectFileCategorizer, CxxWithUnambiguousHeaderSuffix)
|
||||
ASSERT_TRUE(categorizer.objcxxSources().isEmpty());
|
||||
}
|
||||
|
||||
TEST_F(ProjectFileCategorizer, CxxWithAmbiguousHeaderSuffix)
|
||||
TEST_F(ProjectFileCategorizerVerySlowTest, CxxWithAmbiguousHeaderSuffix)
|
||||
{
|
||||
const QStringList inputFilePaths = QStringList() << "foo.cpp" << "foo.h";
|
||||
const ProjectFiles expected {
|
||||
@@ -119,7 +121,7 @@ TEST_F(ProjectFileCategorizer, CxxWithAmbiguousHeaderSuffix)
|
||||
ASSERT_TRUE(categorizer.objcxxSources().isEmpty());
|
||||
}
|
||||
|
||||
TEST_F(ProjectFileCategorizer, ObjectiveC)
|
||||
TEST_F(ProjectFileCategorizerVerySlowTest, ObjectiveC)
|
||||
{
|
||||
const QStringList inputFilePaths = QStringList() << "foo.m" << "foo.h";
|
||||
const ProjectFiles expected {
|
||||
@@ -135,7 +137,7 @@ TEST_F(ProjectFileCategorizer, ObjectiveC)
|
||||
ASSERT_TRUE(categorizer.objcxxSources().isEmpty());
|
||||
}
|
||||
|
||||
TEST_F(ProjectFileCategorizer, ObjectiveCxx)
|
||||
TEST_F(ProjectFileCategorizerVerySlowTest, ObjectiveCxx)
|
||||
{
|
||||
const QStringList inputFilePaths = QStringList() << "foo.mm" << "foo.h";
|
||||
const ProjectFiles expected {
|
||||
@@ -151,7 +153,7 @@ TEST_F(ProjectFileCategorizer, ObjectiveCxx)
|
||||
ASSERT_TRUE(categorizer.cxxSources().isEmpty());
|
||||
}
|
||||
|
||||
TEST_F(ProjectFileCategorizer, MixedCAndCxx)
|
||||
TEST_F(ProjectFileCategorizerVerySlowTest, MixedCAndCxx)
|
||||
{
|
||||
const QStringList inputFilePaths = QStringList() << "foo.cpp" << "foo.h"
|
||||
<< "bar.c" << "bar.h";
|
||||
@@ -174,7 +176,7 @@ TEST_F(ProjectFileCategorizer, MixedCAndCxx)
|
||||
ASSERT_TRUE(categorizer.objcxxSources().isEmpty());
|
||||
}
|
||||
|
||||
TEST_F(ProjectFileCategorizer, AmbiguousHeaderOnly)
|
||||
TEST_F(ProjectFileCategorizerVerySlowTest, AmbiguousHeaderOnly)
|
||||
{
|
||||
::ProjectFileCategorizer categorizer{dummyProjectPartName, QStringList() << "foo.h"};
|
||||
|
||||
|
@@ -120,7 +120,9 @@ protected:
|
||||
DiagnosticContainer expectedDiagnostic(ChildMode childMode) const;
|
||||
};
|
||||
|
||||
TEST_F(Diagnostic, MoveContructor)
|
||||
using DiagnosticSlowTest = Diagnostic;
|
||||
|
||||
TEST_F(DiagnosticSlowTest, MoveContructor)
|
||||
{
|
||||
const auto diagnostic2 = std::move(d->d->diagnostic);
|
||||
|
||||
@@ -128,7 +130,7 @@ TEST_F(Diagnostic, MoveContructor)
|
||||
ASSERT_FALSE(diagnostic2.isNull());
|
||||
}
|
||||
|
||||
TEST_F(Diagnostic, MoveAssigment)
|
||||
TEST_F(DiagnosticSlowTest, MoveAssigment)
|
||||
{
|
||||
auto diagnostic2 = std::move(d->d->diagnostic);
|
||||
d->d->diagnostic = std::move(diagnostic2);
|
||||
@@ -137,53 +139,53 @@ TEST_F(Diagnostic, MoveAssigment)
|
||||
ASSERT_FALSE(d->d->diagnostic.isNull());
|
||||
}
|
||||
|
||||
TEST_F(Diagnostic, MoveSelfAssigment)
|
||||
TEST_F(DiagnosticSlowTest, MoveSelfAssigment)
|
||||
{
|
||||
d->d->diagnostic = std::move(d->d->diagnostic);
|
||||
|
||||
ASSERT_FALSE(d->d->diagnostic.isNull());
|
||||
}
|
||||
|
||||
TEST_F(Diagnostic, Text)
|
||||
TEST_F(DiagnosticSlowTest, Text)
|
||||
{
|
||||
ASSERT_THAT(d->d->diagnostic.text(), Utf8StringLiteral("warning: control reaches end of non-void function"));
|
||||
}
|
||||
|
||||
TEST_F(Diagnostic, Category)
|
||||
TEST_F(DiagnosticSlowTest, Category)
|
||||
{
|
||||
ASSERT_THAT(d->d->diagnostic.category(), Utf8StringLiteral("Semantic Issue"));
|
||||
}
|
||||
|
||||
TEST_F(Diagnostic, EnableOption)
|
||||
TEST_F(DiagnosticSlowTest, EnableOption)
|
||||
{
|
||||
ASSERT_THAT(d->d->diagnostic.options().first, Utf8StringLiteral("-Wreturn-type"));
|
||||
}
|
||||
|
||||
TEST_F(Diagnostic, DisableOption)
|
||||
TEST_F(DiagnosticSlowTest, DisableOption)
|
||||
{
|
||||
ASSERT_THAT(d->d->diagnostic.options().second, Utf8StringLiteral("-Wno-return-type"));
|
||||
}
|
||||
|
||||
TEST_F(Diagnostic, Severity)
|
||||
TEST_F(DiagnosticSlowTest, Severity)
|
||||
{
|
||||
ASSERT_THAT(d->d->diagnostic.severity(), DiagnosticSeverity::Warning);
|
||||
}
|
||||
|
||||
TEST_F(Diagnostic, ChildDiagnosticsSize)
|
||||
TEST_F(DiagnosticSlowTest, ChildDiagnosticsSize)
|
||||
{
|
||||
auto diagnostic = d->d->diagnosticSet.back();
|
||||
|
||||
ASSERT_THAT(diagnostic.childDiagnostics().size(), 1);
|
||||
}
|
||||
|
||||
TEST_F(Diagnostic, ChildDiagnosticsText)
|
||||
TEST_F(DiagnosticSlowTest, ChildDiagnosticsText)
|
||||
{
|
||||
auto childDiagnostic = d->d->diagnosticSet.back().childDiagnostics().front();
|
||||
|
||||
ASSERT_THAT(childDiagnostic.text(), Utf8StringLiteral("note: candidate function not viable: requires 1 argument, but 0 were provided"));
|
||||
}
|
||||
|
||||
TEST_F(Diagnostic, toDiagnosticContainerLetChildrenThroughByDefault)
|
||||
TEST_F(DiagnosticSlowTest, toDiagnosticContainerLetChildrenThroughByDefault)
|
||||
{
|
||||
const auto diagnosticWithChild = expectedDiagnostic(WithChild);
|
||||
|
||||
|
@@ -81,7 +81,9 @@ protected:
|
||||
DiagnosticContainer expectedDiagnostic(ChildMode childMode) const;
|
||||
};
|
||||
|
||||
TEST_F(DiagnosticSet, SetHasContent)
|
||||
using DiagnosticSetSlowTest = DiagnosticSet;
|
||||
|
||||
TEST_F(DiagnosticSetSlowTest, SetHasContent)
|
||||
{
|
||||
document.parse();
|
||||
const auto set = document.translationUnit().diagnostics();
|
||||
@@ -89,7 +91,7 @@ TEST_F(DiagnosticSet, SetHasContent)
|
||||
ASSERT_THAT(set.size(), 1);
|
||||
}
|
||||
|
||||
TEST_F(DiagnosticSet, MoveConstructor)
|
||||
TEST_F(DiagnosticSetSlowTest, MoveConstructor)
|
||||
{
|
||||
document.parse();
|
||||
auto set = document.translationUnit().diagnostics();
|
||||
@@ -100,7 +102,7 @@ TEST_F(DiagnosticSet, MoveConstructor)
|
||||
ASSERT_FALSE(set2.isNull());
|
||||
}
|
||||
|
||||
TEST_F(DiagnosticSet, MoveAssigment)
|
||||
TEST_F(DiagnosticSetSlowTest, MoveAssigment)
|
||||
{
|
||||
document.parse();
|
||||
auto set = document.translationUnit().diagnostics();
|
||||
@@ -112,7 +114,7 @@ TEST_F(DiagnosticSet, MoveAssigment)
|
||||
ASSERT_FALSE(set.isNull());
|
||||
}
|
||||
|
||||
TEST_F(DiagnosticSet, MoveSelfAssigment)
|
||||
TEST_F(DiagnosticSetSlowTest, MoveSelfAssigment)
|
||||
{
|
||||
document.parse();
|
||||
auto set = document.translationUnit().diagnostics();
|
||||
@@ -122,7 +124,7 @@ TEST_F(DiagnosticSet, MoveSelfAssigment)
|
||||
ASSERT_FALSE(set.isNull());
|
||||
}
|
||||
|
||||
TEST_F(DiagnosticSet, FirstElementEqualBegin)
|
||||
TEST_F(DiagnosticSetSlowTest, FirstElementEqualBegin)
|
||||
{
|
||||
document.parse();
|
||||
auto set = document.translationUnit().diagnostics();
|
||||
@@ -130,7 +132,7 @@ TEST_F(DiagnosticSet, FirstElementEqualBegin)
|
||||
ASSERT_TRUE(set.front() == *set.begin());
|
||||
}
|
||||
|
||||
TEST_F(DiagnosticSet, BeginIsUnequalEnd)
|
||||
TEST_F(DiagnosticSetSlowTest, BeginIsUnequalEnd)
|
||||
{
|
||||
document.parse();
|
||||
auto set = document.translationUnit().diagnostics();
|
||||
@@ -138,7 +140,7 @@ TEST_F(DiagnosticSet, BeginIsUnequalEnd)
|
||||
ASSERT_TRUE(set.begin() != set.end());
|
||||
}
|
||||
|
||||
TEST_F(DiagnosticSet, BeginPlusOneIsEqualEnd)
|
||||
TEST_F(DiagnosticSetSlowTest, BeginPlusOneIsEqualEnd)
|
||||
{
|
||||
document.parse();
|
||||
auto set = document.translationUnit().diagnostics();
|
||||
@@ -146,7 +148,7 @@ TEST_F(DiagnosticSet, BeginPlusOneIsEqualEnd)
|
||||
ASSERT_TRUE(++set.begin() == set.end());
|
||||
}
|
||||
|
||||
TEST_F(DiagnosticSet, ToDiagnosticContainersLetThroughByDefault)
|
||||
TEST_F(DiagnosticSetSlowTest, ToDiagnosticContainersLetThroughByDefault)
|
||||
{
|
||||
const auto diagnosticContainerWithoutChild = expectedDiagnostic(WithChild);
|
||||
documentMainFile.parse();
|
||||
@@ -156,7 +158,7 @@ TEST_F(DiagnosticSet, ToDiagnosticContainersLetThroughByDefault)
|
||||
ASSERT_THAT(diagnostics, Contains(IsDiagnosticContainer(diagnosticContainerWithoutChild)));
|
||||
}
|
||||
|
||||
TEST_F(DiagnosticSet, ToDiagnosticContainersFiltersOutTopLevelItem)
|
||||
TEST_F(DiagnosticSetSlowTest, ToDiagnosticContainersFiltersOutTopLevelItem)
|
||||
{
|
||||
documentMainFile.parse();
|
||||
const ::DiagnosticSet diagnosticSetWithChildren{documentMainFile.translationUnit().diagnostics()};
|
||||
|
@@ -78,7 +78,10 @@ protected:
|
||||
{"cc", "query_simplefunction.cpp"}};
|
||||
};
|
||||
|
||||
TEST_F(RefactoringServer, RequestSourceLocationsForRenamingMessage)
|
||||
using RefactoringServerSlowTest = RefactoringServer;
|
||||
using RefactoringServerVerySlowTest = RefactoringServer;
|
||||
|
||||
TEST_F(RefactoringServerSlowTest, RequestSourceLocationsForRenamingMessage)
|
||||
{
|
||||
RequestSourceLocationsForRenamingMessage requestSourceLocationsForRenamingMessage{{TESTDATA_DIR, "renamevariable.cpp"},
|
||||
1,
|
||||
@@ -102,7 +105,7 @@ TEST_F(RefactoringServer, RequestSourceLocationsForRenamingMessage)
|
||||
refactoringServer.requestSourceLocationsForRenamingMessage(std::move(requestSourceLocationsForRenamingMessage));
|
||||
}
|
||||
|
||||
TEST_F(RefactoringServer, RequestSingleSourceRangesAndDiagnosticsForQueryMessage)
|
||||
TEST_F(RefactoringServerSlowTest, RequestSingleSourceRangesAndDiagnosticsForQueryMessage)
|
||||
{
|
||||
RequestSourceRangesAndDiagnosticsForQueryMessage requestSourceRangesAndDiagnosticsForQueryMessage{"functionDecl()",
|
||||
{source.clone()},
|
||||
@@ -118,7 +121,7 @@ TEST_F(RefactoringServer, RequestSingleSourceRangesAndDiagnosticsForQueryMessage
|
||||
refactoringServer.requestSourceRangesAndDiagnosticsForQueryMessage(std::move(requestSourceRangesAndDiagnosticsForQueryMessage));
|
||||
}
|
||||
|
||||
TEST_F(RefactoringServer, RequestSingleSourceRangesAndDiagnosticsWithUnsavedContentForQueryMessage)
|
||||
TEST_F(RefactoringServerSlowTest, RequestSingleSourceRangesAndDiagnosticsWithUnsavedContentForQueryMessage)
|
||||
{
|
||||
Utils::SmallString unsavedContent{"void f();"};
|
||||
FileContainer source{{TESTDATA_DIR, "query_simplefunction.cpp"},
|
||||
@@ -141,7 +144,7 @@ TEST_F(RefactoringServer, RequestSingleSourceRangesAndDiagnosticsWithUnsavedCont
|
||||
refactoringServer.requestSourceRangesAndDiagnosticsForQueryMessage(std::move(requestSourceRangesAndDiagnosticsForQueryMessage));
|
||||
}
|
||||
|
||||
TEST_F(RefactoringServer, RequestTwoSourceRangesAndDiagnosticsForQueryMessage)
|
||||
TEST_F(RefactoringServerSlowTest, RequestTwoSourceRangesAndDiagnosticsForQueryMessage)
|
||||
{
|
||||
RequestSourceRangesAndDiagnosticsForQueryMessage requestSourceRangesAndDiagnosticsForQueryMessage{"functionDecl()",
|
||||
{source.clone(), source.clone()},
|
||||
@@ -157,7 +160,7 @@ TEST_F(RefactoringServer, RequestTwoSourceRangesAndDiagnosticsForQueryMessage)
|
||||
refactoringServer.requestSourceRangesAndDiagnosticsForQueryMessage(std::move(requestSourceRangesAndDiagnosticsForQueryMessage));
|
||||
}
|
||||
|
||||
TEST_F(RefactoringServer, RequestManySourceRangesAndDiagnosticsForQueryMessage)
|
||||
TEST_F(RefactoringServerVerySlowTest, RequestManySourceRangesAndDiagnosticsForQueryMessage)
|
||||
{
|
||||
std::vector<FileContainer> sources;
|
||||
std::fill_n(std::back_inserter(sources),
|
||||
@@ -184,7 +187,7 @@ TEST_F(RefactoringServer, CancelJobs)
|
||||
ASSERT_TRUE(refactoringServer.isCancelingJobs());
|
||||
}
|
||||
|
||||
TEST_F(RefactoringServer, PollEventLoopAsQueryIsRunning)
|
||||
TEST_F(RefactoringServerVerySlowTest, PollEventLoopAsQueryIsRunning)
|
||||
{
|
||||
std::vector<FileContainer> sources;
|
||||
std::fill_n(std::back_inserter(sources),
|
||||
|
@@ -72,7 +72,9 @@ protected:
|
||||
clang::SourceRange extendedSourceRange{startLocation, endLocation.getLocWithOffset(5)};
|
||||
};
|
||||
|
||||
TEST_F(SourceRangeExtractor, ExtractSourceRangeContainer)
|
||||
using SourceRangeExtractorSlowTest = SourceRangeExtractor;
|
||||
|
||||
TEST_F(SourceRangeExtractorSlowTest, ExtractSourceRangeContainer)
|
||||
{
|
||||
SourceRangeWithTextContainer sourceRangeContainer{1, 1, 1, 0, 1, 10, 9, Utils::SmallString("int value;")};
|
||||
|
||||
@@ -81,14 +83,14 @@ TEST_F(SourceRangeExtractor, ExtractSourceRangeContainer)
|
||||
ASSERT_THAT(extractor.sourceRangeWithTextContainers(), Contains(sourceRangeContainer));
|
||||
}
|
||||
|
||||
TEST_F(SourceRangeExtractor, ExtendedSourceRange)
|
||||
TEST_F(SourceRangeExtractorSlowTest, ExtendedSourceRange)
|
||||
{
|
||||
auto range = extractor.extendSourceRangeToLastTokenEnd(sourceRange);
|
||||
|
||||
ASSERT_THAT(range, extendedSourceRange);
|
||||
}
|
||||
|
||||
TEST_F(SourceRangeExtractor, FindStartOfLineInEmptyBuffer)
|
||||
TEST_F(SourceRangeExtractorSlowTest, FindStartOfLineInEmptyBuffer)
|
||||
{
|
||||
clang::StringRef text = "";
|
||||
|
||||
@@ -97,7 +99,7 @@ TEST_F(SourceRangeExtractor, FindStartOfLineInEmptyBuffer)
|
||||
ASSERT_THAT(found, StrEq(""));
|
||||
}
|
||||
|
||||
TEST_F(SourceRangeExtractor, FindStartOfLineInBufferInFirstLine)
|
||||
TEST_F(SourceRangeExtractorSlowTest, FindStartOfLineInBufferInFirstLine)
|
||||
{
|
||||
clang::StringRef text = "first line";
|
||||
|
||||
@@ -106,7 +108,7 @@ TEST_F(SourceRangeExtractor, FindStartOfLineInBufferInFirstLine)
|
||||
ASSERT_THAT(found, StrEq("first line"));
|
||||
}
|
||||
|
||||
TEST_F(SourceRangeExtractor, FindStartOfNewLineInBufferInSecondLine)
|
||||
TEST_F(SourceRangeExtractorSlowTest, FindStartOfNewLineInBufferInSecondLine)
|
||||
{
|
||||
clang::StringRef text = "first line\nsecond line";
|
||||
|
||||
@@ -115,7 +117,7 @@ TEST_F(SourceRangeExtractor, FindStartOfNewLineInBufferInSecondLine)
|
||||
ASSERT_THAT(found, StrEq("second line"));
|
||||
}
|
||||
|
||||
TEST_F(SourceRangeExtractor, FindStartOfCarriageReturnInBufferInSecondLine)
|
||||
TEST_F(SourceRangeExtractorSlowTest, FindStartOfCarriageReturnInBufferInSecondLine)
|
||||
{
|
||||
clang::StringRef text = "first line\rsecond line";
|
||||
|
||||
@@ -124,7 +126,7 @@ TEST_F(SourceRangeExtractor, FindStartOfCarriageReturnInBufferInSecondLine)
|
||||
ASSERT_THAT(found, StrEq("second line"));
|
||||
}
|
||||
|
||||
TEST_F(SourceRangeExtractor, FindStartOfNewLineCarriageReturnInBufferInSecondLine)
|
||||
TEST_F(SourceRangeExtractorSlowTest, FindStartOfNewLineCarriageReturnInBufferInSecondLine)
|
||||
{
|
||||
clang::StringRef text = "first line\n\rsecond line";
|
||||
|
||||
@@ -133,7 +135,7 @@ TEST_F(SourceRangeExtractor, FindStartOfNewLineCarriageReturnInBufferInSecondLin
|
||||
ASSERT_THAT(found, StrEq("second line"));
|
||||
}
|
||||
|
||||
TEST_F(SourceRangeExtractor, FindEndOfLineInEmptyBuffer)
|
||||
TEST_F(SourceRangeExtractorSlowTest, FindEndOfLineInEmptyBuffer)
|
||||
{
|
||||
clang::StringRef text = "";
|
||||
|
||||
@@ -142,7 +144,7 @@ TEST_F(SourceRangeExtractor, FindEndOfLineInEmptyBuffer)
|
||||
ASSERT_THAT(found, StrEq(""));
|
||||
}
|
||||
|
||||
TEST_F(SourceRangeExtractor, FindEndOfLineInBuffer)
|
||||
TEST_F(SourceRangeExtractorSlowTest, FindEndOfLineInBuffer)
|
||||
{
|
||||
clang::StringRef text = "first line";
|
||||
|
||||
@@ -151,7 +153,7 @@ TEST_F(SourceRangeExtractor, FindEndOfLineInBuffer)
|
||||
ASSERT_THAT(found, StrEq(""));
|
||||
}
|
||||
|
||||
TEST_F(SourceRangeExtractor, FindEndOfLineInBufferInFirstLineWithNewLine)
|
||||
TEST_F(SourceRangeExtractorSlowTest, FindEndOfLineInBufferInFirstLineWithNewLine)
|
||||
{
|
||||
clang::StringRef text = "first line\nsecond line\nthird line";
|
||||
|
||||
@@ -160,7 +162,7 @@ TEST_F(SourceRangeExtractor, FindEndOfLineInBufferInFirstLineWithNewLine)
|
||||
ASSERT_THAT(found, StrEq("\nthird line"));
|
||||
}
|
||||
|
||||
TEST_F(SourceRangeExtractor, FindEndOfLineInBufferInFirstLineWithCarriageReturn)
|
||||
TEST_F(SourceRangeExtractorSlowTest, FindEndOfLineInBufferInFirstLineWithCarriageReturn)
|
||||
{
|
||||
clang::StringRef text = "first line\rsecond line\rthird line";
|
||||
|
||||
@@ -169,7 +171,7 @@ TEST_F(SourceRangeExtractor, FindEndOfLineInBufferInFirstLineWithCarriageReturn)
|
||||
ASSERT_THAT(found, StrEq("\rthird line"));
|
||||
}
|
||||
|
||||
TEST_F(SourceRangeExtractor, EpandText)
|
||||
TEST_F(SourceRangeExtractorSlowTest, EpandText)
|
||||
{
|
||||
clang::StringRef text = "first line\nsecond line\nthird line\nforth line";
|
||||
|
||||
|
@@ -43,6 +43,8 @@ protected:
|
||||
::SqliteDatabaseBackend databaseBackend;
|
||||
};
|
||||
|
||||
using SqliteDatabaseBackendSlowTest = SqliteDatabaseBackend;
|
||||
|
||||
TEST_F(SqliteDatabaseBackend, OpenAlreadyOpenDatabase)
|
||||
{
|
||||
ASSERT_THROW(databaseBackend.open(databaseFilePath), SqliteException);
|
||||
@@ -64,7 +66,7 @@ TEST_F(SqliteDatabaseBackend, DefaultJournalMode)
|
||||
ASSERT_THAT(databaseBackend.journalMode(), JournalMode::Delete);
|
||||
}
|
||||
|
||||
TEST_F(SqliteDatabaseBackend, WalJournalMode)
|
||||
TEST_F(SqliteDatabaseBackendSlowTest, WalJournalMode)
|
||||
{
|
||||
databaseBackend.setJournalMode(JournalMode::Wal);
|
||||
|
||||
|
@@ -68,7 +68,7 @@ TEST(SymbolFinder, FileContentFilePath)
|
||||
ASSERT_THAT(fileContent.filePath, toNativePath("/tmp/data.cpp"));
|
||||
}
|
||||
|
||||
TEST(SymbolFinder, FindName)
|
||||
TEST(SymbolFinderSlowTest, FindName)
|
||||
{
|
||||
SymbolFinder finder(1, 5);
|
||||
finder.addFile(TESTDATA_DIR, "renamevariable.cpp", "int variable;", {"cc", "renamevariable.cpp"});
|
||||
@@ -78,7 +78,7 @@ TEST(SymbolFinder, FindName)
|
||||
ASSERT_THAT(finder.takeSymbolName(), "variable");
|
||||
}
|
||||
|
||||
TEST(SymbolFinder, FindNameInUnsavedFile)
|
||||
TEST(SymbolFinderSlowTest, FindNameInUnsavedFile)
|
||||
{
|
||||
SymbolFinder finder(1, 5);
|
||||
finder.addFile(TESTDATA_DIR, "renamevariable.cpp", "int newVariable;", {"cc", "renamevariable.cpp"});
|
||||
@@ -88,7 +88,7 @@ TEST(SymbolFinder, FindNameInUnsavedFile)
|
||||
ASSERT_THAT(finder.takeSymbolName(), "newVariable");
|
||||
}
|
||||
|
||||
TEST(SymbolFinder, FindUsrs)
|
||||
TEST(SymbolFinderSlowTest, FindUsrs)
|
||||
{
|
||||
SymbolFinder finder(1, 5);
|
||||
finder.addFile(TESTDATA_DIR, "renamevariable.cpp", "int variable;", {"cc", "renamevariable.cpp", "-std=c++14"});
|
||||
@@ -98,7 +98,7 @@ TEST(SymbolFinder, FindUsrs)
|
||||
ASSERT_THAT(finder.unifiedSymbolResolutions().front(), StrEq("c:@variable"));
|
||||
}
|
||||
|
||||
TEST(SymbolFinder, VariableDeclarationSourceLocations)
|
||||
TEST(SymbolFinderSlowTest, VariableDeclarationSourceLocations)
|
||||
{
|
||||
SymbolFinder finder(1, 5);
|
||||
finder.addFile(TESTDATA_DIR, "renamevariable.cpp", "", {"cc", "renamevariable.cpp", "-std=c++14"});
|
||||
@@ -110,7 +110,7 @@ TEST(SymbolFinder, VariableDeclarationSourceLocations)
|
||||
Contains(IsSourceLocation(3, 9))));
|
||||
}
|
||||
|
||||
TEST(SymbolFinder, VariableUsageSourceLocations)
|
||||
TEST(SymbolFinderSlowTest, VariableUsageSourceLocations)
|
||||
{
|
||||
SymbolFinder finder(3, 9);
|
||||
finder.addFile(TESTDATA_DIR, "renamevariable.cpp", "", {"cc", "renamevariable.cpp", "-std=c++14"});
|
||||
@@ -122,7 +122,7 @@ TEST(SymbolFinder, VariableUsageSourceLocations)
|
||||
Contains(IsSourceLocation(3, 9))));
|
||||
}
|
||||
|
||||
TEST(SymbolFinder, TemplateMemberVariableDeclarationSourceLocations)
|
||||
TEST(SymbolFinderSlowTest, TemplateMemberVariableDeclarationSourceLocations)
|
||||
{
|
||||
SymbolFinder finder(8, 18);
|
||||
finder.addFile(TESTDATA_DIR, "renamevariable.cpp", "", {"cc", "renamevariable.cpp", "-std=c++14"});
|
||||
@@ -135,7 +135,7 @@ TEST(SymbolFinder, TemplateMemberVariableDeclarationSourceLocations)
|
||||
Contains(IsSourceLocation(18, 19))));
|
||||
}
|
||||
|
||||
TEST(SymbolFinder, TemplateMemberVariableUsageSourceLocations)
|
||||
TEST(SymbolFinderSlowTest, TemplateMemberVariableUsageSourceLocations)
|
||||
{
|
||||
SymbolFinder finder(15, 14);
|
||||
finder.addFile(TESTDATA_DIR, "renamevariable.cpp", "", {"cc", "renamevariable.cpp", "-std=c++14"});
|
||||
@@ -148,7 +148,7 @@ TEST(SymbolFinder, TemplateMemberVariableUsageSourceLocations)
|
||||
Contains(IsSourceLocation(18, 19))));
|
||||
}
|
||||
|
||||
TEST(SymbolFinder, TemplateMemberVariableUsageInLambdaSourceLocations)
|
||||
TEST(SymbolFinderSlowTest, TemplateMemberVariableUsageInLambdaSourceLocations)
|
||||
{
|
||||
SymbolFinder finder(18, 19);
|
||||
finder.addFile(TESTDATA_DIR, "renamevariable.cpp", "", {"cc", "renamevariable.cpp", "-std=c++14"});
|
||||
@@ -161,7 +161,7 @@ TEST(SymbolFinder, TemplateMemberVariableUsageInLambdaSourceLocations)
|
||||
Contains(IsSourceLocation(18, 19))));
|
||||
}
|
||||
|
||||
TEST(SymbolFinder, CursorOverMacroDefintionSymbolName)
|
||||
TEST(SymbolFinderSlowTest, CursorOverMacroDefintionSymbolName)
|
||||
{
|
||||
SymbolFinder finder(1, 9);
|
||||
finder.addFile(TESTDATA_DIR, "symbolfinder_macro.cpp", "", {"cc", "symbolfinder_macro.cpp"});
|
||||
@@ -171,7 +171,7 @@ TEST(SymbolFinder, CursorOverMacroDefintionSymbolName)
|
||||
ASSERT_THAT(finder.takeSymbolName(), "Macro");
|
||||
}
|
||||
|
||||
TEST(SymbolFinder, CursorOverMacroExpansionSymbolName)
|
||||
TEST(SymbolFinderSlowTest, CursorOverMacroExpansionSymbolName)
|
||||
{
|
||||
SymbolFinder finder(10, 10);
|
||||
finder.addFile(TESTDATA_DIR, "symbolfinder_macro.cpp", "", {"cc", "symbolfinder_macro.cpp"});
|
||||
@@ -181,7 +181,7 @@ TEST(SymbolFinder, CursorOverMacroExpansionSymbolName)
|
||||
ASSERT_THAT(finder.takeSymbolName(), "Macro");
|
||||
}
|
||||
|
||||
TEST(SymbolFinder, FindMacroDefinition)
|
||||
TEST(SymbolFinderSlowTest, FindMacroDefinition)
|
||||
{
|
||||
SymbolFinder finder(1, 9);
|
||||
finder.addFile(TESTDATA_DIR, "symbolfinder_macro.cpp", "", {"cc", "symbolfinder_macro.cpp"});
|
||||
@@ -192,7 +192,7 @@ TEST(SymbolFinder, FindMacroDefinition)
|
||||
Contains(IsSourceLocation(1, 9)));
|
||||
}
|
||||
|
||||
TEST(SymbolFinder, FindMacroExpansion)
|
||||
TEST(SymbolFinderSlowTest, FindMacroExpansion)
|
||||
{
|
||||
SymbolFinder finder(1, 9);
|
||||
finder.addFile(TESTDATA_DIR, "symbolfinder_macro.cpp", "", {"cc", "symbolfinder_macro.cpp"});
|
||||
@@ -203,7 +203,7 @@ TEST(SymbolFinder, FindMacroExpansion)
|
||||
Contains(IsSourceLocation(5, 17)));
|
||||
}
|
||||
|
||||
TEST(SymbolFinder, DoNotFindUndedefinedMacroExpansion)
|
||||
TEST(SymbolFinderSlowTest, DoNotFindUndedefinedMacroExpansion)
|
||||
{
|
||||
SymbolFinder finder(1, 9);
|
||||
finder.addFile(TESTDATA_DIR, "symbolfinder_macro.cpp", "", {"cc", "symbolfinder_macro.cpp"});
|
||||
@@ -214,7 +214,7 @@ TEST(SymbolFinder, DoNotFindUndedefinedMacroExpansion)
|
||||
Not(Contains(IsSourceLocation(10, 10))));
|
||||
}
|
||||
|
||||
TEST(SymbolFinder, FindMacroDefinitionFromMacroExpansion)
|
||||
TEST(SymbolFinderSlowTest, FindMacroDefinitionFromMacroExpansion)
|
||||
{
|
||||
SymbolFinder finder(10, 10);
|
||||
finder.addFile(TESTDATA_DIR, "symbolfinder_macro.cpp", "", {"cc", "symbolfinder_macro.cpp"});
|
||||
@@ -226,7 +226,7 @@ TEST(SymbolFinder, FindMacroDefinitionFromMacroExpansion)
|
||||
}
|
||||
|
||||
|
||||
TEST(SymbolFinder, FindMacroExpansionBeforeMacroExpansionWithCursor)
|
||||
TEST(SymbolFinderSlowTest, FindMacroExpansionBeforeMacroExpansionWithCursor)
|
||||
{
|
||||
SymbolFinder finder(12, 10);
|
||||
finder.addFile(TESTDATA_DIR, "symbolfinder_macro.cpp", "", {"cc", "symbolfinder_macro.cpp"});
|
||||
@@ -237,7 +237,7 @@ TEST(SymbolFinder, FindMacroExpansionBeforeMacroExpansionWithCursor)
|
||||
Contains(IsSourceLocation(10, 10)));
|
||||
}
|
||||
|
||||
TEST(SymbolFinder, FindMacroExpansionAfterMacroExpansionWithCursor)
|
||||
TEST(SymbolFinderSlowTest, FindMacroExpansionAfterMacroExpansionWithCursor)
|
||||
{
|
||||
SymbolFinder finder(10, 10);
|
||||
finder.addFile(TESTDATA_DIR, "symbolfinder_macro.cpp", "", {"cc", "symbolfinder_macro.cpp"});
|
||||
|
@@ -59,7 +59,9 @@ protected:
|
||||
Utf8String filePath = Utf8StringLiteral(TESTDATA_DIR"/translationunits.cpp");
|
||||
};
|
||||
|
||||
TEST_F(TranslationUnitUpdater, ParsesIfNeeded)
|
||||
using TranslationUnitUpdaterSlowTest = TranslationUnitUpdater;
|
||||
|
||||
TEST_F(TranslationUnitUpdaterSlowTest, ParsesIfNeeded)
|
||||
{
|
||||
::TranslationUnitUpdater updater = createUpdater(createInput());
|
||||
|
||||
@@ -69,7 +71,7 @@ TEST_F(TranslationUnitUpdater, ParsesIfNeeded)
|
||||
ASSERT_FALSE(result.hasReparsed());
|
||||
}
|
||||
|
||||
TEST_F(TranslationUnitUpdater, ReparsesIfNeeded)
|
||||
TEST_F(TranslationUnitUpdaterSlowTest, ReparsesIfNeeded)
|
||||
{
|
||||
::TranslationUnitUpdater updater = createUpdater(createInput(SetReparseNeeded));
|
||||
|
||||
@@ -78,7 +80,7 @@ TEST_F(TranslationUnitUpdater, ReparsesIfNeeded)
|
||||
ASSERT_TRUE(result.hasReparsed());
|
||||
}
|
||||
|
||||
TEST_F(TranslationUnitUpdater, PropagatesTranslationUnitId)
|
||||
TEST_F(TranslationUnitUpdaterSlowTest, PropagatesTranslationUnitId)
|
||||
{
|
||||
const Utf8String translationUnitId = Utf8StringLiteral("myId");
|
||||
::TranslationUnitUpdater updater = createUpdater(createInput(SetReparseNeeded), translationUnitId);
|
||||
@@ -88,7 +90,7 @@ TEST_F(TranslationUnitUpdater, PropagatesTranslationUnitId)
|
||||
ASSERT_THAT(result.translationUnitId, Eq(translationUnitId));
|
||||
}
|
||||
|
||||
TEST_F(TranslationUnitUpdater, UpdatesParseTimePoint)
|
||||
TEST_F(TranslationUnitUpdaterSlowTest, UpdatesParseTimePoint)
|
||||
{
|
||||
::TranslationUnitUpdater updater = createUpdater(createInput());
|
||||
const TimePoint now = Clock::now();
|
||||
@@ -99,7 +101,7 @@ TEST_F(TranslationUnitUpdater, UpdatesParseTimePoint)
|
||||
ASSERT_THAT(result.parseTimePoint, Gt(now));
|
||||
}
|
||||
|
||||
TEST_F(TranslationUnitUpdater, NotUpdatingParseTimePointForReparseOnly)
|
||||
TEST_F(TranslationUnitUpdaterSlowTest, NotUpdatingParseTimePointForReparseOnly)
|
||||
{
|
||||
::TranslationUnitUpdater updater = createUpdater(createInput());
|
||||
TranslationUnitUpdateResult result = updater.update(::TranslationUnitUpdater::UpdateMode::AsNeeded);
|
||||
@@ -111,7 +113,7 @@ TEST_F(TranslationUnitUpdater, NotUpdatingParseTimePointForReparseOnly)
|
||||
ASSERT_FALSE(result.hasParsed());
|
||||
}
|
||||
|
||||
TEST_F(TranslationUnitUpdater, UpdatesDependendOnFilesOnParse)
|
||||
TEST_F(TranslationUnitUpdaterSlowTest, UpdatesDependendOnFilesOnParse)
|
||||
{
|
||||
::TranslationUnitUpdater updater = createUpdater(createInput());
|
||||
|
||||
|
@@ -26,7 +26,6 @@ unix: DEFINES += ECHOSERVER=\"R\\\"xxx($$OUT_PWD/../echoserver/echo)xxx\\\"\"
|
||||
|
||||
SOURCES += \
|
||||
clientserverinprocess-test.cpp \
|
||||
clientserveroutsideprocess.cpp \
|
||||
lineprefixer-test.cpp \
|
||||
cppprojectfilecategorizer-test.cpp \
|
||||
cppbaseprojectpartbuilder-test.cpp \
|
||||
@@ -40,7 +39,12 @@ SOURCES += \
|
||||
unittests-main.cpp \
|
||||
utf8-test.cpp \
|
||||
gtest-qt-printing.cpp \
|
||||
gtest-creator-printing.cpp
|
||||
gtest-creator-printing.cpp \
|
||||
clangparsesupportivetranslationunitjob-test.cpp \
|
||||
clangreparsesupportivetranslationunitjob-test.cpp \
|
||||
clangsupportivetranslationunitinitializer-test.cpp \
|
||||
codecompleter-test.cpp \
|
||||
clientserveroutsideprocess-test.cpp
|
||||
|
||||
!isEmpty(LIBCLANG_LIBS) {
|
||||
SOURCES += \
|
||||
@@ -62,16 +66,12 @@ SOURCES += \
|
||||
clangisdiagnosticrelatedtolocation-test.cpp \
|
||||
clangjobqueue-test.cpp \
|
||||
clangjobs-test.cpp \
|
||||
clangparsesupportivetranslationunitjobtest.cpp \
|
||||
clangreparsesupportivetranslationunitjobtest.cpp \
|
||||
clangrequestdocumentannotationsjob-test.cpp \
|
||||
clangsupportivetranslationunitinitializertest.cpp \
|
||||
clangstring-test.cpp \
|
||||
clangtranslationunit-test.cpp \
|
||||
clangtranslationunits-test.cpp \
|
||||
clangupdatedocumentannotationsjob-test.cpp \
|
||||
codecompletionsextractor-test.cpp \
|
||||
codecompletion-test.cpp \
|
||||
completionchunkstotextconverter-test.cpp \
|
||||
createtablesqlstatementbuilder-test.cpp \
|
||||
cursor-test.cpp \
|
||||
|
Reference in New Issue
Block a user