diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-11-23 04:04:25 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-11-23 04:04:25 +0000 |
| commit | 8bec7227d43a31242b808e5bd0be9e107e01f0f6 (patch) | |
| tree | da0b9d15f0a98c19c9ecbf674bd721fa431597ec /llvm/unittests/Support/SwapByteOrderTest.cpp | |
| parent | 527da1b6e23f3c94e1dd5aca592d9177679a6806 (diff) | |
| download | llvm-8bec7227d43a31242b808e5bd0be9e107e01f0f6.zip llvm-8bec7227d43a31242b808e5bd0be9e107e01f0f6.tar.gz llvm-8bec7227d43a31242b808e5bd0be9e107e01f0f6.tar.bz2 | |
reimplement SwapByteOrder.h in terms of overloading instead of
being in terms of excessively complex template logic.
llvm-svn: 119992
Diffstat (limited to 'llvm/unittests/Support/SwapByteOrderTest.cpp')
| -rw-r--r-- | llvm/unittests/Support/SwapByteOrderTest.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/unittests/Support/SwapByteOrderTest.cpp b/llvm/unittests/Support/SwapByteOrderTest.cpp index 073824c..ce8704c 100644 --- a/llvm/unittests/Support/SwapByteOrderTest.cpp +++ b/llvm/unittests/Support/SwapByteOrderTest.cpp @@ -92,37 +92,37 @@ TEST(SwapByteOrder, SignedRoundTrip) { } TEST(SwapByteOrder, uint8_t) { - EXPECT_EQ(uint8_t(0x11), sys::SwapByteOrder<uint8_t>(0x11)); + EXPECT_EQ(uint8_t(0x11), sys::SwapByteOrder(uint8_t(0x11))); } TEST(SwapByteOrder, uint16_t) { - EXPECT_EQ(uint16_t(0x1122), sys::SwapByteOrder<uint16_t>(0x2211)); + EXPECT_EQ(uint16_t(0x1122), sys::SwapByteOrder(uint16_t(0x2211))); } TEST(SwapByteOrder, uint32_t) { - EXPECT_EQ(uint32_t(0x11223344), sys::SwapByteOrder<uint32_t>(0x44332211)); + EXPECT_EQ(uint32_t(0x11223344), sys::SwapByteOrder(uint32_t(0x44332211))); } TEST(SwapByteOrder, uint64_t) { EXPECT_EQ(uint64_t(0x1122334455667788ULL), - sys::SwapByteOrder<uint64_t>(0x8877665544332211ULL)); + sys::SwapByteOrder(uint64_t(0x8877665544332211ULL))); } TEST(SwapByteOrder, int8_t) { - EXPECT_EQ(int8_t(0x11), sys::SwapByteOrder<int8_t>(0x11)); + EXPECT_EQ(int8_t(0x11), sys::SwapByteOrder(int8_t(0x11))); } TEST(SwapByteOrder, int16_t) { - EXPECT_EQ(int16_t(0x1122), sys::SwapByteOrder<int16_t>(0x2211)); + EXPECT_EQ(int16_t(0x1122), sys::SwapByteOrder(int16_t(0x2211))); } TEST(SwapByteOrder, int32_t) { - EXPECT_EQ(int32_t(0x11223344), sys::SwapByteOrder<int32_t>(0x44332211)); + EXPECT_EQ(int32_t(0x11223344), sys::SwapByteOrder(int32_t(0x44332211))); } TEST(SwapByteOrder, int64_t) { EXPECT_EQ(int64_t(0x1122334455667788LL), - sys::SwapByteOrder<int64_t>(0x8877665544332211LL)); + sys::SwapByteOrder(int64_t(0x8877665544332211LL))); } } |
