Add clang-format to repo
Add clang-format to repo.
Change-Id: Ib3f81524b66414df3e6c93d8a6df6e22c43841e0
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/test/utest.cpp b/test/utest.cpp
index 455179c..18a4341 100644
--- a/test/utest.cpp
+++ b/test/utest.cpp
@@ -1,22 +1,24 @@
-#include <set>
-#include <algorithm>
-#include <gtest/gtest.h>
-#include <sdbusplus/bus.hpp>
-#include "manager.hpp"
#include "led-test-map.hpp"
+#include "manager.hpp"
+
+#include <algorithm>
+#include <sdbusplus/bus.hpp>
+#include <set>
+
+#include <gtest/gtest.h>
using namespace phosphor::led;
class LedTest : public ::testing::Test
{
- public:
- sdbusplus::bus::bus bus;
- LedTest() : bus(sdbusplus::bus::new_default())
- {
- // Nothing here
- }
- ~LedTest()
- {
- // Leaving up to auto cleanup.
- }
+ public:
+ sdbusplus::bus::bus bus;
+ LedTest() : bus(sdbusplus::bus::new_default())
+ {
+ // Nothing here
+ }
+ ~LedTest()
+ {
+ // Leaving up to auto cleanup.
+ }
};
/** @brief Assert Single LED to On */
@@ -25,24 +27,24 @@
Manager manager(bus, singleLedOn);
{
// Assert the LEDs.
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/SingleLed";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::Blink},
+ {"One", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -56,24 +58,24 @@
Manager manager(bus, singleLedBlink);
{
// Assert the LEDs.
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/SingleLed";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
+ {"One", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -87,24 +89,24 @@
Manager manager(bus, singleLedOn);
{
// Assert the LEDs.
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/SingleLed";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::Blink},
+ {"One", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -112,12 +114,12 @@
}
{
// Assert the LEDs.
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/SingleLed";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
EXPECT_EQ(0, ledsAssert.size());
@@ -131,28 +133,26 @@
Manager manager(bus, multipleLedsOn);
{
// Assert the LEDs.
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLeds";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Two",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Three",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Three", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -166,28 +166,28 @@
Manager manager(bus, multipleLedsBlink);
{
// Assert the LEDs.
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLeds";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
- {"Two",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
- {"Three",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
+ {"One", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
+ {"Two", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
+ {"Three", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -201,28 +201,28 @@
Manager manager(bus, multipleLedsBlink);
{
// Assert the LEDs.
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLeds";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
- {"Two",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
- {"Three",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
+ {"One", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
+ {"Two", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
+ {"Three", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -230,28 +230,28 @@
}
{
// Assert the LEDs.
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLeds";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refDeAssert = {
- {"One",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
- {"Two",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
- {"Three",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
+ {"One", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
+ {"Two", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
+ {"Three", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
EXPECT_EQ(0, ledsAssert.size());
// difference of refDeAssert and ledsDeAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsDeAssert.begin(), ledsDeAssert.end(),
refDeAssert.begin(), refDeAssert.end(),
std::inserter(temp, temp.begin()));
@@ -265,28 +265,28 @@
Manager manager(bus, multipleLedsBlink);
{
// Assert the LEDs.
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLeds";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
- {"Two",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
- {"Three",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
+ {"One", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
+ {"Two", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
+ {"Three", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -294,28 +294,28 @@
}
{
// DeAssert the LEDs.
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLeds";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refDeAssert = {
- {"One",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
- {"Two",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
- {"Three",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
+ {"One", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
+ {"Two", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
+ {"Three", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
EXPECT_EQ(0, ledsAssert.size());
// difference of refDeAssert and ledsDeAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsDeAssert.begin(), ledsDeAssert.end(),
refDeAssert.begin(), refDeAssert.end(),
std::inserter(temp, temp.begin()));
@@ -323,12 +323,12 @@
}
{
// DeAssert the LEDs.
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLeds";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
EXPECT_EQ(0, ledsDeAssert.size());
EXPECT_EQ(0, ledsAssert.size());
@@ -341,32 +341,31 @@
Manager manager(bus, multipleLedsOnAndBlink);
{
// Assert the LEDs.
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsMix";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
- {"Two",phosphor::led::Layout::On,
- 0, phosphor::led::Layout::Blink},
- {"Three",phosphor::led::Layout::Blink,
- 0, phosphor::led::Layout::On},
- {"Four",phosphor::led::Layout::On,
- 0, phosphor::led::Layout::Blink},
- {"Five",phosphor::led::Layout::On,
- 0, phosphor::led::Layout::Blink},
+ {"One", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
+ {"Two", phosphor::led::Layout::On, 0, phosphor::led::Layout::Blink},
+ {"Three", phosphor::led::Layout::Blink, 0,
+ phosphor::led::Layout::On},
+ {"Four", phosphor::led::Layout::On, 0,
+ phosphor::led::Layout::Blink},
+ {"Five", phosphor::led::Layout::On, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -380,28 +379,27 @@
Manager manager(bus, twoGroupsWithDistinctLEDsOn);
{
// Assert Set-A
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::Blink},
- {"Two",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Three",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::Blink},
+ {"One", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::Blink},
+ {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Three", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -409,28 +407,27 @@
}
{
// Assert Set-B
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"Four",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::Blink},
- {"Five",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::Blink},
- {"Six",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"Four", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::Blink},
+ {"Five", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::Blink},
+ {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -444,28 +441,26 @@
Manager manager(bus, twoGroupsWithOneComonLEDOn);
{
// Assert Set-A
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Two",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Three",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Three", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -473,26 +468,25 @@
}
{
// Assert Set-B
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"Four",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Six",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"Four", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -507,28 +501,26 @@
Manager manager(bus, twoGroupsWithOneComonLEDOnOneLEDBlinkPriority);
{
// Assert Set-A
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Two",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Three",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
+ {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Three", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -536,27 +528,26 @@
}
{
// Assert Set-B
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
// Does not action on [Three] since priority is [Blink]
std::set<Layout::LedAction> refAssert = {
- {"Four",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Six",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"Four", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -564,27 +555,26 @@
}
{
// De-Assert Set-B
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsDeAssserted populated with these.
std::set<Layout::LedAction> refDeAssert = {
- {"Four",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Six",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"Four", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
};
EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
EXPECT_EQ(0, ledsAssert.size());
// difference of refDeAssert and ledsDeAssert must be null.
// [Three] is not touched since its already [Blink]
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsDeAssert.begin(), ledsDeAssert.end(),
refDeAssert.begin(), refDeAssert.end(),
std::inserter(temp, temp.begin()));
@@ -599,28 +589,26 @@
Manager manager(bus, twoGroupsWithOneComonLEDOnOneLEDBlinkPriority);
{
// Assert Set-A
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Two",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Three",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
+ {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Three", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -628,27 +616,26 @@
}
{
// Assert Set-B
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
// [Three] does not get actioned since it has Blink priority
std::set<Layout::LedAction> refAssert = {
- {"Four",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Six",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"Four", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -656,25 +643,23 @@
}
{
// De-Assert Set-A
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsDeAssserted populated with these.
std::set<Layout::LedAction> refDeAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Two",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
};
EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
// difference of refDeAssert and ledsDeAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsDeAssert.begin(), ledsDeAssert.end(),
refDeAssert.begin(), refDeAssert.end(),
std::inserter(temp, temp.begin()));
@@ -682,13 +667,13 @@
// Need just the ledsAssert populated with these.
std::set<Layout::LedAction> refAssert = {
- {"Three",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::Blink},
+ {"Three", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp1 {};
+ Manager::group temp1{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp1, temp1.begin()));
@@ -703,28 +688,26 @@
Manager manager(bus, twoGroupsWithOneComonLEDOnPriority);
{
// Assert Set-A
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true,
- ledsAssert, ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Two",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Three",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::On},
+ {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Three", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -732,56 +715,53 @@
}
{
// Assert Set-B
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
// Three is set to ON due to ON priority.
std::set<Layout::LedAction> refAssert = {
- {"Three",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Four",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Six",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"Three", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Four", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
}
{
// De-Assert Set-A
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsDeAssserted populated with these.
// [Three] stays in [On] since [B] has it [On]
std::set<Layout::LedAction> refDeAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Two",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
};
EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
EXPECT_EQ(0, ledsAssert.size());
// difference of refDeAssert and ledsDeAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsDeAssert.begin(), ledsDeAssert.end(),
refDeAssert.begin(), refDeAssert.end(),
std::inserter(temp, temp.begin()));
@@ -796,28 +776,26 @@
Manager manager(bus, twoGroupsWithOneComonLEDOnPriority);
{
// Assert Set-A
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Two",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Three",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::On},
+ {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Three", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -825,54 +803,52 @@
}
{
// Assert Set-B
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
// Three is set to ON due to ON priority.
std::set<Layout::LedAction> refAssert = {
- {"Three",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Four",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Six",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"Three", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Four", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
}
{
// De-Assert Set-B
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsDeAssserted populated with these.
std::set<Layout::LedAction> refDeAssert = {
- {"Four",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Six",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"Four", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
};
EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
// difference of refDeAssert and ledsDeAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsDeAssert.begin(), ledsDeAssert.end(),
refDeAssert.begin(), refDeAssert.end(),
std::inserter(temp, temp.begin()));
@@ -881,13 +857,13 @@
// Need just the ledsAssert populated with these.
// Since [Three] stood [On], need to go back to [Blink]
std::set<Layout::LedAction> refAssert = {
- {"Three",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::On},
+ {"Three", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp1 {};
+ Manager::group temp1{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -901,30 +877,28 @@
Manager manager(bus, twoGroupsWithMultiplComonLEDOn);
{
// Assert Set-B
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"Two",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Six",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Three",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Seven",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Three", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Seven", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -932,24 +906,23 @@
}
{
// Assert Set-A
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -957,31 +930,29 @@
}
{
// De-Assert Set-B
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsDeAssserted populated with these.
std::set<Layout::LedAction> refDeAssert = {
- {"Six",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Seven",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Seven", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
};
EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
EXPECT_EQ(0, ledsAssert.size());
// difference of refDeAssert and ledsDeAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsDeAssert.begin(), ledsDeAssert.end(),
refDeAssert.begin(), refDeAssert.end(),
std::inserter(temp, temp.begin()));
EXPECT_EQ(0, temp.size());
-
}
}
@@ -991,30 +962,28 @@
Manager manager(bus, twoGroupsWithMultipleComonLEDInDifferentState);
{
// Assert Set-B
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"Two",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Three",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::On},
- {"Five",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Six",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Three", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::On},
+ {"Five", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1022,28 +991,27 @@
}
{
// Assert Set-A
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these
// [Two] remains [On] due to higher priority.
// [Three] remains [Blink]
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Four",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Four", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1057,31 +1025,30 @@
Manager manager(bus, twoGroupsWithMultipleComonLEDInDifferentState);
{
// Assert Set-A
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.'Two' gets to Blink
// due to higher priority.
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Two",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::On},
- {"Three",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::On},
- {"Four",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::On},
+ {"Three", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::On},
+ {"Four", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1089,30 +1056,28 @@
}
{
// Assert Set-B
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
// [Three] remains [Blink] from previous
// [Two] moves to [On] from [Blink] due to [On] priority
std::set<Layout::LedAction> refAssert = {
- {"Two",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Five",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Six",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Five", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1123,35 +1088,35 @@
/** @brief Assert 2 groups having multiple LEDs common in different state
* DeAssert twice
*/
-TEST_F(LedTest, assertTwoGroupsWithMultipleComonLEDInDifferentStateAtoBDeAssertTwice)
+TEST_F(LedTest,
+ assertTwoGroupsWithMultipleComonLEDInDifferentStateAtoBDeAssertTwice)
{
Manager manager(bus, twoGroupsWithMultipleComonLEDInDifferentState);
{
// Assert Set-A
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Two",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::On},
- {"Three",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::On},
- {"Four",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::On},
+ {"Three", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::On},
+ {"Four", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1159,30 +1124,28 @@
}
{
// Assert Set-B
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
// [Two] turns [On] due to priority
// [Three] remains [Blink]
std::set<Layout::LedAction> refAssert = {
- {"Two",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Five",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Six",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Five", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1190,25 +1153,24 @@
}
{
// DeAssert Set-B
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refDeAssert = {
- {"Five",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Six",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"Five", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
};
EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
// difference of refDeAssert and ledsDeAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsDeAssert.begin(), ledsDeAssert.end(),
refDeAssert.begin(), refDeAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1217,13 +1179,13 @@
// Need just the ledsAssert populated with these.
// [Two] will go back to [Blink] from [On]
std::set<Layout::LedAction> refAssert = {
- {"Two",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp1 {};
+ Manager::group temp1{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp1, temp1.begin()));
@@ -1231,30 +1193,29 @@
}
{
// DeAssert Set-A
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refDeAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Two",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::On},
- {"Three",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::On},
- {"Four",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::On},
+ {"Three", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::On},
+ {"Four", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
};
EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
EXPECT_EQ(0, ledsAssert.size());
// difference of refDeAssert and ledsDeAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsDeAssert.begin(), ledsDeAssert.end(),
refDeAssert.begin(), refDeAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1262,12 +1223,12 @@
}
{
// DeAssert Set-A again and make sure we get all empty
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
EXPECT_EQ(0, ledsDeAssert.size());
EXPECT_EQ(0, ledsAssert.size());
@@ -1277,37 +1238,38 @@
/** @brief Assert 2 groups having multiple LEDs common in different state and
* mixed priority. DeAssert-A
*/
-TEST_F(LedTest, assertTwoGroupsWithMultipleComonLEDInDifferentStateDiffPriorityAandB)
+TEST_F(LedTest,
+ assertTwoGroupsWithMultipleComonLEDInDifferentStateDiffPriorityAandB)
{
- Manager manager(bus, twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority);
+ Manager manager(bus,
+ twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority);
{
// Assert Set-A
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Two",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::On},
- {"Three",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::Blink},
- {"Four",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Ten",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
+ {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::On},
+ {"Three", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::Blink},
+ {"Four", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Ten", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1315,12 +1277,12 @@
}
{
// Assert Set-B
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -1328,18 +1290,16 @@
// [Three] remains on since it never was in [Blink] before
// [Ten] remains [Blink] due to priority: [Blink]
std::set<Layout::LedAction> refAssert = {
- {"Two",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Five",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Six",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Five", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1347,20 +1307,19 @@
}
{
// De-Assert Set-A
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsDeAsssert populated with these.
std::set<Layout::LedAction> refDeAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Four",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Four", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
};
EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
@@ -1369,13 +1328,13 @@
// [Three] remains [On] since it never changed state.
// [Two] remains [On] since it did not go back
std::set<Layout::LedAction> refAssert = {
- {"Ten",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::Blink},
+ {"Ten", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1386,37 +1345,39 @@
/** @brief Assert 2 groups having multiple LEDs common in different state and
* mixed priority. DeAssert-B
*/
-TEST_F(LedTest, assertTwoGroupsWithMultipleComonLEDInDifferentStateDiffPriorityAandBDeAssertB)
+TEST_F(
+ LedTest,
+ assertTwoGroupsWithMultipleComonLEDInDifferentStateDiffPriorityAandBDeAssertB)
{
- Manager manager(bus, twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority);
+ Manager manager(bus,
+ twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority);
{
// Assert Set-A
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Two",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::On},
- {"Three",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::Blink},
- {"Four",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Ten",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
+ {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::On},
+ {"Three", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::Blink},
+ {"Four", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Ten", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1424,12 +1385,12 @@
}
{
// Assert Set-B
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -1437,18 +1398,16 @@
// [Three] remains on since it never was in [Blink] before
// [Ten] remains [Blink] due to priority: [Blink]
std::set<Layout::LedAction> refAssert = {
- {"Two",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Five",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Six",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Five", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1456,20 +1415,19 @@
}
{
// De-Assert Set-B
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsDeAsssert populated with these.
std::set<Layout::LedAction> refDeAssert = {
- {"Five",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Six",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"Five", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
};
EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
@@ -1478,13 +1436,13 @@
// [Three] remains [On] since it never changed state.
// [Two] moves to [Blink] since there is no prior [On]
std::set<Layout::LedAction> refAssert = {
- {"Two",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1495,37 +1453,37 @@
/** @brief Assert 2 groups having multiple LEDs common in different state and
* mixed priority.
*/
-TEST_F(LedTest, assertTwoGroupsWithMultipleComonLEDInDifferentStateDiffPriorityBandA)
+TEST_F(LedTest,
+ assertTwoGroupsWithMultipleComonLEDInDifferentStateDiffPriorityBandA)
{
- Manager manager(bus, twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority);
+ Manager manager(bus,
+ twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority);
{
// Assert Set-B
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"Two",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Three",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::Blink},
- {"Five",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Six",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Ten",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::Blink},
+ {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Three", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::Blink},
+ {"Five", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Ten", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1533,12 +1491,12 @@
}
{
// Assert Set-A
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -1546,18 +1504,17 @@
// [Three] remains on since it never was in [Blink] before
// [Ten] moves to [Blink] due to priority: [Blink]
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Four",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Ten",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
+ {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Four", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Ten", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1568,37 +1525,38 @@
/** @brief Assert 2 groups having multiple LEDs common in different state and
* mixed priority and De-Assert-A
*/
-TEST_F(LedTest, assertTwoGroupsWithMultipleComonLEDInDifferentStateDiffPriorityBandADeAssertA)
+TEST_F(
+ LedTest,
+ assertTwoGroupsWithMultipleComonLEDInDifferentStateDiffPriorityBandADeAssertA)
{
- Manager manager(bus, twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority);
+ Manager manager(bus,
+ twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority);
{
// Assert Set-B
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"Two",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Three",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::Blink},
- {"Five",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Six",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Ten",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::Blink},
+ {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Three", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::Blink},
+ {"Five", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Ten", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1606,12 +1564,12 @@
}
{
// Assert Set-A
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -1619,18 +1577,17 @@
// [Three] remains on since it never was in [Blink] before
// [Ten] moves to [Blink] due to priority: [Blink]
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Four",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Ten",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
+ {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Four", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Ten", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1638,21 +1595,20 @@
}
{
// De-Assert Set-A
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsAssserted populated with these.
// [Ten] remains [Blink] due to priority.
std::set<Layout::LedAction> refDeAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Four",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Four", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
};
EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
@@ -1661,13 +1617,13 @@
// [Three] remains [On] since it never was in [Blink] before
// [Ten] moves to [On] due to priority: [Blink]
std::set<Layout::LedAction> refAssert = {
- {"Ten",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::Blink},
+ {"Ten", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1678,37 +1634,37 @@
/** @brief Assert 2 groups having multiple LEDs common in different state and
* mixed priority and then DeAssert twice.
*/
-TEST_F(LedTest, assertTwoGroupsWithMultipleComonLEDInDifferentStateOnBlinkPriorityBandA)
+TEST_F(LedTest,
+ assertTwoGroupsWithMultipleComonLEDInDifferentStateOnBlinkPriorityBandA)
{
- Manager manager(bus, twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority);
+ Manager manager(bus,
+ twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority);
{
// Assert Set-B
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refAssert = {
- {"Two",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Three",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::Blink},
- {"Five",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Six",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Ten",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::Blink},
+ {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Three", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::Blink},
+ {"Five", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Ten", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1716,12 +1672,12 @@
}
{
// Assert Set-A
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -1729,18 +1685,17 @@
// [Three] remains on since it never was in [Blink] before
// [Ten] moves to [Blink] due to priority: [Blink]
std::set<Layout::LedAction> refAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Four",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Ten",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
+ {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Four", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Ten", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
EXPECT_EQ(0, ledsDeAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1748,26 +1703,25 @@
}
{
// DeAssert Set-B
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsAssserted populated with these.
// [Ten] remains [Blink] due to priority.
std::set<Layout::LedAction> refDeAssert = {
- {"Five",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Six",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
+ {"Five", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
};
EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
// difference of refDeAssert and ledsDeAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsDeAssert.begin(), ledsDeAssert.end(),
refDeAssert.begin(), refDeAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1776,13 +1730,13 @@
// Need just the ledsAssert populated with these.
// [Two] will move to [Blink]
std::set<Layout::LedAction> refAssert = {
- {"Two",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::On},
};
EXPECT_EQ(refAssert.size(), ledsAssert.size());
// difference of refAssert and ledsAssert must be null.
- Manager::group temp1 {};
+ Manager::group temp1{};
std::set_difference(ledsAssert.begin(), ledsAssert.end(),
refAssert.begin(), refAssert.end(),
std::inserter(temp1, temp1.begin()));
@@ -1790,32 +1744,31 @@
}
{
// DeAssert Set-A
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsAssserted populated with these.
std::set<Layout::LedAction> refDeAssert = {
- {"One",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Two",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::On},
- {"Three",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::Blink},
- {"Four",phosphor::led::Layout::On, 0,
- 0, phosphor::led::Layout::On},
- {"Ten",phosphor::led::Layout::Blink, 0,
- 0, phosphor::led::Layout::Blink},
+ {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+ {"Two", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::On},
+ {"Three", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::Blink},
+ {"Four", phosphor::led::Layout::On, 0, 0,
+ phosphor::led::Layout::On},
+ {"Ten", phosphor::led::Layout::Blink, 0, 0,
+ phosphor::led::Layout::Blink},
};
EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
EXPECT_EQ(0, ledsAssert.size());
// difference of refDeAssert and ledsDeAssert must be null.
- Manager::group temp {};
+ Manager::group temp{};
std::set_difference(ledsDeAssert.begin(), ledsDeAssert.end(),
refDeAssert.begin(), refDeAssert.end(),
std::inserter(temp, temp.begin()));
@@ -1823,12 +1776,12 @@
}
{
// DeAssert Set-B again and make sure we get all empty
- Manager::group ledsAssert {};
- Manager::group ledsDeAssert {};
+ Manager::group ledsAssert{};
+ Manager::group ledsDeAssert{};
- auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
EXPECT_EQ(0, ledsDeAssert.size());
EXPECT_EQ(0, ledsAssert.size());