diff options
author | Marco Bubke <marco.bubke@qt.io> | 2017-01-04 11:39:17 +0100 |
---|---|---|
committer | Marco Bubke <marco.bubke@qt.io> | 2017-01-04 12:35:52 +0000 |
commit | ada5ea19522ecf01dfe52e1170046b7a1be76113 (patch) | |
tree | 1491b23291530300ce9182c9e9c8313e8ade5287 /tests/unit/unittest/clangdocuments-test.cpp | |
parent | 719e6e0aff413f11e525c375886b760410f20365 (diff) | |
download | qt-creator-ada5ea19522ecf01dfe52e1170046b7a1be76113.tar.gz |
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>
Diffstat (limited to 'tests/unit/unittest/clangdocuments-test.cpp')
-rw-r--r-- | tests/unit/unittest/clangdocuments-test.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/unit/unittest/clangdocuments-test.cpp b/tests/unit/unittest/clangdocuments-test.cpp index 688d5ed32c..4380da86b5 100644 --- a/tests/unit/unittest/clangdocuments-test.cpp +++ b/tests/unit/unittest/clangdocuments-test.cpp @@ -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); |