diff options
author | Marco Bubke <marco.bubke@theqtcompany.com> | 2015-10-13 12:54:22 +0200 |
---|---|---|
committer | Marco Bubke <marco.bubke@theqtcompany.com> | 2015-10-13 11:56:51 +0000 |
commit | 0eaa9f668cff39967ccdc5947afc7a2ad540500f (patch) | |
tree | 25ec63da9638db968dc16f43a00acb21fcbc9ee0 /tests | |
parent | 08ca3eb480526bf81e7b9eded7382d32ccca5a66 (diff) | |
download | qt-creator-0eaa9f668cff39967ccdc5947afc7a2ad540500f.tar.gz |
Clang: Improve diagnostic update timer
Start the timer after a translation unit change and stop after every
diagnostic is sent. We should decrease the interval as we are
sending the diagnostics because otherwise the sending is delayed to much.
If the file watcher is emitting a file change we should only react
to changes of files which have no editor open.
Change-Id: I5431b4bf6b4c0b825bfc74bb9c697bb2d198fa26
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/unittest/translationunitstest.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/unit/unittest/translationunitstest.cpp b/tests/unit/unittest/translationunitstest.cpp index 7cc2da8a32..a5efcfca45 100644 --- a/tests/unit/unittest/translationunitstest.cpp +++ b/tests/unit/unittest/translationunitstest.cpp @@ -238,6 +238,16 @@ TEST_F(TranslationUnits, RemoveAllValidIfExceptionIsThrown) translationUnits)))); } +TEST_F(TranslationUnits, HasTranslationUnit) +{ + translationUnits.createOrUpdate({{filePath, projectPartId}}); + + ASSERT_TRUE(translationUnits.hasTranslationUnit(filePath)); } +TEST_F(TranslationUnits, HasNotTranslationUnit) +{ + ASSERT_FALSE(translationUnits.hasTranslationUnit(filePath)); +} +} |