ClangSupport: Fix CommandLineBuilder

Forgot to add macros.

Change-Id: I4a5ab969a6b99c110b3ffd9e8f2b59560ccfc8b9
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Marco Bubke
2019-01-23 18:54:48 +01:00
parent df8653dda9
commit 197f2b5f2a
3 changed files with 47 additions and 0 deletions

View File

@@ -509,4 +509,20 @@ TYPED_TEST(CommandLineBuilder, IncludePchPath)
"/source/file.cpp"));
}
TYPED_TEST(CommandLineBuilder, CompilerMacros)
{
this->emptyProjectInfo.compilerMacros = {{"YI", "1", 2}, {"ER", "2", 1}};
Builder<TypeParam> builder{this->emptyProjectInfo};
ASSERT_THAT(builder.commandLine,
ElementsAre("clang++",
"-x",
"c++-header",
"-std=c++98",
"-nostdinc",
"-nostdlibinc",
"-DER=2",
"-DYI=1"));
}
} // namespace