aboutsummaryrefslogtreecommitdiff
path: root/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp')
-rw-r--r--unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp b/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp
index 22ed3f15b3e6..6827a732fbd8 100644
--- a/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp
+++ b/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp
@@ -273,7 +273,7 @@ TEST(BinaryReaderTest, hello_obj_x86_64) {
EXPECT_EQ(text.type, S_REGULAR);
EXPECT_EQ(text.attributes,SectionAttr(S_ATTR_PURE_INSTRUCTIONS
| S_ATTR_SOME_INSTRUCTIONS));
- EXPECT_EQ(text.alignment, 4U);
+ EXPECT_EQ((uint16_t)text.alignment, 16U);
EXPECT_EQ(text.address, Hex64(0x0));
EXPECT_EQ(text.content.size(), 45UL);
EXPECT_EQ((int)(text.content[0]), 0x55);
@@ -298,7 +298,7 @@ TEST(BinaryReaderTest, hello_obj_x86_64) {
EXPECT_TRUE(cstring.sectionName.equals("__cstring"));
EXPECT_EQ(cstring.type, S_CSTRING_LITERALS);
EXPECT_EQ(cstring.attributes, SectionAttr(0));
- EXPECT_EQ(cstring.alignment, 0U);
+ EXPECT_EQ((uint16_t)cstring.alignment, 1U);
EXPECT_EQ(cstring.address, Hex64(0x02D));
EXPECT_EQ(cstring.content.size(), 7UL);
EXPECT_EQ((int)(cstring.content[0]), 0x68);
@@ -399,7 +399,7 @@ TEST(BinaryReaderTest, hello_obj_x86) {
EXPECT_EQ(text.type, S_REGULAR);
EXPECT_EQ(text.attributes,SectionAttr(S_ATTR_PURE_INSTRUCTIONS
| S_ATTR_SOME_INSTRUCTIONS));
- EXPECT_EQ(text.alignment, 4U);
+ EXPECT_EQ((uint16_t)text.alignment, 16U);
EXPECT_EQ(text.address, Hex64(0x0));
EXPECT_EQ(text.content.size(), 48UL);
EXPECT_EQ((int)(text.content[0]), 0x55);
@@ -434,7 +434,7 @@ TEST(BinaryReaderTest, hello_obj_x86) {
EXPECT_TRUE(cstring.sectionName.equals("__cstring"));
EXPECT_EQ(cstring.type, S_CSTRING_LITERALS);
EXPECT_EQ(cstring.attributes, SectionAttr(0));
- EXPECT_EQ(cstring.alignment, 0U);
+ EXPECT_EQ((uint16_t)cstring.alignment, 1U);
EXPECT_EQ(cstring.address, Hex64(0x030));
EXPECT_EQ(cstring.content.size(), 7UL);
EXPECT_EQ((int)(cstring.content[0]), 0x68);
@@ -532,7 +532,7 @@ TEST(BinaryReaderTest, hello_obj_armv7) {
EXPECT_EQ(text.type, S_REGULAR);
EXPECT_EQ(text.attributes,SectionAttr(S_ATTR_PURE_INSTRUCTIONS
| S_ATTR_SOME_INSTRUCTIONS));
- EXPECT_EQ(text.alignment, 2U);
+ EXPECT_EQ((uint16_t)text.alignment, 4U);
EXPECT_EQ(text.address, Hex64(0x0));
EXPECT_EQ(text.content.size(), 42UL);
EXPECT_EQ((int)(text.content[0]), 0x80);
@@ -576,7 +576,7 @@ TEST(BinaryReaderTest, hello_obj_armv7) {
EXPECT_TRUE(cstring.sectionName.equals("__cstring"));
EXPECT_EQ(cstring.type, S_CSTRING_LITERALS);
EXPECT_EQ(cstring.attributes, SectionAttr(0));
- EXPECT_EQ(cstring.alignment, 0U);
+ EXPECT_EQ((uint16_t)cstring.alignment, 1U);
EXPECT_EQ(cstring.address, Hex64(0x02A));
EXPECT_EQ(cstring.content.size(), 7UL);
EXPECT_EQ((int)(cstring.content[0]), 0x68);
@@ -677,7 +677,7 @@ TEST(BinaryReaderTest, hello_obj_ppc) {
EXPECT_EQ(text.type, S_REGULAR);
EXPECT_EQ(text.attributes,SectionAttr(S_ATTR_PURE_INSTRUCTIONS
| S_ATTR_SOME_INSTRUCTIONS));
- EXPECT_EQ(text.alignment, 2U);
+ EXPECT_EQ((uint16_t)text.alignment, 4U);
EXPECT_EQ(text.address, Hex64(0x0));
EXPECT_EQ(text.content.size(), 68UL);
EXPECT_EQ((int)(text.content[0]), 0x7C);
@@ -720,7 +720,7 @@ TEST(BinaryReaderTest, hello_obj_ppc) {
EXPECT_TRUE(cstring.sectionName.equals("__cstring"));
EXPECT_EQ(cstring.type, S_CSTRING_LITERALS);
EXPECT_EQ(cstring.attributes, SectionAttr(0));
- EXPECT_EQ(cstring.alignment, 2U);
+ EXPECT_EQ((uint16_t)cstring.alignment, 4U);
EXPECT_EQ(cstring.address, Hex64(0x044));
EXPECT_EQ(cstring.content.size(), 7UL);
EXPECT_EQ((int)(cstring.content[0]), 0x68);