test/src/scale/scale_compact_test.cpp
TEST(Scale, compactDecodeBigIntegerError) {
  auto bytes = ByteArray{255, 255, 255, 255};
  EXPECT_OUTCOME_FALSE_2(err, decode<CompactInteger>(bytes));

  ASSERT_EQ(err.value(),
            static_cast<int>(sgns::scale::DecodeError::NOT_ENOUGH_DATA));
}
/**
 * @given incorrect byte array, which assumes 4-th case of encoding
 * @when apply decodeInteger
 * @then get kNotEnoughData error
 */
@given incorrect byte array, which assumes 4-th case of encoding
@when apply decodeInteger
@then get kNotEnoughData error
@given incorrect byte array which assumes 4 - th case of encoding @when apply decodeInteger @then get kNotEnoughData error
TEST(Scale, compactDecodeBigIntegerError) {
  auto bytes = ByteArray{255, 255, 255, 255};
  EXPECT_OUTCOME_FALSE_2(err, decode<CompactInteger>(bytes));
  ASSERT_EQ(err.value(),
            static_cast<int>(sgns::scale::DecodeError::NOT_ENOUGH_DATA));
}
TEST ( Scale , compactDecodeBigIntegerError ) { auto bytes = ByteArray { 255 , 255 , 255 , 255 } ; EXPECT_OUTCOME_FALSE_2 ( err , decode < CompactInteger > ( bytes ) ) ; ASSERT_EQ ( err . value ( ) , static_cast < int > ( sgns :: scale :: DecodeError :: NOT_ENOUGH_DATA ) ) ; }
@given incorrect byte array, which assumes 4-th case of encoding
 @when apply decodeInteger
 @then get kNotEnoughData error
@given incorrect byte array which assumes 4 - th case of encoding @when apply decodeInteger @then get kNotEnoughData error