Commit 88e7af8a authored by Nikolai Kosjar's avatar Nikolai Kosjar

UnitTests: Disable related tests if suspend-patch is missing

Change-Id: Ifdccf2e5842aff13528e52caa4dfd3288214d723
Reviewed-by: Marco Bubke's avatarMarco Bubke <marco.bubke@qt.io>
parent 015f0c03
...@@ -183,7 +183,7 @@ TEST_F(DocumentSuspenderResumer, CategorizeWithMoreVisibleDocumentsThanHotDocume ...@@ -183,7 +183,7 @@ TEST_F(DocumentSuspenderResumer, CategorizeWithMoreVisibleDocumentsThanHotDocume
ASSERT_THAT(coldDocuments, IsEmpty()); ASSERT_THAT(coldDocuments, IsEmpty());
} }
TEST_F(DocumentSuspenderResumer, CreateSuspendJobForInvisible) TEST_F(DocumentSuspenderResumer, DISABLED_WITHOUT_SUSPEND_PATCH(CreateSuspendJobForInvisible))
{ {
Document document = documents.create({fileContainer1})[0]; Document document = documents.create({fileContainer1})[0];
document.setIsSuspended(false); document.setIsSuspended(false);
...@@ -199,7 +199,7 @@ TEST_F(DocumentSuspenderResumer, CreateSuspendJobForInvisible) ...@@ -199,7 +199,7 @@ TEST_F(DocumentSuspenderResumer, CreateSuspendJobForInvisible)
ASSERT_THAT(jobs, ContainerEq(expectedJobs)); ASSERT_THAT(jobs, ContainerEq(expectedJobs));
} }
TEST_F(DocumentSuspenderResumer, DoNotCreateSuspendJobForVisible) TEST_F(DocumentSuspenderResumer, DISABLED_WITHOUT_SUSPEND_PATCH(DoNotCreateSuspendJobForVisible))
{ {
Document document = documents.create({fileContainer1})[0]; Document document = documents.create({fileContainer1})[0];
document.setIsSuspended(false); document.setIsSuspended(false);
...@@ -210,7 +210,7 @@ TEST_F(DocumentSuspenderResumer, DoNotCreateSuspendJobForVisible) ...@@ -210,7 +210,7 @@ TEST_F(DocumentSuspenderResumer, DoNotCreateSuspendJobForVisible)
ASSERT_THAT(jobs, IsEmpty()); ASSERT_THAT(jobs, IsEmpty());
} }
TEST_F(DocumentSuspenderResumer, DoNotCreateSuspendJobForUnparsed) TEST_F(DocumentSuspenderResumer, DISABLED_WITHOUT_SUSPEND_PATCH(DoNotCreateSuspendJobForUnparsed))
{ {
Document document = documents.create({fileContainer1})[0]; Document document = documents.create({fileContainer1})[0];
document.setIsSuspended(false); document.setIsSuspended(false);
...@@ -221,7 +221,7 @@ TEST_F(DocumentSuspenderResumer, DoNotCreateSuspendJobForUnparsed) ...@@ -221,7 +221,7 @@ TEST_F(DocumentSuspenderResumer, DoNotCreateSuspendJobForUnparsed)
ASSERT_THAT(jobs, IsEmpty()); ASSERT_THAT(jobs, IsEmpty());
} }
TEST_F(DocumentSuspenderResumer, CreateSuspendJobsForDocumentWithSupportiveTranslationUnit) TEST_F(DocumentSuspenderResumer, DISABLED_WITHOUT_SUSPEND_PATCH(CreateSuspendJobsForDocumentWithSupportiveTranslationUnit))
{ {
Document document = documents.create({fileContainer1})[0]; Document document = documents.create({fileContainer1})[0];
document.setIsSuspended(false); document.setIsSuspended(false);
...@@ -238,7 +238,7 @@ TEST_F(DocumentSuspenderResumer, CreateSuspendJobsForDocumentWithSupportiveTrans ...@@ -238,7 +238,7 @@ TEST_F(DocumentSuspenderResumer, CreateSuspendJobsForDocumentWithSupportiveTrans
ASSERT_THAT(jobs, ContainerEq(expectedJobs)); ASSERT_THAT(jobs, ContainerEq(expectedJobs));
} }
TEST_F(DocumentSuspenderResumer, CreateResumeJob) TEST_F(DocumentSuspenderResumer, DISABLED_WITHOUT_SUSPEND_PATCH(CreateResumeJob))
{ {
Document document = documents.create({fileContainer1})[0]; Document document = documents.create({fileContainer1})[0];
document.setIsSuspended(true); document.setIsSuspended(true);
...@@ -252,7 +252,7 @@ TEST_F(DocumentSuspenderResumer, CreateResumeJob) ...@@ -252,7 +252,7 @@ TEST_F(DocumentSuspenderResumer, CreateResumeJob)
ASSERT_THAT(jobs, ContainerEq(expectedJobs)); ASSERT_THAT(jobs, ContainerEq(expectedJobs));
} }
TEST_F(DocumentSuspenderResumer, DoNotCreateResumeJobForInvisible) TEST_F(DocumentSuspenderResumer, DISABLED_WITHOUT_SUSPEND_PATCH(DoNotCreateResumeJobForInvisible))
{ {
Document document = documents.create({fileContainer1})[0]; Document document = documents.create({fileContainer1})[0];
document.setIsSuspended(true); document.setIsSuspended(true);
...@@ -263,7 +263,7 @@ TEST_F(DocumentSuspenderResumer, DoNotCreateResumeJobForInvisible) ...@@ -263,7 +263,7 @@ TEST_F(DocumentSuspenderResumer, DoNotCreateResumeJobForInvisible)
ASSERT_THAT(jobs, IsEmpty()); ASSERT_THAT(jobs, IsEmpty());
} }
TEST_F(DocumentSuspenderResumer, CreateResumeJobsForDocumentWithSupportiveTranslationUnit) TEST_F(DocumentSuspenderResumer, DISABLED_WITHOUT_SUSPEND_PATCH(CreateResumeJobsForDocumentWithSupportiveTranslationUnit))
{ {
Document document = documents.create({fileContainer1})[0]; Document document = documents.create({fileContainer1})[0];
document.setIsSuspended(true); document.setIsSuspended(true);
...@@ -279,7 +279,7 @@ TEST_F(DocumentSuspenderResumer, CreateResumeJobsForDocumentWithSupportiveTransl ...@@ -279,7 +279,7 @@ TEST_F(DocumentSuspenderResumer, CreateResumeJobsForDocumentWithSupportiveTransl
ASSERT_THAT(jobs, ContainerEq(expectedJobs)); ASSERT_THAT(jobs, ContainerEq(expectedJobs));
} }
TEST_F(DocumentSuspenderResumer, CreateSuspendAndResumeJobs) TEST_F(DocumentSuspenderResumer, DISABLED_WITHOUT_SUSPEND_PATCH(CreateSuspendAndResumeJobs))
{ {
Document hotDocument = documents.create({fileContainer1})[0]; Document hotDocument = documents.create({fileContainer1})[0];
hotDocument.setIsSuspended(true); hotDocument.setIsSuspended(true);
......
...@@ -58,7 +58,7 @@ TEST_F(SuspendDocumentJob, RunAsync) ...@@ -58,7 +58,7 @@ TEST_F(SuspendDocumentJob, RunAsync)
ASSERT_TRUE(waitUntilJobFinished(job)); ASSERT_TRUE(waitUntilJobFinished(job));
} }
TEST_F(SuspendDocumentJob, DocumentIsSuspendedAfterRun) TEST_F(SuspendDocumentJob, DISABLED_WITHOUT_SUSPEND_PATCH(DocumentIsSuspendedAfterRun))
{ {
document.parse(); document.parse();
job.setContext(jobContext); job.setContext(jobContext);
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#include <QtGlobal> #include <QtGlobal>
#include <clang-c/Index.h> #include <clang-c/Index.h>
#include <clangbackend_global.h>
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
# define DISABLED_ON_WINDOWS(x) DISABLED_##x # define DISABLED_ON_WINDOWS(x) DISABLED_##x
#else #else
...@@ -37,3 +39,9 @@ ...@@ -37,3 +39,9 @@
#else #else
# define DISABLED_ON_CLANG3(x) x # define DISABLED_ON_CLANG3(x) x
#endif #endif
#ifdef IS_SUSPEND_SUPPORTED
# define DISABLED_WITHOUT_SUSPEND_PATCH(x) x
#else
# define DISABLED_WITHOUT_SUSPEND_PATCH(x) DISABLED_##x
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment