[lld] r194173 - [mach-o] fix EXPECT_EQ types
Nick Kledzik
kledzik at apple.com
Wed Nov 6 14:20:57 PST 2013
Author: kledzik
Date: Wed Nov 6 16:20:56 2013
New Revision: 194173
URL: http://llvm.org/viewvc/llvm-project?rev=194173&view=rev
Log:
[mach-o] fix EXPECT_EQ types
Modified:
lld/trunk/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp
lld/trunk/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp
Modified: lld/trunk/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp?rev=194173&r1=194172&r2=194173&view=diff
==============================================================================
--- lld/trunk/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp (original)
+++ lld/trunk/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp Wed Nov 6 16:20:56 2013
@@ -242,7 +242,7 @@ TEST(BinaryReaderTest, hello_obj_x86_64)
EXPECT_EQ(text.attributes,SectionAttr(S_ATTR_PURE_INSTRUCTIONS
| S_ATTR_SOME_INSTRUCTIONS));
EXPECT_EQ(text.alignment, 4U);
- EXPECT_EQ(text.address, 0x0ULL);
+ EXPECT_EQ(text.address, Hex64(0x0));
EXPECT_EQ(text.content.size(), 45UL);
EXPECT_EQ((int)(text.content[0]), 0x55);
EXPECT_EQ((int)(text.content[1]), 0x48);
@@ -267,7 +267,7 @@ TEST(BinaryReaderTest, hello_obj_x86_64)
EXPECT_EQ(cstring.type, S_CSTRING_LITERALS);
EXPECT_EQ(cstring.attributes, SectionAttr(0));
EXPECT_EQ(cstring.alignment, 0U);
- EXPECT_EQ(cstring.address, 0x02DULL);
+ EXPECT_EQ(cstring.address, Hex64(0x02D));
EXPECT_EQ(cstring.content.size(), 7UL);
EXPECT_EQ((int)(cstring.content[0]), 0x68);
EXPECT_EQ((int)(cstring.content[1]), 0x65);
@@ -367,7 +367,7 @@ TEST(BinaryReaderTest, hello_obj_x86) {
EXPECT_EQ(text.attributes,SectionAttr(S_ATTR_PURE_INSTRUCTIONS
| S_ATTR_SOME_INSTRUCTIONS));
EXPECT_EQ(text.alignment, 4U);
- EXPECT_EQ(text.address, 0x0ULL);
+ EXPECT_EQ(text.address, Hex64(0x0));
EXPECT_EQ(text.content.size(), 48UL);
EXPECT_EQ((int)(text.content[0]), 0x55);
EXPECT_EQ((int)(text.content[1]), 0x89);
@@ -402,7 +402,7 @@ TEST(BinaryReaderTest, hello_obj_x86) {
EXPECT_EQ(cstring.type, S_CSTRING_LITERALS);
EXPECT_EQ(cstring.attributes, SectionAttr(0));
EXPECT_EQ(cstring.alignment, 0U);
- EXPECT_EQ(cstring.address, 0x030ULL);
+ EXPECT_EQ(cstring.address, Hex64(0x030));
EXPECT_EQ(cstring.content.size(), 7UL);
EXPECT_EQ((int)(cstring.content[0]), 0x68);
EXPECT_EQ((int)(cstring.content[1]), 0x65);
@@ -499,7 +499,7 @@ TEST(BinaryReaderTest, hello_obj_armv7)
EXPECT_EQ(text.attributes,SectionAttr(S_ATTR_PURE_INSTRUCTIONS
| S_ATTR_SOME_INSTRUCTIONS));
EXPECT_EQ(text.alignment, 2U);
- EXPECT_EQ(text.address, 0x0ULL);
+ EXPECT_EQ(text.address, Hex64(0x0));
EXPECT_EQ(text.content.size(), 42UL);
EXPECT_EQ((int)(text.content[0]), 0x80);
EXPECT_EQ((int)(text.content[1]), 0xB5);
@@ -543,7 +543,7 @@ TEST(BinaryReaderTest, hello_obj_armv7)
EXPECT_EQ(cstring.type, S_CSTRING_LITERALS);
EXPECT_EQ(cstring.attributes, SectionAttr(0));
EXPECT_EQ(cstring.alignment, 0U);
- EXPECT_EQ(cstring.address, 0x02AULL);
+ EXPECT_EQ(cstring.address, Hex64(0x02A));
EXPECT_EQ(cstring.content.size(), 7UL);
EXPECT_EQ((int)(cstring.content[0]), 0x68);
EXPECT_EQ((int)(cstring.content[1]), 0x65);
@@ -643,7 +643,7 @@ TEST(BinaryReaderTest, hello_obj_ppc) {
EXPECT_EQ(text.attributes,SectionAttr(S_ATTR_PURE_INSTRUCTIONS
| S_ATTR_SOME_INSTRUCTIONS));
EXPECT_EQ(text.alignment, 2U);
- EXPECT_EQ(text.address, 0x0ULL);
+ EXPECT_EQ(text.address, Hex64(0x0));
EXPECT_EQ(text.content.size(), 68UL);
EXPECT_EQ((int)(text.content[0]), 0x7C);
EXPECT_EQ((int)(text.content[1]), 0x08);
@@ -686,7 +686,7 @@ TEST(BinaryReaderTest, hello_obj_ppc) {
EXPECT_EQ(cstring.type, S_CSTRING_LITERALS);
EXPECT_EQ(cstring.attributes, SectionAttr(0));
EXPECT_EQ(cstring.alignment, 2U);
- EXPECT_EQ(cstring.address, 0x044ULL);
+ EXPECT_EQ(cstring.address, Hex64(0x044));
EXPECT_EQ(cstring.content.size(), 7UL);
EXPECT_EQ((int)(cstring.content[0]), 0x68);
EXPECT_EQ((int)(cstring.content[1]), 0x65);
Modified: lld/trunk/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp?rev=194173&r1=194172&r2=194173&view=diff
==============================================================================
--- lld/trunk/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp (original)
+++ lld/trunk/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp Wed Nov 6 16:20:56 2013
@@ -180,7 +180,7 @@ TEST(BinaryWriterTest, obj_relocs_x86_64
EXPECT_EQ(text.attributes,SectionAttr(S_ATTR_PURE_INSTRUCTIONS
| S_ATTR_SOME_INSTRUCTIONS));
EXPECT_EQ(text.alignment, 4U);
- EXPECT_EQ(text.address, 0x0ULL);
+ EXPECT_EQ(text.address, Hex64(0x0));
EXPECT_EQ(48UL, text.content.size());
const Relocation& call = text.relocations[0];
EXPECT_EQ(call.offset, Hex32(0x1));
@@ -287,7 +287,7 @@ TEST(BinaryWriterTest, obj_relocs_x86) {
EXPECT_EQ(text.attributes,SectionAttr(S_ATTR_PURE_INSTRUCTIONS
| S_ATTR_SOME_INSTRUCTIONS));
EXPECT_EQ(text.alignment, 4U);
- EXPECT_EQ(text.address, 0x0ULL);
+ EXPECT_EQ(text.address, Hex64(0x0));
EXPECT_EQ(22UL, text.content.size());
const Relocation& call = text.relocations[0];
EXPECT_EQ(call.offset, Hex32(0x1));
@@ -408,7 +408,7 @@ TEST(BinaryWriterTest, obj_relocs_armv7)
EXPECT_EQ(text.attributes,SectionAttr(S_ATTR_PURE_INSTRUCTIONS
| S_ATTR_SOME_INSTRUCTIONS));
EXPECT_EQ(text.alignment, 2U);
- EXPECT_EQ(text.address, 0x0ULL);
+ EXPECT_EQ(text.address, Hex64(0x0));
EXPECT_EQ(18UL, text.content.size());
const Relocation& blx = text.relocations[0];
EXPECT_EQ(blx.offset, Hex32(0x0));
@@ -560,7 +560,7 @@ TEST(BinaryWriterTest, obj_relocs_ppc) {
EXPECT_EQ(text.attributes,SectionAttr(S_ATTR_PURE_INSTRUCTIONS
| S_ATTR_SOME_INSTRUCTIONS));
EXPECT_EQ(text.alignment, 2U);
- EXPECT_EQ(text.address, 0x0ULL);
+ EXPECT_EQ(text.address, Hex64(0x0));
EXPECT_EQ(44UL, text.content.size());
const Relocation& br24 = text.relocations[0];
EXPECT_EQ(br24.offset, Hex32(0x0));
More information about the llvm-commits
mailing list