test/src/scale/scale_variant_test.cpp
TEST(ScaleVariant, DecodeU8Success) {
  ByteArray match = {0, 1};  // uint8_t{1}
  ScaleDecoderStream s(match);
  boost::variant<uint8_t, uint32_t> val{};
  ASSERT_NO_THROW(s >> val);
  sgns::visit_in_place(
      val, [](uint8_t v) { ASSERT_EQ(v, 1); }, [](uint32_t v) { FAIL(); });
}
/**
 * @given byte array of encoded variant of types uint8_t and uint32_t
 * containing uint8_t value
 * @when variant decoded from scale decoder stream
 * @then obtained varian has alternative type uint8_t and is equal to encoded
 * uint8_t value
 */
@given byte array of encoded variant of types uint8_t and uint32_t
containing uint8_t value
@when variant decoded from scale decoder stream
@then obtained varian has alternative type uint8_t and is equal to encoded
uint8_t value
@given byte array of encoded variant of types uint8_t and uint32_t containing uint8_t value @when variant decoded from scale decoder stream @then obtained varian has alternative type uint8_t and is equal to encoded uint8_t value
TEST(ScaleVariant, DecodeU8Success) {
  ByteArray match = {0, 1};  
  ScaleDecoderStream s(match);
  boost::variant<uint8_t, uint32_t> val{};
  ASSERT_NO_THROW(s >> val);
  sgns::visit_in_place(
      val, [](uint8_t v) { ASSERT_EQ(v, 1); }, [](uint32_t v) { FAIL(); });
}
TEST ( ScaleVariant , DecodeU8Success ) { ByteArray match = { 0 , 1 } ; ScaleDecoderStream s ( match ) ; boost :: variant < uint8_t , uint32_t > val { } ; ASSERT_NO_THROW ( s >> val ) ; sgns :: visit_in_place ( val , [ ] ( uint8_t v ) { ASSERT_EQ ( v , 1 ) ; } , [ ] ( uint32_t v ) { FAIL ( ) ; } ) ; }
@given byte array of encoded variant of types uint8_t and uint32_t
 containing uint8_t value
 @when variant decoded from scale decoder stream
 @then obtained varian has alternative type uint8_t and is equal to encoded
 uint8_t value
@given byte array of encoded variant of types uint8_t and uint32_t containing uint8_t value @when variant decoded from scale decoder stream @then obtained varian has alternative type uint8_t and is equal to encoded uint8_t value
// uint8_t{1}