5#include "flutter/fml/endianness.h"
7#include "flutter/testing/testing.h"
13 ASSERT_EQ(ByteSwap<int16_t>(0x1122), 0x2211);
14 ASSERT_EQ(ByteSwap<int32_t>(0x11223344), 0x44332211);
15 ASSERT_EQ(ByteSwap<uint64_t>(0x1122334455667788), 0x8877665544332211);
19#if FML_ARCH_CPU_LITTLE_ENDIAN
20 uint32_t expected = 0x44332211;
22 uint32_t expected = 0x11223344;
28#if FML_ARCH_CPU_LITTLE_ENDIAN
29 uint32_t expected = 0x11223344;
31 uint32_t expected = 0x44332211;
TEST(BacktraceTest, CanGatherBacktrace)
constexpr T BigEndianToArch(T n)
Convert a known big endian value to match the endianness of the current architecture....
constexpr T ByteSwap(T n)
Flips the endianness of the given value. The given value must be an integral type of size 1,...
constexpr T LittleEndianToArch(T n)
Convert a known little endian value to match the endianness of the current architecture....