test: physical: Fix readability-identifier-naming
```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../test/physical.cpp:10:16: error: invalid case style for variable 'LED_OBJ' [readability-identifier-naming,-warnings-as-errors]
constexpr auto LED_OBJ = "/foo/bar/led";
^~~~~~~
ledObj
```
Change-Id: I048eb89444702cf6bc5233f9b0e368908b134816
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/test/physical.cpp b/test/physical.cpp
index d83ab66..adf5d06 100644
--- a/test/physical.cpp
+++ b/test/physical.cpp
@@ -7,7 +7,7 @@
#include <gmock/gmock.h>
#include <gtest/gtest.h>
-constexpr auto LED_OBJ = "/foo/bar/led";
+constexpr auto ledObj = "/foo/bar/led";
using Action = sdbusplus::xyz::openbmc_project::Led::server::Physical::Action;
namespace fs = std::filesystem;
@@ -76,7 +76,7 @@
/* NiceMock ignores calls to methods with no expectations defined */
NiceMock<MockLed> led;
ON_CALL(led, getTrigger()).WillByDefault(Return("none"));
- phosphor::led::Physical phy(bus, LED_OBJ, led);
+ phosphor::led::Physical phy(bus, ledObj, led);
EXPECT_EQ(phy.state(), Action::Off);
}
@@ -88,7 +88,7 @@
EXPECT_CALL(led, getTrigger()).WillRepeatedly(Return("none"));
EXPECT_CALL(led, getBrightness()).WillOnce(Return(127));
EXPECT_CALL(led, getMaxBrightness()).WillOnce(Return(127));
- phosphor::led::Physical phy(bus, LED_OBJ, led);
+ phosphor::led::Physical phy(bus, ledObj, led);
EXPECT_EQ(phy.state(), Action::On);
}
@@ -100,7 +100,7 @@
EXPECT_CALL(led, getTrigger()).WillRepeatedly(Return("none"));
EXPECT_CALL(led, getBrightness()).WillOnce(Return(0));
EXPECT_CALL(led, getMaxBrightness()).WillOnce(Return(0));
- phosphor::led::Physical phy(bus, LED_OBJ, led);
+ phosphor::led::Physical phy(bus, ledObj, led);
EXPECT_EQ(phy.state(), Action::Off);
}
@@ -112,7 +112,7 @@
EXPECT_CALL(led, getTrigger()).WillRepeatedly(Return("none"));
EXPECT_CALL(led, getBrightness()).WillOnce(Return(0));
EXPECT_CALL(led, getMaxBrightness()).WillOnce(Return(127));
- phosphor::led::Physical phy(bus, LED_OBJ, led);
+ phosphor::led::Physical phy(bus, ledObj, led);
EXPECT_EQ(phy.state(), Action::Off);
}
@@ -124,7 +124,7 @@
EXPECT_CALL(led, getTrigger()).WillRepeatedly(Return("none"));
EXPECT_CALL(led, getBrightness()).WillOnce(Return(127));
EXPECT_CALL(led, getMaxBrightness()).WillOnce(Return(0));
- phosphor::led::Physical phy(bus, LED_OBJ, led);
+ phosphor::led::Physical phy(bus, ledObj, led);
EXPECT_EQ(phy.state(), Action::Off);
}
@@ -135,7 +135,7 @@
EXPECT_CALL(led, getTrigger()).WillOnce(Return("timer"));
EXPECT_CALL(led, getDelayOn()).WillOnce(Return(500));
EXPECT_CALL(led, getDelayOff()).WillOnce(Return(500));
- phosphor::led::Physical phy(bus, LED_OBJ, led);
+ phosphor::led::Physical phy(bus, ledObj, led);
EXPECT_EQ(phy.state(), Action::Off);
}
@@ -148,7 +148,7 @@
EXPECT_CALL(led, getBrightness())
.WillOnce(Return(phosphor::led::deasserted));
EXPECT_CALL(led, setBrightness(phosphor::led::deasserted)).Times(0);
- phosphor::led::Physical phy(bus, LED_OBJ, led);
+ phosphor::led::Physical phy(bus, ledObj, led);
phy.state(Action::Off);
EXPECT_EQ(phy.state(), Action::Off);
}
@@ -163,7 +163,7 @@
EXPECT_CALL(led, getTrigger()).WillOnce(Return("none"));
EXPECT_CALL(led, setTrigger("none"));
EXPECT_CALL(led, setBrightness(asserted));
- phosphor::led::Physical phy(bus, LED_OBJ, led);
+ phosphor::led::Physical phy(bus, ledObj, led);
phy.state(Action::On);
EXPECT_EQ(phy.state(), Action::On);
}
@@ -176,7 +176,7 @@
EXPECT_CALL(led, setTrigger("timer"));
EXPECT_CALL(led, setDelayOn(500));
EXPECT_CALL(led, setDelayOff(500));
- phosphor::led::Physical phy(bus, LED_OBJ, led);
+ phosphor::led::Physical phy(bus, ledObj, led);
phy.state(Action::Blink);
EXPECT_EQ(phy.state(), Action::Blink);
}
@@ -187,7 +187,7 @@
NiceMock<MockLed> led;
EXPECT_CALL(led, getTrigger()).WillRepeatedly(Return("none"));
EXPECT_CALL(led, getBrightness()).WillRepeatedly(Return(127));
- phosphor::led::Physical phy(bus, LED_OBJ, led);
+ phosphor::led::Physical phy(bus, ledObj, led);
EXPECT_EQ(phy.state(), Action::Off);
}
@@ -204,7 +204,7 @@
EXPECT_CALL(led, getBrightness()).WillOnce(Return(deasserted));
EXPECT_CALL(led, setBrightness(asserted));
EXPECT_CALL(led, setBrightness(deasserted));
- phosphor::led::Physical phy(bus, LED_OBJ, led);
+ phosphor::led::Physical phy(bus, ledObj, led);
phy.state(Action::On);
EXPECT_EQ(phy.state(), Action::On);
phy.state(Action::Off);