diff --git a/runtime/test/zserio/VariantTest.cpp b/runtime/test/zserio/VariantTest.cpp index 65906f4..dbff476 100644 --- a/runtime/test/zserio/VariantTest.cpp +++ b/runtime/test/zserio/VariantTest.cpp @@ -39,8 +39,8 @@ struct ThrowingMove struct ThrowingBig { - explicit ThrowingBig(int) - : big() + explicit ThrowingBig(int) : + big() { throw std::runtime_error("dang"); } @@ -305,8 +305,12 @@ TYPED_TEST(VariantTest, exception) Var2 var2; ASSERT_THROW(var2.template emplace<0>(ThrowingMove()), std::runtime_error); ASSERT_EQ(var2.valueless_by_exception(), true); - ASSERT_THROW(var2.visit([](auto&&){}), zserio::BadVariantAccess); - ASSERT_THROW(std::as_const(var2).visit([](const auto&){}), zserio::BadVariantAccess); + ASSERT_THROW(var2.visit([](auto&&) { + }), + zserio::BadVariantAccess); + ASSERT_THROW(std::as_const(var2).visit([](const auto&) { + }), + zserio::BadVariantAccess); zserio::Variant var3; ASSERT_THROW(var3.template emplace<1>(11), std::runtime_error);