Skip to content

Commit

Permalink
Fix reflection test for clang-15 or lower
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkaratarakis committed Sep 12, 2024
1 parent 07f0711 commit 5d624d8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/reflection_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 5d624d8

Please sign in to comment.