Clang: Print command line args for debugging

...if qtc.clangbackend.verboselib=true.

Change-Id: Ibba408db955892daf055b2050d810ce55b9d8913
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2015-11-06 11:16:53 +01:00
parent 23fa5a7efd
commit 2ca473d59e
5 changed files with 49 additions and 6 deletions

View File

@@ -28,6 +28,7 @@
**
****************************************************************************/
#include <commandlinearguments.h>
#include <diagnosticset.h>
#include <filecontainer.h>
#include <projectpart.h>
@@ -61,6 +62,7 @@ using ClangBackEnd::TranslationUnits;
using testing::IsNull;
using testing::NotNull;
using testing::Eq;
using testing::Gt;
using testing::Contains;
using testing::EndsWith;
@@ -148,6 +150,13 @@ TEST_F(TranslationUnit, ResetedTranslationUnitIsNull)
ASSERT_TRUE(translationUnit.isNull());
}
TEST_F(TranslationUnit, LastCommandLineArgumentIsFilePath)
{
const auto arguments = translationUnit.commandLineArguments();
ASSERT_THAT(arguments.at(arguments.count() - 1), Eq(translationUnitFilePath));
}
TEST_F(TranslationUnit, TimeStampForProjectPartChangeIsUpdatedAsNewCxTranslationUnitIsGenerated)
{
auto lastChangeTimePoint = translationUnit.lastProjectPartChangeTimePoint();