From 534d846067a4f6b40db62c8585d2e8d4d28f9a7b Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Fri, 13 Oct 2023 16:36:26 -0500 Subject: [PATCH] Revert changes in plugin.cc Signed-off-by: Addisu Z. Taddese --- test/integration/plugin.cc | 46 +++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/test/integration/plugin.cc b/test/integration/plugin.cc index 2f165212..f3933523 100644 --- a/test/integration/plugin.cc +++ b/test/integration/plugin.cc @@ -257,54 +257,54 @@ void TestSetAndMapUsage( const gz::plugin::PluginPtr &plugin) { PluginPtrType1 plugin1 = plugin; - PluginPtrType2 plugin3 = plugin1; + PluginPtrType2 plugin2 = plugin1; EXPECT_TRUE(plugin1 == plugin); - EXPECT_TRUE(plugin1 == plugin3); - EXPECT_FALSE(plugin1 != plugin3); + EXPECT_TRUE(plugin1 == plugin2); + EXPECT_FALSE(plugin1 != plugin2); - EXPECT_TRUE(plugin3 == plugin); - EXPECT_TRUE(plugin3 == plugin1); - EXPECT_FALSE(plugin3 != plugin1); + EXPECT_TRUE(plugin2 == plugin); + EXPECT_TRUE(plugin2 == plugin1); + EXPECT_FALSE(plugin2 != plugin1); std::set orderedSet; EXPECT_TRUE(orderedSet.insert(plugin1).second); EXPECT_FALSE(orderedSet.insert(plugin1).second); - EXPECT_FALSE(orderedSet.insert(plugin3).second); + EXPECT_FALSE(orderedSet.insert(plugin2).second); std::unordered_set unorderedSet; EXPECT_TRUE(unorderedSet.insert(plugin1).second); EXPECT_FALSE(unorderedSet.insert(plugin1).second); - EXPECT_FALSE(unorderedSet.insert(plugin3).second); + EXPECT_FALSE(unorderedSet.insert(plugin2).second); std::map orderedMap; EXPECT_TRUE(orderedMap.insert(std::make_pair(plugin1, "some string")).second); EXPECT_FALSE(orderedMap.insert(std::make_pair(plugin1, "a string")).second); - EXPECT_FALSE(orderedMap.insert(std::make_pair(plugin3, "chars")).second); + EXPECT_FALSE(orderedMap.insert(std::make_pair(plugin2, "chars")).second); std::unordered_map unorderedMap; EXPECT_TRUE(unorderedMap.insert(std::make_pair(plugin1, "strings")).second); EXPECT_FALSE(unorderedMap.insert(std::make_pair(plugin1, "letters")).second); - EXPECT_FALSE(unorderedMap.insert(std::make_pair(plugin3, "")).second); + EXPECT_FALSE(unorderedMap.insert(std::make_pair(plugin2, "")).second); - plugin3 = loader.Instantiate("test::util::DummyMultiPlugin"); - EXPECT_TRUE(plugin1 != plugin3); - EXPECT_FALSE(plugin1 == plugin3); - EXPECT_TRUE(plugin3 != plugin1); - EXPECT_FALSE(plugin3 == plugin1); + plugin2 = loader.Instantiate("test::util::DummyMultiPlugin"); + EXPECT_TRUE(plugin1 != plugin2); + EXPECT_FALSE(plugin1 == plugin2); + EXPECT_TRUE(plugin2 != plugin1); + EXPECT_FALSE(plugin2 == plugin1); - EXPECT_TRUE(orderedSet.insert(plugin3).second); - EXPECT_FALSE(orderedSet.insert(plugin3).second); + EXPECT_TRUE(orderedSet.insert(plugin2).second); + EXPECT_FALSE(orderedSet.insert(plugin2).second); - EXPECT_TRUE(unorderedSet.insert(plugin3).second); - EXPECT_FALSE(unorderedSet.insert(plugin3).second); + EXPECT_TRUE(unorderedSet.insert(plugin2).second); + EXPECT_FALSE(unorderedSet.insert(plugin2).second); - EXPECT_TRUE(orderedMap.insert(std::make_pair(plugin3, "letters")).second); - EXPECT_FALSE(orderedMap.insert(std::make_pair(plugin3, "chars")).second); + EXPECT_TRUE(orderedMap.insert(std::make_pair(plugin2, "letters")).second); + EXPECT_FALSE(orderedMap.insert(std::make_pair(plugin2, "chars")).second); - EXPECT_TRUE(unorderedMap.insert(std::make_pair(plugin3, "abc")).second); - EXPECT_FALSE(unorderedMap.insert(std::make_pair(plugin3, "def")).second); + EXPECT_TRUE(unorderedMap.insert(std::make_pair(plugin2, "abc")).second); + EXPECT_FALSE(unorderedMap.insert(std::make_pair(plugin2, "def")).second); } /////////////////////////////////////////////////