test/src/scale/scale_optional_test.cpp
TEST(ScaleTest, EncodeOptionalBoolSuccess) {
  std::vector<boost::optional<bool>> values = {true, false, boost::none};
  ScaleEncoderStream s;
  for (auto &&v : values) {
    ASSERT_NO_THROW((s << v));
  }
  ASSERT_EQ(s.data(), (ByteArray{2, 1, 0}));
}
/**
 * @given optional bool values: true, false, nullopt
 * @when encode optional is applied
 * @then expected result obtained
 */
@given optional bool values: true, false, nullopt
@when encode optional is applied
@then expected result obtained
@given optional bool values : true false nullopt @when encode optional is applied @then expected result obtained
TEST(ScaleTest, EncodeOptionalBoolSuccess) {
  std::vector<boost::optional<bool>> values = {true, false, boost::none};
  ScaleEncoderStream s;
  for (auto &&v : values) {
    ASSERT_NO_THROW((s << v));
  }
  ASSERT_EQ(s.data(), (ByteArray{2, 1, 0}));
}
TEST ( ScaleTest , EncodeOptionalBoolSuccess ) { std :: vector < boost :: optional < bool > > values = { true , false , boost :: none } ; ScaleEncoderStream s ; for ( auto && v : values ) { ASSERT_NO_THROW ( ( s << v ) ) ; } ASSERT_EQ ( s . data ( ) , ( ByteArray { 2 , 1 , 0 } ) ) ; }
@given optional bool values: true, false, nullopt
 @when encode optional is applied
 @then expected result obtained
@given optional bool values : true false nullopt @when encode optional is applied @then expected result obtained