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 | 3afc385042fb0d121e9454347f975e4f1a5f5bfd (patch) | |
tree | 256314b5350f1634d712b97090442bcb824f8309 /unittests/Support/SwapByteOrderTest.cpp | |
parent | bf17cfa3f904e488e898ac2e3af706fd1a892f08 (diff) |
reimplement SwapByteOrder.h in terms of overloading instead of
being in terms of excessively complex template logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119992 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Support/SwapByteOrderTest.cpp')
-rw-r--r-- | unittests/Support/SwapByteOrderTest.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/unittests/Support/SwapByteOrderTest.cpp b/unittests/Support/SwapByteOrderTest.cpp index 073824caa4..ce8704c3ab 100644 --- a/unittests/Support/SwapByteOrderTest.cpp +++ b/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))); } } |