Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
changkhothuychung committed Aug 27, 2024
1 parent fb88714 commit c24fb46
Showing 1 changed file with 36 additions and 10 deletions.
46 changes: 36 additions & 10 deletions libcxx/test/std/experimental/reflection/define-class.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,18 +267,44 @@ static_assert(identifier_of(nonstatic_data_members_of(^^Cls1)[0]) == "Kühl");
// ===========================

namespace data_member_spec_comparison {
// static_assert(data_member_spec(^^int, {}) != ^^int);
// static_assert(data_member_spec(^^int, {}) == data_member_spec(^^int, {}));
// static_assert(data_member_spec(^^int, {}) !=
// data_member_spec(^^int, {.name="i"}));
// static_assert(data_member_spec(^^int, {.name=u8"i"}) ==
// data_member_spec(^^int, {.name="i"}));
// static_assert(data_member_spec(^^int, {.name="i", .alignment=4}) !=
// data_member_spec(^^int, {.name="i"}));
// static_assert(data_member_spec(^^int, {.name=""}) == data_member_spec(^^int, {}));
static_assert(data_member_spec(^^int,
{
}) != ^^int);
static_assert(data_member_spec(^^int,
{
}) == data_member_spec(^^int,
{
}));
static_assert(data_member_spec(^^int,
{
}) != data_member_spec(^^int,
{
.name = "i"}));
static_assert(data_member_spec(^^int,
{
.name = u8"i"}) ==
data_member_spec(^^int,
{
.name = "i"}));
static_assert(data_member_spec(^^int,
{
.name = "i", .alignment = 4}) !=
data_member_spec(^^int,
{
.name = "i"}));
static_assert(data_member_spec(^^int,
{
.name = ""}) ==
data_member_spec(^^int,
{
}));

using Alias = int;
//static_assert(data_member_spec(^^Alias, {}) == data_member_spec(^^int, {}));
static_assert(data_member_spec(^^Alias,
{
}) == data_member_spec(^^int,
{
}));
} // namespace data_member_spec_comparison

int main() { }

0 comments on commit c24fb46

Please sign in to comment.