Skip to content

Commit 2c81ed6

Browse files
fixup! improging decode unit testing by means of REQUIRE_THAT
1 parent f2bab9d commit 2c81ed6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

extras/test/src/test_command_decode.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,14 @@ SCENARIO("Test the decoding of command messages") {
308308
REQUIRE(command.lastValuesUpdateCmd.params.last_values[10] == (uint8_t)0x10);
309309
REQUIRE(command.lastValuesUpdateCmd.params.last_values[11] == (uint8_t)0x11);
310310
REQUIRE(command.lastValuesUpdateCmd.params.last_values[12] == (uint8_t)0x12);
311+
std::vector<int> last_values(command.lastValuesUpdateCmd.params.last_values,
312+
command.lastValuesUpdateCmd.params.last_values+13);
313+
314+
REQUIRE_THAT(last_values,
315+
Catch::Matchers::Equals(std::vector<int>{
316+
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10, 0x11, 0x12,
317+
}));
318+
311319
REQUIRE(command.c.id == LastValuesUpdateCmdId);
312320
}
313321
free(command.lastValuesUpdateCmd.params.last_values);

0 commit comments

Comments
 (0)