test/src/scale/scale_compact_test.cpp
TEST(ScaleCompactTest, EncodeNegativeIntegerFails) {
  CompactInteger v(-1);
  ScaleEncoderStream out{};
  ASSERT_ANY_THROW((out << v));
  ASSERT_EQ(out.data().size(), 0);  // nothing was written to buffer
}
/**
 * @given a negative value -1
 * (negative values are not supported by compact encoding)
 * @when trying to encode this value
 * @then obtain error
 */
@given a negative value -1
(negative values are not supported by compact encoding)
@when trying to encode this value
@then obtain error
@given a negative value - 1 ( negative values are not supported by compact encoding ) @when trying to encode this value @then obtain error
TEST(ScaleCompactTest, EncodeNegativeIntegerFails) {
  CompactInteger v(-1);
  ScaleEncoderStream out{};
  ASSERT_ANY_THROW((out << v));
  ASSERT_EQ(out.data().size(), 0);  
}
TEST ( ScaleCompactTest , EncodeNegativeIntegerFails ) { CompactInteger v ( -1 ) ; ScaleEncoderStream out { } ; ASSERT_ANY_THROW ( ( out << v ) ) ; ASSERT_EQ ( out . data ( ) . size ( ) , 0 ) ; }
@given a negative value -1
 (negative values are not supported by compact encoding)
 @when trying to encode this value
 @then obtain error
@given a negative value - 1 ( negative values are not supported by compact encoding ) @when trying to encode this value @then obtain error
// nothing was written to buffer