blob: 7f7f1a57ffc25c7cef64c4cf50bdd7395b80f7aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
/*
* Copyright (c) 2020, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibTest/TestCase.h>
#include <AK/Endian.h>
static_assert(BigEndian<u32> {} == 0, "Big endian values should be default constructed in a constexpr context.");
static_assert(BigEndian<u32> { 42 } == 42, "Big endian values should be value constructed in a constexpr context.");
static_assert(LittleEndian<u32> {} == 0, "Little endian values should be default constructed in a constexpr context.");
static_assert(LittleEndian<u32> { 42 } == 42, "Little endian values should be value constructed in a constexpr context.");
|