@@ -91,11 +91,17 @@ class TestControllerManagerHWManagementSrvs : public TestControllerManagerSrvs
91
91
const std::string & name, const std::string & type, const std::string & plugin_name,
92
92
const uint8_t state_id, const std::string & state_label)
93
93
{
94
- EXPECT_EQ (component.name , name);
95
- EXPECT_EQ (component.type , type);
96
- EXPECT_EQ (component.plugin_name , plugin_name);
97
- EXPECT_EQ (component.state .id , state_id);
98
- EXPECT_EQ (component.state .label , state_label);
94
+ EXPECT_EQ (component.name , name) << " Component has unexpected name." ;
95
+ EXPECT_EQ (component.type , type)
96
+ << " Component " << name << " from plugin " << plugin_name << " has wrong type." ;
97
+ EXPECT_EQ (component.plugin_name , plugin_name)
98
+ << " Component " << name << " (" << type << " ) has unexpected plugin_name." ;
99
+ EXPECT_EQ (component.state .id , state_id)
100
+ << " Component " << name << " (" << type << " ) from plugin " << plugin_name
101
+ << " has wrong state_id." ;
102
+ EXPECT_EQ (component.state .label , state_label)
103
+ << " Component " << name << " (" << type << " ) from plugin " << plugin_name
104
+ << " has wrong state_label." ;
99
105
}
100
106
101
107
void list_hardware_components_and_check (
@@ -124,8 +130,9 @@ class TestControllerManagerHWManagementSrvs : public TestControllerManagerSrvs
124
130
{
125
131
auto it = std::find (interface_names.begin (), interface_names.end (), interfaces[i].name );
126
132
EXPECT_NE (it, interface_names.end ());
127
- EXPECT_EQ (interfaces[i].is_available , is_available_status[i]);
128
- EXPECT_EQ (interfaces[i].is_claimed , is_claimed_status[i]);
133
+ EXPECT_EQ (interfaces[i].is_available , is_available_status[i])
134
+ << " At " << interfaces[i].name ;
135
+ EXPECT_EQ (interfaces[i].is_claimed , is_claimed_status[i]) << " At " << interfaces[i].name ;
129
136
}
130
137
};
131
138
0 commit comments