summaryrefslogtreecommitdiffstats
path: root/test/TestI2cOcc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/TestI2cOcc.cpp')
-rw-r--r--test/TestI2cOcc.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/TestI2cOcc.cpp b/test/TestI2cOcc.cpp
index 3fb6e6e..c92da5b 100644
--- a/test/TestI2cOcc.cpp
+++ b/test/TestI2cOcc.cpp
@@ -144,9 +144,13 @@ TEST(TestI2cDbusNames, dbusToI2c)
TEST(TestI2cDbusNames, getI2cDeviceName)
{
- auto path = "/org/open_power/control/4_0050"s;
+ auto path = "/org/open_power/control/occ_4_0050"s;
auto name = getI2cDeviceName(path);
EXPECT_EQ(STR_4_0050, name);
+
+ // With invalid occ path, the code shall assert
+ path = "/org/open_power/control/SomeInvalidPath"s;
+ EXPECT_DEATH(getI2cDeviceName(path), "");
}
} // namespace i2c_occ
OpenPOWER on IntegriCloud