message: Add test for serializing variants
diff: #include "caf/stream_deserializer.hpp"
  #include "caf/stream_serializer.hpp"
  #include "caf/streambuf.hpp"
  +#include "caf/variant.hpp"
  #include "caf/detail/enum_to_string.hpp"
  #include "caf/detail/get_mac_addresses.hpp"
  @@ -530,6 +531,17 @@ SERIALIZATION_TEST(non_empty_vector) {
  CAF_CHECK_EQUAL(foo, bar);
  }
  +SERIALIZATION_TEST(variant_with_tree_types) {
  + CAF_MESSAGE("deserializing into a non-empty vector overrides any content");
  + using test_variant = variant<int, double, std::string>;
  + test_variant x{42};
  + CAF_CHECK_EQUAL(x, roundtrip(x));
  + x = 12.34;
  + CAF_CHECK_EQUAL(x, roundtrip(x));
  + x = std::string{"foobar"};
  + CAF_CHECK_EQUAL(x, roundtrip(x));
  +}
  +
  // -- our vector<bool> serialization packs into an uint64_t. Hence, the
  // critical sizes to test are 0, 1, 63, 64, and 65.
  