From 5d624d80fbb9aee5e5c7a9786c89c03985e0efb6 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 12 Sep 2024 16:30:34 -0700 Subject: [PATCH] Fix reflection test for clang-15 or lower --- test/reflection_test.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/reflection_test.cpp b/test/reflection_test.cpp index a0ccb3ed..2e49f84c 100644 --- a/test/reflection_test.cpp +++ b/test/reflection_test.cpp @@ -301,7 +301,11 @@ TEST(Reflection, FieldInfoStructWithNonAggregates) static_assert(FIELD_INFO.at(0).enclosing_field_name().empty()); static_assert(!FIELD_INFO.at(0).providing_base_class_name().has_value()); +#if defined(__clang__) && __clang_major__ >= 16 static_assert(FIELD_INFO.at(1).field_type_name() == "MockNonAggregate"); +#else + static_assert(FIELD_INFO.at(1).field_type_name() == "fixed_containers::MockNonAggregate"); +#endif static_assert(FIELD_INFO.at(1).field_name() == "non_aggregate"); static_assert(FIELD_INFO.at(1).enclosing_field_type_name() == "fixed_containers::(anonymous namespace)::StructWithNonAggregates"); @@ -422,7 +426,11 @@ TEST(Reflection, FieldInfoStructWithNonAggregatesExhaustiveUntilNonAggregates) static_assert(FIELD_INFO.at(0).enclosing_field_name().empty()); static_assert(!FIELD_INFO.at(0).providing_base_class_name().has_value()); +#if defined(__clang__) && __clang_major__ >= 16 static_assert(FIELD_INFO.at(1).field_type_name() == "MockNonAggregate"); +#else + static_assert(FIELD_INFO.at(1).field_type_name() == "fixed_containers::MockNonAggregate"); +#endif static_assert(FIELD_INFO.at(1).field_name() == "non_aggregate"); static_assert(FIELD_INFO.at(1).enclosing_field_type_name() == "fixed_containers::(anonymous namespace)::StructWithNonAggregates");