AK: Add tests for LittleEndian<enum class>

This should've been in 57126a0d3c.
This commit is contained in:
Nico Weber 2022-12-28 18:13:00 -05:00 committed by Tim Flynn
parent 0a7d0362ea
commit c051532c82
Notes: sideshowbarker 2024-07-17 02:29:41 +09:00

View file

@ -18,12 +18,16 @@ static_assert(LittleEndian<u32> { 42 } == 42, "Little endian values should be va
enum class Enum8 : u8 { Element = 1 };
static_assert(BigEndian<Enum8> { Enum8::Element } == Enum8::Element);
static_assert(LittleEndian<Enum8> { Enum8::Element } == Enum8::Element);
enum class Enum16 : u16 { Element = 2 };
static_assert(BigEndian<Enum16> { Enum16::Element } == Enum16::Element);
static_assert(LittleEndian<Enum16> { Enum16::Element } == Enum16::Element);
enum class Enum32 : u32 { Element = 3 };
static_assert(BigEndian<Enum32> { Enum32::Element } == Enum32::Element);
static_assert(LittleEndian<Enum32> { Enum32::Element } == Enum32::Element);
enum class Enum64 : u64 { Element = 4 };
static_assert(BigEndian<Enum64> { Enum64::Element } == Enum64::Element);
static_assert(LittleEndian<Enum64> { Enum64::Element } == Enum64::Element);