mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
16 lines
406 B
C++
16 lines
406 B
C++
|
// Copyright 2017 Dolphin Emulator Project
|
||
|
// Licensed under GPLv2+
|
||
|
// Refer to the license.txt file included.
|
||
|
|
||
|
#include <gtest/gtest.h>
|
||
|
|
||
|
#include "Common/Swap.h"
|
||
|
|
||
|
TEST(Swap, SwapByValue)
|
||
|
{
|
||
|
EXPECT_EQ(0xf0, Common::swap8(0xf0));
|
||
|
EXPECT_EQ(0x1234, Common::swap16(0x3412));
|
||
|
EXPECT_EQ(0x12345678u, Common::swap32(0x78563412));
|
||
|
EXPECT_EQ(0x123456789abcdef0ull, Common::swap64(0xf0debc9a78563412ull));
|
||
|
}
|