Skip to content

Commit dc2a59f

Browse files
committed
[test] Use platform pointer size in type reflection test
1 parent 2c6c6b1 commit dc2a59f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

unittests/CppInterOp/TypeReflectionTest.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
#include "gtest/gtest.h"
99

10+
#include <cstdint>
11+
1012
using namespace TestUtils;
1113
using namespace llvm;
1214
using namespace clang;
@@ -74,7 +76,8 @@ TEST(TypeReflectionTest, GetSizeOfType) {
7476
EXPECT_EQ(Cpp::GetSizeOfType(Cpp::GetVariableType(Decls[3])), 8);
7577
EXPECT_EQ(Cpp::GetSizeOfType(Cpp::GetVariableType(Decls[4])), 16);
7678
EXPECT_EQ(Cpp::GetSizeOfType(Cpp::GetTypeFromScope(Decls[5])), 0);
77-
EXPECT_EQ(Cpp::GetSizeOfType(Cpp::GetVariableType(Decls[6])), 8);
79+
EXPECT_EQ(Cpp::GetSizeOfType(Cpp::GetVariableType(Decls[6])),
80+
sizeof(intptr_t));
7881
}
7982

8083
TEST(TypeReflectionTest, GetCanonicalType) {

0 commit comments

Comments
 (0)