mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
AK: Add tests for LittleEndian<enum class>
This should've been in 57126a0d3c
.
This commit is contained in:
parent
0a7d0362ea
commit
c051532c82
Notes:
sideshowbarker
2024-07-17 02:29:41 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/c051532c82 Pull-request: https://github.com/SerenityOS/serenity/pull/16708
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue