We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f67be4 commit 1563598Copy full SHA for 1563598
extras/test/src/test_command_decode.cpp
@@ -709,4 +709,21 @@ SCENARIO("Test the decoding of command messages") {
709
}
710
711
712
+ /****************************************************************************/
713
+
714
+ WHEN("Decode an invalid CBOR message")
715
+ {
716
+ CommandDown command;
717
718
+ uint8_t const payload[] = {0xFF};
719
720
+ size_t payload_length = sizeof(payload) / sizeof(uint8_t);
721
+ CBORMessageDecoder decoder;
722
+ Decoder::Status err = decoder.decode((Message*)&command, payload, payload_length);
723
724
+ THEN("The decode is unsuccessful") {
725
+ REQUIRE(err == Decoder::Status::Error);
726
+ }
727
728
729
0 commit comments