From 62f62fd3e1b269e0b05fe419fa64e70c255e9179 Mon Sep 17 00:00:00 2001 From: Balazs Keri <1.int32@gmail.com> Date: Thu, 5 Sep 2019 07:59:45 +0000 Subject: [PATCH] Rename of constants in ASTImporterVisibilityTest. NFC. Reviewers: martong, a.sidorin, shafik Reviewed By: shafik Subscribers: shafik, rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67174 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@371021 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/AST/ASTImporterVisibilityTest.cpp | 102 +++++++++++--------- 1 file changed, 55 insertions(+), 47 deletions(-) diff --git a/unittests/AST/ASTImporterVisibilityTest.cpp b/unittests/AST/ASTImporterVisibilityTest.cpp index f7b0323dd9..1f60f1758b 100644 --- a/unittests/AST/ASTImporterVisibilityTest.cpp +++ b/unittests/AST/ASTImporterVisibilityTest.cpp @@ -290,75 +290,83 @@ TEST_P(ImportTypedefNameVisibility, ImportAfterImport) { TypedTest_ImportAfterImportWithMerge(); } -const bool ExpectLink = true; -const bool ExpectNotLink = false; +const bool ExpectLinkedDeclChain = true; +const bool ExpectUnlinkedDeclChain = false; INSTANTIATE_TEST_CASE_P( ParameterizedTests, ImportFunctionsVisibility, ::testing::Combine( DefaultTestValuesForRunOptions, - ::testing::Values(std::make_tuple(ExternF, ExternF, ExpectLink), - std::make_tuple(ExternF, StaticF, ExpectNotLink), - std::make_tuple(ExternF, AnonF, ExpectNotLink), - std::make_tuple(StaticF, ExternF, ExpectNotLink), - std::make_tuple(StaticF, StaticF, ExpectNotLink), - std::make_tuple(StaticF, AnonF, ExpectNotLink), - std::make_tuple(AnonF, ExternF, ExpectNotLink), - std::make_tuple(AnonF, StaticF, ExpectNotLink), - std::make_tuple(AnonF, AnonF, ExpectNotLink))), ); + ::testing::Values( + std::make_tuple(ExternF, ExternF, ExpectLinkedDeclChain), + std::make_tuple(ExternF, StaticF, ExpectUnlinkedDeclChain), + std::make_tuple(ExternF, AnonF, ExpectUnlinkedDeclChain), + std::make_tuple(StaticF, ExternF, ExpectUnlinkedDeclChain), + std::make_tuple(StaticF, StaticF, ExpectUnlinkedDeclChain), + std::make_tuple(StaticF, AnonF, ExpectUnlinkedDeclChain), + std::make_tuple(AnonF, ExternF, ExpectUnlinkedDeclChain), + std::make_tuple(AnonF, StaticF, ExpectUnlinkedDeclChain), + std::make_tuple(AnonF, AnonF, ExpectUnlinkedDeclChain))), ); INSTANTIATE_TEST_CASE_P( ParameterizedTests, ImportVariablesVisibility, ::testing::Combine( DefaultTestValuesForRunOptions, - ::testing::Values(std::make_tuple(ExternV, ExternV, ExpectLink), - std::make_tuple(ExternV, StaticV, ExpectNotLink), - std::make_tuple(ExternV, AnonV, ExpectNotLink), - std::make_tuple(StaticV, ExternV, ExpectNotLink), - std::make_tuple(StaticV, StaticV, ExpectNotLink), - std::make_tuple(StaticV, AnonV, ExpectNotLink), - std::make_tuple(AnonV, ExternV, ExpectNotLink), - std::make_tuple(AnonV, StaticV, ExpectNotLink), - std::make_tuple(AnonV, AnonV, ExpectNotLink))), ); + ::testing::Values( + std::make_tuple(ExternV, ExternV, ExpectLinkedDeclChain), + std::make_tuple(ExternV, StaticV, ExpectUnlinkedDeclChain), + std::make_tuple(ExternV, AnonV, ExpectUnlinkedDeclChain), + std::make_tuple(StaticV, ExternV, ExpectUnlinkedDeclChain), + std::make_tuple(StaticV, StaticV, ExpectUnlinkedDeclChain), + std::make_tuple(StaticV, AnonV, ExpectUnlinkedDeclChain), + std::make_tuple(AnonV, ExternV, ExpectUnlinkedDeclChain), + std::make_tuple(AnonV, StaticV, ExpectUnlinkedDeclChain), + std::make_tuple(AnonV, AnonV, ExpectUnlinkedDeclChain))), ); INSTANTIATE_TEST_CASE_P( ParameterizedTests, ImportClassesVisibility, ::testing::Combine( DefaultTestValuesForRunOptions, - ::testing::Values(std::make_tuple(ExternC, ExternC, ExpectLink), - std::make_tuple(ExternC, AnonC, ExpectNotLink), - std::make_tuple(AnonC, ExternC, ExpectNotLink), - std::make_tuple(AnonC, AnonC, ExpectNotLink))), ); + ::testing::Values( + std::make_tuple(ExternC, ExternC, ExpectLinkedDeclChain), + std::make_tuple(ExternC, AnonC, ExpectUnlinkedDeclChain), + std::make_tuple(AnonC, ExternC, ExpectUnlinkedDeclChain), + std::make_tuple(AnonC, AnonC, ExpectUnlinkedDeclChain))), ); INSTANTIATE_TEST_CASE_P( ParameterizedTests, ImportEnumsVisibility, ::testing::Combine( DefaultTestValuesForRunOptions, - ::testing::Values(std::make_tuple(ExternE, ExternE, ExpectLink), - std::make_tuple(ExternE, AnonE, ExpectNotLink), - std::make_tuple(AnonE, ExternE, ExpectNotLink), - std::make_tuple(AnonE, AnonE, ExpectNotLink))), ); + ::testing::Values( + std::make_tuple(ExternE, ExternE, ExpectLinkedDeclChain), + std::make_tuple(ExternE, AnonE, ExpectUnlinkedDeclChain), + std::make_tuple(AnonE, ExternE, ExpectUnlinkedDeclChain), + std::make_tuple(AnonE, AnonE, ExpectUnlinkedDeclChain))), ); INSTANTIATE_TEST_CASE_P( ParameterizedTests, ImportTypedefNameVisibility, ::testing::Combine( DefaultTestValuesForRunOptions, ::testing::Values( - std::make_tuple(ExternTypedef, ExternTypedef, ExpectLink), - std::make_tuple(ExternTypedef, AnonTypedef, ExpectNotLink), - std::make_tuple(AnonTypedef, ExternTypedef, ExpectNotLink), - std::make_tuple(AnonTypedef, AnonTypedef, ExpectNotLink), - - std::make_tuple(ExternUsing, ExternUsing, ExpectLink), - std::make_tuple(ExternUsing, AnonUsing, ExpectNotLink), - std::make_tuple(AnonUsing, ExternUsing, ExpectNotLink), - std::make_tuple(AnonUsing, AnonUsing, ExpectNotLink), - - std::make_tuple(ExternUsing, ExternTypedef, ExpectLink), - std::make_tuple(ExternUsing, AnonTypedef, ExpectNotLink), - std::make_tuple(AnonUsing, ExternTypedef, ExpectNotLink), - std::make_tuple(AnonUsing, AnonTypedef, ExpectNotLink), - - std::make_tuple(ExternTypedef, ExternUsing, ExpectLink), - std::make_tuple(ExternTypedef, AnonUsing, ExpectNotLink), - std::make_tuple(AnonTypedef, ExternUsing, ExpectNotLink), - std::make_tuple(AnonTypedef, AnonUsing, ExpectNotLink))), ); + std::make_tuple(ExternTypedef, ExternTypedef, + ExpectLinkedDeclChain), + std::make_tuple(ExternTypedef, AnonTypedef, + ExpectUnlinkedDeclChain), + std::make_tuple(AnonTypedef, ExternTypedef, + ExpectUnlinkedDeclChain), + std::make_tuple(AnonTypedef, AnonTypedef, ExpectUnlinkedDeclChain), + + std::make_tuple(ExternUsing, ExternUsing, ExpectLinkedDeclChain), + std::make_tuple(ExternUsing, AnonUsing, ExpectUnlinkedDeclChain), + std::make_tuple(AnonUsing, ExternUsing, ExpectUnlinkedDeclChain), + std::make_tuple(AnonUsing, AnonUsing, ExpectUnlinkedDeclChain), + + std::make_tuple(ExternUsing, ExternTypedef, ExpectLinkedDeclChain), + std::make_tuple(ExternUsing, AnonTypedef, ExpectUnlinkedDeclChain), + std::make_tuple(AnonUsing, ExternTypedef, ExpectUnlinkedDeclChain), + std::make_tuple(AnonUsing, AnonTypedef, ExpectUnlinkedDeclChain), + + std::make_tuple(ExternTypedef, ExternUsing, ExpectLinkedDeclChain), + std::make_tuple(ExternTypedef, AnonUsing, ExpectUnlinkedDeclChain), + std::make_tuple(AnonTypedef, ExternUsing, ExpectUnlinkedDeclChain), + std::make_tuple(AnonTypedef, AnonUsing, + ExpectUnlinkedDeclChain))), ); } // end namespace ast_matchers } // end namespace clang -- 2.40.0