TEST(SerializerTest, UnionValueOffsetIsZero) {
  tablebased::Union u;
  u.set_fieldC("test");
  EXPECT_EQ(static_cast<void*>(&u), &*u.fieldC_ref());

  u.set_fieldA({});
  EXPECT_EQ(static_cast<void*>(&u), &*u.fieldA_ref());

  u.set_fieldB({});
  EXPECT_EQ(static_cast<void*>(&u), &*u.fieldB_ref());
}
TEST(SerializerTest, UnionValueOffsetIsZero) {
  tablebased::Union u;
  u.set_fieldC("test");
  EXPECT_EQ(static_cast<void*>(&u), &*u.fieldC_ref());

  u.set_fieldA({});
  EXPECT_EQ(static_cast<void*>(&u), &*u.fieldA_ref());

  u.set_fieldB({});
  EXPECT_EQ(static_cast<void*>(&u), &*u.fieldB_ref());
}