test/src/scale/scale_optional_test.cpp
TEST(Scale, DecodeOptionalBoolFail) {
  auto bytes = ByteArray{0, 1, 2, 3};

  EXPECT_OUTCOME_FALSE_2(err, decode<FourOptBools>(bytes))
  ASSERT_EQ(err.value(), static_cast<int>(DecodeError::UNEXPECTED_VALUE));
}
/**
 * @given byte array containing series of encoded optional bool values
 * where last byte is incorrect for optional bool type
 * @when scale::decode function is applied
 * @then DecoderError::UNEXPECTED_VALUE error is obtained
 */
@given byte array containing series of encoded optional bool values
where last byte is incorrect for optional bool type
@when scale::decode function is applied
@then DecoderError::UNEXPECTED_VALUE error is obtained
@given byte array containing series of encoded optional bool values where last byte is incorrect for optional bool type @when scale :: decode function is applied @then DecoderError :: UNEXPECTED_VALUE error is obtained
TEST(Scale, DecodeOptionalBoolFail) {
  auto bytes = ByteArray{0, 1, 2, 3};
  EXPECT_OUTCOME_FALSE_2(err, decode<FourOptBools>(bytes))
  ASSERT_EQ(err.value(), static_cast<int>(DecodeError::UNEXPECTED_VALUE));
}
TEST ( Scale , DecodeOptionalBoolFail ) { auto bytes = ByteArray { 0 , 1 , 2 , 3 } ; EXPECT_OUTCOME_FALSE_2 ( err , decode < FourOptBools > ( bytes ) ) ASSERT_EQ ( err . value ( ) , static_cast < int > ( DecodeError :: UNEXPECTED_VALUE ) ) ; }
@given byte array containing series of encoded optional bool values
 where last byte is incorrect for optional bool type
 @when scale::decode function is applied
 @then DecoderError::UNEXPECTED_VALUE error is obtained
@given byte array containing series of encoded optional bool values where last byte is incorrect for optional bool type @when scale :: decode function is applied @then DecoderError :: UNEXPECTED_VALUE error is obtained