diff options
Diffstat (limited to 'tests/unit/unittest/pchtaskgenerator-test.cpp')
-rw-r--r-- | tests/unit/unittest/pchtaskgenerator-test.cpp | 72 |
1 files changed, 34 insertions, 38 deletions
diff --git a/tests/unit/unittest/pchtaskgenerator-test.cpp b/tests/unit/unittest/pchtaskgenerator-test.cpp index a3ebb3c17b..08a0079ad8 100644 --- a/tests/unit/unittest/pchtaskgenerator-test.cpp +++ b/tests/unit/unittest/pchtaskgenerator-test.cpp @@ -91,46 +91,42 @@ TEST_F(PchTaskGenerator, AddProjectParts) mockPchTaskMerger, mergeTasks( ElementsAre(AllOf( - Field( - &PchTaskSet::system, - AllOf( - Field(&PchTask::projectPartIds, ElementsAre("ProjectPart1")), - Field(&PchTask::includes, ElementsAre(5)), - Field(&PchTask::allIncludes, IsEmpty()), - Field(&PchTask::compilerMacros, - ElementsAre(CompilerMacro{"SE", "4", 4}, CompilerMacro{"WU", "5", 5})), - Field(&PchTask::systemIncludeSearchPaths, - ElementsAre( - IncludeSearchPath{"/system/path", 2, IncludeSearchPathType::System}, - IncludeSearchPath{"/builtin/path", 3, IncludeSearchPathType::BuiltIn}, - IncludeSearchPath{"/framework/path", 1, IncludeSearchPathType::System})), - Field(&PchTask::projectIncludeSearchPaths, - ElementsAre(IncludeSearchPath{"/to/path1", 1, IncludeSearchPathType::User}, - IncludeSearchPath{"/to/path2", 2, IncludeSearchPathType::User})), - Field(&PchTask::toolChainArguments, ElementsAre("--yi")), - Field(&PchTask::language, Eq(Utils::Language::Cxx)), - Field(&PchTask::languageVersion, Eq(Utils::LanguageVersion::CXX11)), - Field(&PchTask::languageExtension, Eq(Utils::LanguageExtension::All)))), + Field(&PchTaskSet::system, + AllOf(Field(&PchTask::projectPartIds, ElementsAre("ProjectPart1")), + Field(&PchTask::includes, ElementsAre(5)), + Field(&PchTask::allIncludes, IsEmpty()), + Field(&PchTask::compilerMacros, + ElementsAre(CompilerMacro{"SE", "4", 4}, CompilerMacro{"WU", "5", 5})), + Field(&PchTask::systemIncludeSearchPaths, + ElementsAre( + IncludeSearchPath{"/system/path", 2, IncludeSearchPathType::System}, + IncludeSearchPath{"/builtin/path", 3, IncludeSearchPathType::BuiltIn}, + IncludeSearchPath{"/framework/path", 1, IncludeSearchPathType::System})), + Field(&PchTask::projectIncludeSearchPaths, IsEmpty()), + Field(&PchTask::toolChainArguments, ElementsAre("--yi")), + Field(&PchTask::language, Eq(Utils::Language::Cxx)), + Field(&PchTask::languageVersion, Eq(Utils::LanguageVersion::CXX11)), + Field(&PchTask::languageExtension, Eq(Utils::LanguageExtension::All)))), AllOf(Field( &PchTaskSet::project, - AllOf( - Field(&PchTask::projectPartIds, ElementsAre("ProjectPart1")), - Field(&PchTask::includes, ElementsAre(3)), - Field(&PchTask::allIncludes, ElementsAre(1, 2, 3, 4, 5)), - Field(&PchTask::compilerMacros, - ElementsAre(CompilerMacro{"YI", "1", 1}, CompilerMacro{"SAN", "3", 3})), - Field(&PchTask::systemIncludeSearchPaths, - ElementsAre( - IncludeSearchPath{"/system/path", 2, IncludeSearchPathType::System}, - IncludeSearchPath{"/builtin/path", 3, IncludeSearchPathType::BuiltIn}, - IncludeSearchPath{"/framework/path", 1, IncludeSearchPathType::System})), - Field(&PchTask::projectIncludeSearchPaths, - ElementsAre(IncludeSearchPath{"/to/path1", 1, IncludeSearchPathType::User}, - IncludeSearchPath{"/to/path2", 2, IncludeSearchPathType::User})), - Field(&PchTask::toolChainArguments, ElementsAre("--yi")), - Field(&PchTask::language, Eq(Utils::Language::Cxx)), - Field(&PchTask::languageVersion, Eq(Utils::LanguageVersion::CXX11)), - Field(&PchTask::languageExtension, Eq(Utils::LanguageExtension::All))))))), + AllOf(Field(&PchTask::projectPartIds, ElementsAre("ProjectPart1")), + Field(&PchTask::includes, ElementsAre(3)), + Field(&PchTask::allIncludes, ElementsAre(1, 2, 3, 4, 5)), + Field(&PchTask::compilerMacros, + ElementsAre(CompilerMacro{"YI", "1", 1}, CompilerMacro{"SAN", "3", 3})), + Field(&PchTask::systemIncludeSearchPaths, + ElementsAre( + IncludeSearchPath{"/system/path", 2, IncludeSearchPathType::System}, + IncludeSearchPath{"/builtin/path", 3, IncludeSearchPathType::BuiltIn}, + IncludeSearchPath{"/framework/path", 1, IncludeSearchPathType::System})), + Field(&PchTask::projectIncludeSearchPaths, + ElementsAre( + IncludeSearchPath{"/to/path1", 1, IncludeSearchPathType::User}, + IncludeSearchPath{"/to/path2", 2, IncludeSearchPathType::User})), + Field(&PchTask::toolChainArguments, ElementsAre("--yi")), + Field(&PchTask::language, Eq(Utils::Language::Cxx)), + Field(&PchTask::languageVersion, Eq(Utils::LanguageVersion::CXX11)), + Field(&PchTask::languageExtension, Eq(Utils::LanguageExtension::All))))))), ElementsAre(Eq("ToolChainArgument")))); generator.addProjectParts({projectPart1}, {"ToolChainArgument"}); |