Skip to content

Commit

Permalink
Update VariableReflectionTest.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
mcbarton authored May 18, 2024
1 parent 165c060 commit bbc8aa3
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions unittests/CppInterOp/VariableReflectionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,22 @@ TEST(VariableReflectionTest, GetVariableType) {


#if __APPLE__
#define maybeunused [[maybe_unused]] const int
#define CODE \
int a; \
[[maybe_unused]] const int N = 5; \
class C { \
public: \
int a; \
double b; \
int *c; \
int d; \
static int s_a; \
} c; \
int C::s_a = 12;
#else
typedef const int maybeunused;
#endif

#define CODE \
int a; \
maybeunused N = 5; \
const int N = 5; \
class C { \
public: \
int a; \
Expand All @@ -110,10 +118,8 @@ typedef const int maybeunused;
static int s_a; \
} c; \
int C::s_a = 12;

#if __APPLE__
#undef maybeunused
#endif

CODE

TEST(VariableReflectionTest, GetVariableOffset) {
Expand Down

0 comments on commit bbc8aa3

Please sign in to comment.